"""Generated client library for config version v1."""
# NOTE: This file is autogenerated and should not be edited by hand.

from apitools.base.py import base_api
from googlecloudsdk.generated_clients.apis.config.v1 import config_v1_messages as messages


class ConfigV1(base_api.BaseApiClient):
  """Generated client library for service config version v1."""

  MESSAGES_MODULE = messages
  BASE_URL = 'https://config.googleapis.com/'
  MTLS_BASE_URL = 'https://config.mtls.googleapis.com/'

  _PACKAGE = 'config'
  _SCOPES = ['https://www.googleapis.com/auth/cloud-platform']
  _VERSION = 'v1'
  _CLIENT_ID = 'CLIENT_ID'
  _CLIENT_SECRET = 'CLIENT_SECRET'
  _USER_AGENT = 'google-cloud-sdk'
  _CLIENT_CLASS_NAME = 'ConfigV1'
  _URL_VERSION = 'v1'
  _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 config handle."""
    url = url or self.BASE_URL
    super(ConfigV1, 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_locations_deployments_revisions_resources = self.ProjectsLocationsDeploymentsRevisionsResourcesService(self)
    self.projects_locations_deployments_revisions = self.ProjectsLocationsDeploymentsRevisionsService(self)
    self.projects_locations_deployments = self.ProjectsLocationsDeploymentsService(self)
    self.projects_locations_operations = self.ProjectsLocationsOperationsService(self)
    self.projects_locations_previews_resourceChanges = self.ProjectsLocationsPreviewsResourceChangesService(self)
    self.projects_locations_previews_resourceDrifts = self.ProjectsLocationsPreviewsResourceDriftsService(self)
    self.projects_locations_previews = self.ProjectsLocationsPreviewsService(self)
    self.projects_locations_terraformVersions = self.ProjectsLocationsTerraformVersionsService(self)
    self.projects_locations = self.ProjectsLocationsService(self)
    self.projects = self.ProjectsService(self)

  class ProjectsLocationsDeploymentsRevisionsResourcesService(base_api.BaseApiService):
    """Service class for the projects_locations_deployments_revisions_resources resource."""

    _NAME = 'projects_locations_deployments_revisions_resources'

    def __init__(self, client):
      super(ConfigV1.ProjectsLocationsDeploymentsRevisionsResourcesService, self).__init__(client)
      self._upload_configs = {
          }

    def Get(self, request, global_params=None):
      r"""Gets details about a Resource deployed by Infra Manager.

      Args:
        request: (ConfigProjectsLocationsDeploymentsRevisionsResourcesGetRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (Resource) 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='v1/projects/{projectsId}/locations/{locationsId}/deployments/{deploymentsId}/revisions/{revisionsId}/resources/{resourcesId}',
        http_method='GET',
        method_id='config.projects.locations.deployments.revisions.resources.get',
        ordered_params=['name'],
        path_params=['name'],
        query_params=[],
        relative_path='v1/{+name}',
        request_field='',
        request_type_name='ConfigProjectsLocationsDeploymentsRevisionsResourcesGetRequest',
        response_type_name='Resource',
        supports_download=False,
    )

    def List(self, request, global_params=None):
      r"""Lists Resources in a given revision.

      Args:
        request: (ConfigProjectsLocationsDeploymentsRevisionsResourcesListRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (ListResourcesResponse) 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='v1/projects/{projectsId}/locations/{locationsId}/deployments/{deploymentsId}/revisions/{revisionsId}/resources',
        http_method='GET',
        method_id='config.projects.locations.deployments.revisions.resources.list',
        ordered_params=['parent'],
        path_params=['parent'],
        query_params=['filter', 'orderBy', 'pageSize', 'pageToken'],
        relative_path='v1/{+parent}/resources',
        request_field='',
        request_type_name='ConfigProjectsLocationsDeploymentsRevisionsResourcesListRequest',
        response_type_name='ListResourcesResponse',
        supports_download=False,
    )

  class ProjectsLocationsDeploymentsRevisionsService(base_api.BaseApiService):
    """Service class for the projects_locations_deployments_revisions resource."""

    _NAME = 'projects_locations_deployments_revisions'

    def __init__(self, client):
      super(ConfigV1.ProjectsLocationsDeploymentsRevisionsService, self).__init__(client)
      self._upload_configs = {
          }

    def ExportState(self, request, global_params=None):
      r"""Exports Terraform state file from a given revision.

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

    ExportState.method_config = lambda: base_api.ApiMethodInfo(
        flat_path='v1/projects/{projectsId}/locations/{locationsId}/deployments/{deploymentsId}/revisions/{revisionsId}:exportState',
        http_method='POST',
        method_id='config.projects.locations.deployments.revisions.exportState',
        ordered_params=['parent'],
        path_params=['parent'],
        query_params=[],
        relative_path='v1/{+parent}:exportState',
        request_field='exportRevisionStatefileRequest',
        request_type_name='ConfigProjectsLocationsDeploymentsRevisionsExportStateRequest',
        response_type_name='Statefile',
        supports_download=False,
    )

    def Get(self, request, global_params=None):
      r"""Gets details about a Revision.

      Args:
        request: (ConfigProjectsLocationsDeploymentsRevisionsGetRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (Revision) 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='v1/projects/{projectsId}/locations/{locationsId}/deployments/{deploymentsId}/revisions/{revisionsId}',
        http_method='GET',
        method_id='config.projects.locations.deployments.revisions.get',
        ordered_params=['name'],
        path_params=['name'],
        query_params=[],
        relative_path='v1/{+name}',
        request_field='',
        request_type_name='ConfigProjectsLocationsDeploymentsRevisionsGetRequest',
        response_type_name='Revision',
        supports_download=False,
    )

    def List(self, request, global_params=None):
      r"""Lists Revisions of a deployment.

      Args:
        request: (ConfigProjectsLocationsDeploymentsRevisionsListRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (ListRevisionsResponse) 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='v1/projects/{projectsId}/locations/{locationsId}/deployments/{deploymentsId}/revisions',
        http_method='GET',
        method_id='config.projects.locations.deployments.revisions.list',
        ordered_params=['parent'],
        path_params=['parent'],
        query_params=['filter', 'orderBy', 'pageSize', 'pageToken'],
        relative_path='v1/{+parent}/revisions',
        request_field='',
        request_type_name='ConfigProjectsLocationsDeploymentsRevisionsListRequest',
        response_type_name='ListRevisionsResponse',
        supports_download=False,
    )

  class ProjectsLocationsDeploymentsService(base_api.BaseApiService):
    """Service class for the projects_locations_deployments resource."""

    _NAME = 'projects_locations_deployments'

    def __init__(self, client):
      super(ConfigV1.ProjectsLocationsDeploymentsService, self).__init__(client)
      self._upload_configs = {
          }

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

      Args:
        request: (ConfigProjectsLocationsDeploymentsCreateRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (Operation) 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='v1/projects/{projectsId}/locations/{locationsId}/deployments',
        http_method='POST',
        method_id='config.projects.locations.deployments.create',
        ordered_params=['parent'],
        path_params=['parent'],
        query_params=['deploymentId', 'requestId'],
        relative_path='v1/{+parent}/deployments',
        request_field='deployment',
        request_type_name='ConfigProjectsLocationsDeploymentsCreateRequest',
        response_type_name='Operation',
        supports_download=False,
    )

    def Delete(self, request, global_params=None):
      r"""Deletes a Deployment.

      Args:
        request: (ConfigProjectsLocationsDeploymentsDeleteRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (Operation) 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='v1/projects/{projectsId}/locations/{locationsId}/deployments/{deploymentsId}',
        http_method='DELETE',
        method_id='config.projects.locations.deployments.delete',
        ordered_params=['name'],
        path_params=['name'],
        query_params=['deletePolicy', 'force', 'requestId'],
        relative_path='v1/{+name}',
        request_field='',
        request_type_name='ConfigProjectsLocationsDeploymentsDeleteRequest',
        response_type_name='Operation',
        supports_download=False,
    )

    def DeleteState(self, request, global_params=None):
      r"""Deletes Terraform state file in a given deployment.

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

    DeleteState.method_config = lambda: base_api.ApiMethodInfo(
        flat_path='v1/projects/{projectsId}/locations/{locationsId}/deployments/{deploymentsId}:deleteState',
        http_method='POST',
        method_id='config.projects.locations.deployments.deleteState',
        ordered_params=['name'],
        path_params=['name'],
        query_params=[],
        relative_path='v1/{+name}:deleteState',
        request_field='deleteStatefileRequest',
        request_type_name='ConfigProjectsLocationsDeploymentsDeleteStateRequest',
        response_type_name='Empty',
        supports_download=False,
    )

    def ExportLock(self, request, global_params=None):
      r"""Exports the lock info on a locked deployment.

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

    ExportLock.method_config = lambda: base_api.ApiMethodInfo(
        flat_path='v1/projects/{projectsId}/locations/{locationsId}/deployments/{deploymentsId}:exportLock',
        http_method='GET',
        method_id='config.projects.locations.deployments.exportLock',
        ordered_params=['name'],
        path_params=['name'],
        query_params=[],
        relative_path='v1/{+name}:exportLock',
        request_field='',
        request_type_name='ConfigProjectsLocationsDeploymentsExportLockRequest',
        response_type_name='LockInfo',
        supports_download=False,
    )

    def ExportState(self, request, global_params=None):
      r"""Exports Terraform state file from a given deployment.

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

    ExportState.method_config = lambda: base_api.ApiMethodInfo(
        flat_path='v1/projects/{projectsId}/locations/{locationsId}/deployments/{deploymentsId}:exportState',
        http_method='POST',
        method_id='config.projects.locations.deployments.exportState',
        ordered_params=['parent'],
        path_params=['parent'],
        query_params=[],
        relative_path='v1/{+parent}:exportState',
        request_field='exportDeploymentStatefileRequest',
        request_type_name='ConfigProjectsLocationsDeploymentsExportStateRequest',
        response_type_name='Statefile',
        supports_download=False,
    )

    def Get(self, request, global_params=None):
      r"""Gets details about a Deployment.

      Args:
        request: (ConfigProjectsLocationsDeploymentsGetRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (Deployment) 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='v1/projects/{projectsId}/locations/{locationsId}/deployments/{deploymentsId}',
        http_method='GET',
        method_id='config.projects.locations.deployments.get',
        ordered_params=['name'],
        path_params=['name'],
        query_params=[],
        relative_path='v1/{+name}',
        request_field='',
        request_type_name='ConfigProjectsLocationsDeploymentsGetRequest',
        response_type_name='Deployment',
        supports_download=False,
    )

    def GetIamPolicy(self, request, global_params=None):
      r"""Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.

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

    GetIamPolicy.method_config = lambda: base_api.ApiMethodInfo(
        flat_path='v1/projects/{projectsId}/locations/{locationsId}/deployments/{deploymentsId}:getIamPolicy',
        http_method='GET',
        method_id='config.projects.locations.deployments.getIamPolicy',
        ordered_params=['resource'],
        path_params=['resource'],
        query_params=['options_requestedPolicyVersion'],
        relative_path='v1/{+resource}:getIamPolicy',
        request_field='',
        request_type_name='ConfigProjectsLocationsDeploymentsGetIamPolicyRequest',
        response_type_name='Policy',
        supports_download=False,
    )

    def ImportState(self, request, global_params=None):
      r"""Imports Terraform state file in a given deployment. The state file does not take effect until the Deployment has been unlocked.

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

    ImportState.method_config = lambda: base_api.ApiMethodInfo(
        flat_path='v1/projects/{projectsId}/locations/{locationsId}/deployments/{deploymentsId}:importState',
        http_method='POST',
        method_id='config.projects.locations.deployments.importState',
        ordered_params=['parent'],
        path_params=['parent'],
        query_params=[],
        relative_path='v1/{+parent}:importState',
        request_field='importStatefileRequest',
        request_type_name='ConfigProjectsLocationsDeploymentsImportStateRequest',
        response_type_name='Statefile',
        supports_download=False,
    )

    def List(self, request, global_params=None):
      r"""Lists Deployments in a given project and location.

      Args:
        request: (ConfigProjectsLocationsDeploymentsListRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (ListDeploymentsResponse) 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='v1/projects/{projectsId}/locations/{locationsId}/deployments',
        http_method='GET',
        method_id='config.projects.locations.deployments.list',
        ordered_params=['parent'],
        path_params=['parent'],
        query_params=['filter', 'orderBy', 'pageSize', 'pageToken'],
        relative_path='v1/{+parent}/deployments',
        request_field='',
        request_type_name='ConfigProjectsLocationsDeploymentsListRequest',
        response_type_name='ListDeploymentsResponse',
        supports_download=False,
    )

    def Lock(self, request, global_params=None):
      r"""Locks a deployment.

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

    Lock.method_config = lambda: base_api.ApiMethodInfo(
        flat_path='v1/projects/{projectsId}/locations/{locationsId}/deployments/{deploymentsId}:lock',
        http_method='POST',
        method_id='config.projects.locations.deployments.lock',
        ordered_params=['name'],
        path_params=['name'],
        query_params=[],
        relative_path='v1/{+name}:lock',
        request_field='lockDeploymentRequest',
        request_type_name='ConfigProjectsLocationsDeploymentsLockRequest',
        response_type_name='Operation',
        supports_download=False,
    )

    def Patch(self, request, global_params=None):
      r"""Updates a Deployment.

      Args:
        request: (ConfigProjectsLocationsDeploymentsPatchRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (Operation) 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='v1/projects/{projectsId}/locations/{locationsId}/deployments/{deploymentsId}',
        http_method='PATCH',
        method_id='config.projects.locations.deployments.patch',
        ordered_params=['name'],
        path_params=['name'],
        query_params=['requestId', 'updateMask'],
        relative_path='v1/{+name}',
        request_field='deployment',
        request_type_name='ConfigProjectsLocationsDeploymentsPatchRequest',
        response_type_name='Operation',
        supports_download=False,
    )

    def SetIamPolicy(self, request, global_params=None):
      r"""Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.

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

    SetIamPolicy.method_config = lambda: base_api.ApiMethodInfo(
        flat_path='v1/projects/{projectsId}/locations/{locationsId}/deployments/{deploymentsId}:setIamPolicy',
        http_method='POST',
        method_id='config.projects.locations.deployments.setIamPolicy',
        ordered_params=['resource'],
        path_params=['resource'],
        query_params=[],
        relative_path='v1/{+resource}:setIamPolicy',
        request_field='setIamPolicyRequest',
        request_type_name='ConfigProjectsLocationsDeploymentsSetIamPolicyRequest',
        response_type_name='Policy',
        supports_download=False,
    )

    def TestIamPermissions(self, request, global_params=None):
      r"""Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.

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

    TestIamPermissions.method_config = lambda: base_api.ApiMethodInfo(
        flat_path='v1/projects/{projectsId}/locations/{locationsId}/deployments/{deploymentsId}:testIamPermissions',
        http_method='POST',
        method_id='config.projects.locations.deployments.testIamPermissions',
        ordered_params=['resource'],
        path_params=['resource'],
        query_params=[],
        relative_path='v1/{+resource}:testIamPermissions',
        request_field='testIamPermissionsRequest',
        request_type_name='ConfigProjectsLocationsDeploymentsTestIamPermissionsRequest',
        response_type_name='TestIamPermissionsResponse',
        supports_download=False,
    )

    def Unlock(self, request, global_params=None):
      r"""Unlocks a locked deployment.

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

    Unlock.method_config = lambda: base_api.ApiMethodInfo(
        flat_path='v1/projects/{projectsId}/locations/{locationsId}/deployments/{deploymentsId}:unlock',
        http_method='POST',
        method_id='config.projects.locations.deployments.unlock',
        ordered_params=['name'],
        path_params=['name'],
        query_params=[],
        relative_path='v1/{+name}:unlock',
        request_field='unlockDeploymentRequest',
        request_type_name='ConfigProjectsLocationsDeploymentsUnlockRequest',
        response_type_name='Operation',
        supports_download=False,
    )

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

    _NAME = 'projects_locations_operations'

    def __init__(self, client):
      super(ConfigV1.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: (ConfigProjectsLocationsOperationsCancelRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (Empty) 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='v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel',
        http_method='POST',
        method_id='config.projects.locations.operations.cancel',
        ordered_params=['name'],
        path_params=['name'],
        query_params=[],
        relative_path='v1/{+name}:cancel',
        request_field='cancelOperationRequest',
        request_type_name='ConfigProjectsLocationsOperationsCancelRequest',
        response_type_name='Empty',
        supports_download=False,
    )

    def Delete(self, request, global_params=None):
      r"""Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.

      Args:
        request: (ConfigProjectsLocationsOperationsDeleteRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (Empty) 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='v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}',
        http_method='DELETE',
        method_id='config.projects.locations.operations.delete',
        ordered_params=['name'],
        path_params=['name'],
        query_params=[],
        relative_path='v1/{+name}',
        request_field='',
        request_type_name='ConfigProjectsLocationsOperationsDeleteRequest',
        response_type_name='Empty',
        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: (ConfigProjectsLocationsOperationsGetRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (Operation) 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='v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}',
        http_method='GET',
        method_id='config.projects.locations.operations.get',
        ordered_params=['name'],
        path_params=['name'],
        query_params=[],
        relative_path='v1/{+name}',
        request_field='',
        request_type_name='ConfigProjectsLocationsOperationsGetRequest',
        response_type_name='Operation',
        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`.

      Args:
        request: (ConfigProjectsLocationsOperationsListRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (ListOperationsResponse) 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='v1/projects/{projectsId}/locations/{locationsId}/operations',
        http_method='GET',
        method_id='config.projects.locations.operations.list',
        ordered_params=['name'],
        path_params=['name'],
        query_params=['filter', 'pageSize', 'pageToken', 'returnPartialSuccess'],
        relative_path='v1/{+name}/operations',
        request_field='',
        request_type_name='ConfigProjectsLocationsOperationsListRequest',
        response_type_name='ListOperationsResponse',
        supports_download=False,
    )

  class ProjectsLocationsPreviewsResourceChangesService(base_api.BaseApiService):
    """Service class for the projects_locations_previews_resourceChanges resource."""

    _NAME = 'projects_locations_previews_resourceChanges'

    def __init__(self, client):
      super(ConfigV1.ProjectsLocationsPreviewsResourceChangesService, self).__init__(client)
      self._upload_configs = {
          }

    def Get(self, request, global_params=None):
      r"""Get a ResourceChange for a given preview.

      Args:
        request: (ConfigProjectsLocationsPreviewsResourceChangesGetRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (ResourceChange) 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='v1/projects/{projectsId}/locations/{locationsId}/previews/{previewsId}/resourceChanges/{resourceChangesId}',
        http_method='GET',
        method_id='config.projects.locations.previews.resourceChanges.get',
        ordered_params=['name'],
        path_params=['name'],
        query_params=[],
        relative_path='v1/{+name}',
        request_field='',
        request_type_name='ConfigProjectsLocationsPreviewsResourceChangesGetRequest',
        response_type_name='ResourceChange',
        supports_download=False,
    )

    def List(self, request, global_params=None):
      r"""Lists ResourceChanges for a given preview.

      Args:
        request: (ConfigProjectsLocationsPreviewsResourceChangesListRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (ListResourceChangesResponse) 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='v1/projects/{projectsId}/locations/{locationsId}/previews/{previewsId}/resourceChanges',
        http_method='GET',
        method_id='config.projects.locations.previews.resourceChanges.list',
        ordered_params=['parent'],
        path_params=['parent'],
        query_params=['filter', 'orderBy', 'pageSize', 'pageToken'],
        relative_path='v1/{+parent}/resourceChanges',
        request_field='',
        request_type_name='ConfigProjectsLocationsPreviewsResourceChangesListRequest',
        response_type_name='ListResourceChangesResponse',
        supports_download=False,
    )

  class ProjectsLocationsPreviewsResourceDriftsService(base_api.BaseApiService):
    """Service class for the projects_locations_previews_resourceDrifts resource."""

    _NAME = 'projects_locations_previews_resourceDrifts'

    def __init__(self, client):
      super(ConfigV1.ProjectsLocationsPreviewsResourceDriftsService, self).__init__(client)
      self._upload_configs = {
          }

    def Get(self, request, global_params=None):
      r"""Get a ResourceDrift for a given preview.

      Args:
        request: (ConfigProjectsLocationsPreviewsResourceDriftsGetRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (ResourceDrift) 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='v1/projects/{projectsId}/locations/{locationsId}/previews/{previewsId}/resourceDrifts/{resourceDriftsId}',
        http_method='GET',
        method_id='config.projects.locations.previews.resourceDrifts.get',
        ordered_params=['name'],
        path_params=['name'],
        query_params=[],
        relative_path='v1/{+name}',
        request_field='',
        request_type_name='ConfigProjectsLocationsPreviewsResourceDriftsGetRequest',
        response_type_name='ResourceDrift',
        supports_download=False,
    )

    def List(self, request, global_params=None):
      r"""List ResourceDrifts for a given preview.

      Args:
        request: (ConfigProjectsLocationsPreviewsResourceDriftsListRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (ListResourceDriftsResponse) 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='v1/projects/{projectsId}/locations/{locationsId}/previews/{previewsId}/resourceDrifts',
        http_method='GET',
        method_id='config.projects.locations.previews.resourceDrifts.list',
        ordered_params=['parent'],
        path_params=['parent'],
        query_params=['filter', 'orderBy', 'pageSize', 'pageToken'],
        relative_path='v1/{+parent}/resourceDrifts',
        request_field='',
        request_type_name='ConfigProjectsLocationsPreviewsResourceDriftsListRequest',
        response_type_name='ListResourceDriftsResponse',
        supports_download=False,
    )

  class ProjectsLocationsPreviewsService(base_api.BaseApiService):
    """Service class for the projects_locations_previews resource."""

    _NAME = 'projects_locations_previews'

    def __init__(self, client):
      super(ConfigV1.ProjectsLocationsPreviewsService, self).__init__(client)
      self._upload_configs = {
          }

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

      Args:
        request: (ConfigProjectsLocationsPreviewsCreateRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (Operation) 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='v1/projects/{projectsId}/locations/{locationsId}/previews',
        http_method='POST',
        method_id='config.projects.locations.previews.create',
        ordered_params=['parent'],
        path_params=['parent'],
        query_params=['previewId', 'requestId'],
        relative_path='v1/{+parent}/previews',
        request_field='preview',
        request_type_name='ConfigProjectsLocationsPreviewsCreateRequest',
        response_type_name='Operation',
        supports_download=False,
    )

    def Delete(self, request, global_params=None):
      r"""Deletes a Preview.

      Args:
        request: (ConfigProjectsLocationsPreviewsDeleteRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (Operation) 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='v1/projects/{projectsId}/locations/{locationsId}/previews/{previewsId}',
        http_method='DELETE',
        method_id='config.projects.locations.previews.delete',
        ordered_params=['name'],
        path_params=['name'],
        query_params=['requestId'],
        relative_path='v1/{+name}',
        request_field='',
        request_type_name='ConfigProjectsLocationsPreviewsDeleteRequest',
        response_type_name='Operation',
        supports_download=False,
    )

    def Export(self, request, global_params=None):
      r"""Export Preview results.

      Args:
        request: (ConfigProjectsLocationsPreviewsExportRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (ExportPreviewResultResponse) 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='v1/projects/{projectsId}/locations/{locationsId}/previews/{previewsId}:export',
        http_method='POST',
        method_id='config.projects.locations.previews.export',
        ordered_params=['parent'],
        path_params=['parent'],
        query_params=[],
        relative_path='v1/{+parent}:export',
        request_field='exportPreviewResultRequest',
        request_type_name='ConfigProjectsLocationsPreviewsExportRequest',
        response_type_name='ExportPreviewResultResponse',
        supports_download=False,
    )

    def Get(self, request, global_params=None):
      r"""Gets details about a Preview.

      Args:
        request: (ConfigProjectsLocationsPreviewsGetRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (Preview) 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='v1/projects/{projectsId}/locations/{locationsId}/previews/{previewsId}',
        http_method='GET',
        method_id='config.projects.locations.previews.get',
        ordered_params=['name'],
        path_params=['name'],
        query_params=[],
        relative_path='v1/{+name}',
        request_field='',
        request_type_name='ConfigProjectsLocationsPreviewsGetRequest',
        response_type_name='Preview',
        supports_download=False,
    )

    def List(self, request, global_params=None):
      r"""Lists Previews in a given project and location.

      Args:
        request: (ConfigProjectsLocationsPreviewsListRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (ListPreviewsResponse) 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='v1/projects/{projectsId}/locations/{locationsId}/previews',
        http_method='GET',
        method_id='config.projects.locations.previews.list',
        ordered_params=['parent'],
        path_params=['parent'],
        query_params=['filter', 'orderBy', 'pageSize', 'pageToken'],
        relative_path='v1/{+parent}/previews',
        request_field='',
        request_type_name='ConfigProjectsLocationsPreviewsListRequest',
        response_type_name='ListPreviewsResponse',
        supports_download=False,
    )

  class ProjectsLocationsTerraformVersionsService(base_api.BaseApiService):
    """Service class for the projects_locations_terraformVersions resource."""

    _NAME = 'projects_locations_terraformVersions'

    def __init__(self, client):
      super(ConfigV1.ProjectsLocationsTerraformVersionsService, self).__init__(client)
      self._upload_configs = {
          }

    def Get(self, request, global_params=None):
      r"""Gets details about a TerraformVersion.

      Args:
        request: (ConfigProjectsLocationsTerraformVersionsGetRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (TerraformVersion) 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='v1/projects/{projectsId}/locations/{locationsId}/terraformVersions/{terraformVersionsId}',
        http_method='GET',
        method_id='config.projects.locations.terraformVersions.get',
        ordered_params=['name'],
        path_params=['name'],
        query_params=[],
        relative_path='v1/{+name}',
        request_field='',
        request_type_name='ConfigProjectsLocationsTerraformVersionsGetRequest',
        response_type_name='TerraformVersion',
        supports_download=False,
    )

    def List(self, request, global_params=None):
      r"""Lists TerraformVersions in a given project and location.

      Args:
        request: (ConfigProjectsLocationsTerraformVersionsListRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (ListTerraformVersionsResponse) 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='v1/projects/{projectsId}/locations/{locationsId}/terraformVersions',
        http_method='GET',
        method_id='config.projects.locations.terraformVersions.list',
        ordered_params=['parent'],
        path_params=['parent'],
        query_params=['filter', 'orderBy', 'pageSize', 'pageToken'],
        relative_path='v1/{+parent}/terraformVersions',
        request_field='',
        request_type_name='ConfigProjectsLocationsTerraformVersionsListRequest',
        response_type_name='ListTerraformVersionsResponse',
        supports_download=False,
    )

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

    _NAME = 'projects_locations'

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

    def Get(self, request, global_params=None):
      r"""Gets information about a location.

      Args:
        request: (ConfigProjectsLocationsGetRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (Location) 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='v1/projects/{projectsId}/locations/{locationsId}',
        http_method='GET',
        method_id='config.projects.locations.get',
        ordered_params=['name'],
        path_params=['name'],
        query_params=[],
        relative_path='v1/{+name}',
        request_field='',
        request_type_name='ConfigProjectsLocationsGetRequest',
        response_type_name='Location',
        supports_download=False,
    )

    def GetAutoMigrationConfig(self, request, global_params=None):
      r"""Get the AutoMigrationConfig for a given project and location.

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

    GetAutoMigrationConfig.method_config = lambda: base_api.ApiMethodInfo(
        flat_path='v1/projects/{projectsId}/locations/{locationsId}/autoMigrationConfig',
        http_method='GET',
        method_id='config.projects.locations.getAutoMigrationConfig',
        ordered_params=['name'],
        path_params=['name'],
        query_params=[],
        relative_path='v1/{+name}',
        request_field='',
        request_type_name='ConfigProjectsLocationsGetAutoMigrationConfigRequest',
        response_type_name='AutoMigrationConfig',
        supports_download=False,
    )

    def List(self, request, global_params=None):
      r"""Lists information about the supported locations for this service. This method can be called in two ways: * **List all public locations:** Use the path `GET /v1/locations`. * **List project-visible locations:** Use the path `GET /v1/projects/{project_id}/locations`. This may include public locations as well as private or other locations specifically visible to the project.

      Args:
        request: (ConfigProjectsLocationsListRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (ListLocationsResponse) 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='v1/projects/{projectsId}/locations',
        http_method='GET',
        method_id='config.projects.locations.list',
        ordered_params=['name'],
        path_params=['name'],
        query_params=['extraLocationTypes', 'filter', 'pageSize', 'pageToken'],
        relative_path='v1/{+name}/locations',
        request_field='',
        request_type_name='ConfigProjectsLocationsListRequest',
        response_type_name='ListLocationsResponse',
        supports_download=False,
    )

    def UpdateAutoMigrationConfig(self, request, global_params=None):
      r"""Updates the AutoMigrationConfig for a given project and location.

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

    UpdateAutoMigrationConfig.method_config = lambda: base_api.ApiMethodInfo(
        flat_path='v1/projects/{projectsId}/locations/{locationsId}/autoMigrationConfig',
        http_method='PATCH',
        method_id='config.projects.locations.updateAutoMigrationConfig',
        ordered_params=['name'],
        path_params=['name'],
        query_params=['updateMask'],
        relative_path='v1/{+name}',
        request_field='autoMigrationConfig',
        request_type_name='ConfigProjectsLocationsUpdateAutoMigrationConfigRequest',
        response_type_name='Operation',
        supports_download=False,
    )

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

    _NAME = 'projects'

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