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

from apitools.base.py import base_api
from googlecloudsdk.generated_clients.apis.storage.v2 import storage_v2_messages as messages


class StorageV2(base_api.BaseApiClient):
  """Generated client library for service storage version v2."""

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

  _PACKAGE = 'storage'
  _SCOPES = ['https://www.googleapis.com/auth/cloud-platform', 'https://www.googleapis.com/auth/cloud-platform.read-only', 'https://www.googleapis.com/auth/devstorage.full_control', 'https://www.googleapis.com/auth/devstorage.read_only', 'https://www.googleapis.com/auth/devstorage.read_write']
  _VERSION = 'v2'
  _CLIENT_ID = 'CLIENT_ID'
  _CLIENT_SECRET = 'CLIENT_SECRET'
  _USER_AGENT = 'google-cloud-sdk'
  _CLIENT_CLASS_NAME = 'StorageV2'
  _URL_VERSION = '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 storage handle."""
    url = url or self.BASE_URL
    super(StorageV2, 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.folders_locations_intelligenceFindings = self.FoldersLocationsIntelligenceFindingsService(self)
    self.folders_locations = self.FoldersLocationsService(self)
    self.folders = self.FoldersService(self)
    self.organizations_locations_intelligenceFindings = self.OrganizationsLocationsIntelligenceFindingsService(self)
    self.organizations_locations = self.OrganizationsLocationsService(self)
    self.organizations = self.OrganizationsService(self)
    self.projects_buckets_folders = self.ProjectsBucketsFoldersService(self)
    self.projects_buckets_snapshots = self.ProjectsBucketsSnapshotsService(self)
    self.projects_buckets = self.ProjectsBucketsService(self)
    self.projects_locations_intelligenceFindings_revisions = self.ProjectsLocationsIntelligenceFindingsRevisionsService(self)
    self.projects_locations_intelligenceFindings = self.ProjectsLocationsIntelligenceFindingsService(self)
    self.projects_locations_objectIndexes = self.ProjectsLocationsObjectIndexesService(self)
    self.projects_locations = self.ProjectsLocationsService(self)
    self.projects = self.ProjectsService(self)

  class FoldersLocationsIntelligenceFindingsService(base_api.BaseApiService):
    """Service class for the folders_locations_intelligenceFindings resource."""

    _NAME = 'folders_locations_intelligenceFindings'

    def __init__(self, client):
      super(StorageV2.FoldersLocationsIntelligenceFindingsService, self).__init__(client)
      self._upload_configs = {
          }

    def Summarize(self, request, global_params=None):
      r"""Summarize the intelligence findings for the specified scope(org, folder or project).

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

    Summarize.method_config = lambda: base_api.ApiMethodInfo(
        flat_path='v2/folders/{foldersId}/locations/{locationsId}/intelligenceFindings:summarize',
        http_method='GET',
        method_id='storage.folders.locations.intelligenceFindings.summarize',
        ordered_params=['parent'],
        path_params=['parent'],
        query_params=['filter', 'pageSize', 'pageToken', 'resourceScope'],
        relative_path='v2/{+parent}/intelligenceFindings:summarize',
        request_field='',
        request_type_name='StorageFoldersLocationsIntelligenceFindingsSummarizeRequest',
        response_type_name='SummarizeIntelligenceFindingsResponse',
        supports_download=False,
    )

  class FoldersLocationsService(base_api.BaseApiService):
    """Service class for the folders_locations resource."""

    _NAME = 'folders_locations'

    def __init__(self, client):
      super(StorageV2.FoldersLocationsService, self).__init__(client)
      self._upload_configs = {
          }

    def GetIntelligenceConfig(self, request, global_params=None):
      r"""Returns the Folder scoped singleton IntelligenceConfig resource.

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

    GetIntelligenceConfig.method_config = lambda: base_api.ApiMethodInfo(
        flat_path='v2/folders/{foldersId}/locations/{locationsId}/intelligenceConfig',
        http_method='GET',
        method_id='storage.folders.locations.getIntelligenceConfig',
        ordered_params=['name'],
        path_params=['name'],
        query_params=[],
        relative_path='v2/{+name}',
        request_field='',
        request_type_name='StorageFoldersLocationsGetIntelligenceConfigRequest',
        response_type_name='IntelligenceConfig',
        supports_download=False,
    )

    def GetManagementHub(self, request, global_params=None):
      r"""Gets the `ManagementHub` resource associated with your folder. **IAM Permissions**: Requires `storage.managementHubs.get` [IAM](https://cloud.google.com/iam/docs/overview#permissions) permission on the folder.

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

    GetManagementHub.method_config = lambda: base_api.ApiMethodInfo(
        flat_path='v2/folders/{foldersId}/locations/{locationsId}/managementHub',
        http_method='GET',
        method_id='storage.folders.locations.getManagementHub',
        ordered_params=['name'],
        path_params=['name'],
        query_params=[],
        relative_path='v2/{+name}',
        request_field='',
        request_type_name='StorageFoldersLocationsGetManagementHubRequest',
        response_type_name='ManagementHub',
        supports_download=False,
    )

    def UpdateIntelligenceConfig(self, request, global_params=None):
      r"""Updates the Folder scoped singleton IntelligenceConfig resource.

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

    UpdateIntelligenceConfig.method_config = lambda: base_api.ApiMethodInfo(
        flat_path='v2/folders/{foldersId}/locations/{locationsId}/intelligenceConfig',
        http_method='PATCH',
        method_id='storage.folders.locations.updateIntelligenceConfig',
        ordered_params=['name'],
        path_params=['name'],
        query_params=['requestId', 'updateMask'],
        relative_path='v2/{+name}',
        request_field='intelligenceConfig',
        request_type_name='StorageFoldersLocationsUpdateIntelligenceConfigRequest',
        response_type_name='IntelligenceConfig',
        supports_download=False,
    )

    def UpdateManagementHub(self, request, global_params=None):
      r"""Updates the `ManagementHub` resource associated with your folder. **IAM Permissions**: Requires `storage.managementHubs.update` [IAM](https://cloud.google.com/iam/docs/overview#permissions) permission on the folder.

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

    UpdateManagementHub.method_config = lambda: base_api.ApiMethodInfo(
        flat_path='v2/folders/{foldersId}/locations/{locationsId}/managementHub',
        http_method='PATCH',
        method_id='storage.folders.locations.updateManagementHub',
        ordered_params=['name'],
        path_params=['name'],
        query_params=['requestId', 'updateMask'],
        relative_path='v2/{+name}',
        request_field='managementHub',
        request_type_name='StorageFoldersLocationsUpdateManagementHubRequest',
        response_type_name='ManagementHub',
        supports_download=False,
    )

  class FoldersService(base_api.BaseApiService):
    """Service class for the folders resource."""

    _NAME = 'folders'

    def __init__(self, client):
      super(StorageV2.FoldersService, self).__init__(client)
      self._upload_configs = {
          }

  class OrganizationsLocationsIntelligenceFindingsService(base_api.BaseApiService):
    """Service class for the organizations_locations_intelligenceFindings resource."""

    _NAME = 'organizations_locations_intelligenceFindings'

    def __init__(self, client):
      super(StorageV2.OrganizationsLocationsIntelligenceFindingsService, self).__init__(client)
      self._upload_configs = {
          }

    def Summarize(self, request, global_params=None):
      r"""Summarize the intelligence findings for the specified scope(org, folder or project).

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

    Summarize.method_config = lambda: base_api.ApiMethodInfo(
        flat_path='v2/organizations/{organizationsId}/locations/{locationsId}/intelligenceFindings:summarize',
        http_method='GET',
        method_id='storage.organizations.locations.intelligenceFindings.summarize',
        ordered_params=['parent'],
        path_params=['parent'],
        query_params=['filter', 'pageSize', 'pageToken', 'resourceScope'],
        relative_path='v2/{+parent}/intelligenceFindings:summarize',
        request_field='',
        request_type_name='StorageOrganizationsLocationsIntelligenceFindingsSummarizeRequest',
        response_type_name='SummarizeIntelligenceFindingsResponse',
        supports_download=False,
    )

  class OrganizationsLocationsService(base_api.BaseApiService):
    """Service class for the organizations_locations resource."""

    _NAME = 'organizations_locations'

    def __init__(self, client):
      super(StorageV2.OrganizationsLocationsService, self).__init__(client)
      self._upload_configs = {
          }

    def GetIntelligenceConfig(self, request, global_params=None):
      r"""Returns the Organization scoped singleton IntelligenceConfig resource.

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

    GetIntelligenceConfig.method_config = lambda: base_api.ApiMethodInfo(
        flat_path='v2/organizations/{organizationsId}/locations/{locationsId}/intelligenceConfig',
        http_method='GET',
        method_id='storage.organizations.locations.getIntelligenceConfig',
        ordered_params=['name'],
        path_params=['name'],
        query_params=[],
        relative_path='v2/{+name}',
        request_field='',
        request_type_name='StorageOrganizationsLocationsGetIntelligenceConfigRequest',
        response_type_name='IntelligenceConfig',
        supports_download=False,
    )

    def GetManagementHub(self, request, global_params=None):
      r"""Gets the `ManagementHub` resource associated with your organization. **IAM Permissions**: Requires `storage.managementHubs.get` [IAM](https://cloud.google.com/iam/docs/overview#permissions) permission on the folder.

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

    GetManagementHub.method_config = lambda: base_api.ApiMethodInfo(
        flat_path='v2/organizations/{organizationsId}/locations/{locationsId}/managementHub',
        http_method='GET',
        method_id='storage.organizations.locations.getManagementHub',
        ordered_params=['name'],
        path_params=['name'],
        query_params=[],
        relative_path='v2/{+name}',
        request_field='',
        request_type_name='StorageOrganizationsLocationsGetManagementHubRequest',
        response_type_name='ManagementHub',
        supports_download=False,
    )

    def UpdateIntelligenceConfig(self, request, global_params=None):
      r"""Updates the Organization scoped singleton IntelligenceConfig resource.

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

    UpdateIntelligenceConfig.method_config = lambda: base_api.ApiMethodInfo(
        flat_path='v2/organizations/{organizationsId}/locations/{locationsId}/intelligenceConfig',
        http_method='PATCH',
        method_id='storage.organizations.locations.updateIntelligenceConfig',
        ordered_params=['name'],
        path_params=['name'],
        query_params=['requestId', 'updateMask'],
        relative_path='v2/{+name}',
        request_field='intelligenceConfig',
        request_type_name='StorageOrganizationsLocationsUpdateIntelligenceConfigRequest',
        response_type_name='IntelligenceConfig',
        supports_download=False,
    )

    def UpdateManagementHub(self, request, global_params=None):
      r"""Updates the `ManagementHub` resource associated with your organization. **IAM Permissions** Requires `storage.managementHubs.update` [IAM](https://cloud.google.com/iam/docs/overview#permissions) permission on the organization.

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

    UpdateManagementHub.method_config = lambda: base_api.ApiMethodInfo(
        flat_path='v2/organizations/{organizationsId}/locations/{locationsId}/managementHub',
        http_method='PATCH',
        method_id='storage.organizations.locations.updateManagementHub',
        ordered_params=['name'],
        path_params=['name'],
        query_params=['requestId', 'updateMask'],
        relative_path='v2/{+name}',
        request_field='managementHub',
        request_type_name='StorageOrganizationsLocationsUpdateManagementHubRequest',
        response_type_name='ManagementHub',
        supports_download=False,
    )

  class OrganizationsService(base_api.BaseApiService):
    """Service class for the organizations resource."""

    _NAME = 'organizations'

    def __init__(self, client):
      super(StorageV2.OrganizationsService, self).__init__(client)
      self._upload_configs = {
          }

  class ProjectsBucketsFoldersService(base_api.BaseApiService):
    """Service class for the projects_buckets_folders resource."""

    _NAME = 'projects_buckets_folders'

    def __init__(self, client):
      super(StorageV2.ProjectsBucketsFoldersService, self).__init__(client)
      self._upload_configs = {
          }

    def BulkDelete(self, request, global_params=None):
      r"""Bulk deletes folders. This operation is only applicable to a hierarchical namespace enabled bucket. It is an internal only API used by internal GCS services.

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

    BulkDelete.method_config = lambda: base_api.ApiMethodInfo(
        flat_path='v2/projects/{projectsId}/buckets/{bucketsId}/folders:bulkDelete',
        http_method='POST',
        method_id='storage.projects.buckets.folders.bulkDelete',
        ordered_params=['parent'],
        path_params=['parent'],
        query_params=[],
        relative_path='v2/{+parent}/folders:bulkDelete',
        request_field='bulkDeleteFoldersRequest',
        request_type_name='StorageProjectsBucketsFoldersBulkDeleteRequest',
        response_type_name='BulkDeleteFoldersResponse',
        supports_download=False,
    )

    def Create(self, request, global_params=None):
      r"""Creates a new folder. This operation is only applicable to a hierarchical namespace enabled bucket.

      Args:
        request: (StorageProjectsBucketsFoldersCreateRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (Folder) 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='v2/projects/{projectsId}/buckets/{bucketsId}/folders',
        http_method='POST',
        method_id='storage.projects.buckets.folders.create',
        ordered_params=['parent'],
        path_params=['parent'],
        query_params=['folderId', 'recursive', 'requestId'],
        relative_path='v2/{+parent}/folders',
        request_field='folder',
        request_type_name='StorageProjectsBucketsFoldersCreateRequest',
        response_type_name='Folder',
        supports_download=False,
    )

    def Delete(self, request, global_params=None):
      r"""Deletes a folder and all of its contents, including sub-folders, managed folders, and objects. This operation is only applicable to a hierarchical namespace enabled bucket.

      Args:
        request: (StorageProjectsBucketsFoldersDeleteRequest) 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='v2/projects/{projectsId}/buckets/{bucketsId}/folders/{foldersId}:delete',
        http_method='DELETE',
        method_id='storage.projects.buckets.folders.delete',
        ordered_params=['name'],
        path_params=['name'],
        query_params=['ifMetagenerationMatch', 'ifMetagenerationNotMatch', 'requestId'],
        relative_path='v2/{+name}:delete',
        request_field='',
        request_type_name='StorageProjectsBucketsFoldersDeleteRequest',
        response_type_name='Operation',
        supports_download=False,
    )

    def DeleteRecursive(self, request, global_params=None):
      r"""Deletes a folder recursively. This operation is only applicable to a hierarchical namespace enabled bucket.

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

    DeleteRecursive.method_config = lambda: base_api.ApiMethodInfo(
        flat_path='v2/projects/{projectsId}/buckets/{bucketsId}/folders/{foldersId}:deleteRecursive',
        http_method='POST',
        method_id='storage.projects.buckets.folders.deleteRecursive',
        ordered_params=['name'],
        path_params=['name'],
        query_params=[],
        relative_path='v2/{+name}:deleteRecursive',
        request_field='deleteFolderRecursiveRequest',
        request_type_name='StorageProjectsBucketsFoldersDeleteRecursiveRequest',
        response_type_name='Operation',
        supports_download=False,
    )

    def Get(self, request, global_params=None):
      r"""Returns metadata for the specified folder. This operation is only applicable to a hierarchical namespace enabled bucket.

      Args:
        request: (StorageProjectsBucketsFoldersGetRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (Folder) 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='v2/projects/{projectsId}/buckets/{bucketsId}/folders/{foldersId}',
        http_method='GET',
        method_id='storage.projects.buckets.folders.get',
        ordered_params=['name'],
        path_params=['name'],
        query_params=['ifMetagenerationMatch', 'ifMetagenerationNotMatch', 'requestId'],
        relative_path='v2/{+name}',
        request_field='',
        request_type_name='StorageProjectsBucketsFoldersGetRequest',
        response_type_name='Folder',
        supports_download=False,
    )

    def List(self, request, global_params=None):
      r"""Retrieves a list of folders. This operation is only applicable to a hierarchical namespace enabled bucket.

      Args:
        request: (StorageProjectsBucketsFoldersListRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (ListFoldersResponse) 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='v2/projects/{projectsId}/buckets/{bucketsId}/folders',
        http_method='GET',
        method_id='storage.projects.buckets.folders.list',
        ordered_params=['parent'],
        path_params=['parent'],
        query_params=['delimiter', 'lexicographicEnd', 'lexicographicStart', 'pageSize', 'pageToken', 'prefix', 'requestId'],
        relative_path='v2/{+parent}/folders',
        request_field='',
        request_type_name='StorageProjectsBucketsFoldersListRequest',
        response_type_name='ListFoldersResponse',
        supports_download=False,
    )

    def Rename(self, request, global_params=None):
      r"""Renames a source folder to a destination folder. This operation is only applicable to a hierarchical namespace enabled bucket. During a rename, the source and destination folders are locked until the long running operation completes.

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

    Rename.method_config = lambda: base_api.ApiMethodInfo(
        flat_path='v2/projects/{projectsId}/buckets/{bucketsId}/folders/{foldersId}:rename',
        http_method='POST',
        method_id='storage.projects.buckets.folders.rename',
        ordered_params=['name'],
        path_params=['name'],
        query_params=[],
        relative_path='v2/{+name}:rename',
        request_field='renameFolderRequest',
        request_type_name='StorageProjectsBucketsFoldersRenameRequest',
        response_type_name='Operation',
        supports_download=False,
    )

  class ProjectsBucketsSnapshotsService(base_api.BaseApiService):
    """Service class for the projects_buckets_snapshots resource."""

    _NAME = 'projects_buckets_snapshots'

    def __init__(self, client):
      super(StorageV2.ProjectsBucketsSnapshotsService, self).__init__(client)
      self._upload_configs = {
          }

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

      Args:
        request: (StorageProjectsBucketsSnapshotsCreateRequest) 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='v2/projects/{projectsId}/buckets/{bucketsId}/snapshots',
        http_method='POST',
        method_id='storage.projects.buckets.snapshots.create',
        ordered_params=['parent'],
        path_params=['parent'],
        query_params=['requestId'],
        relative_path='v2/{+parent}/snapshots',
        request_field='snapshot',
        request_type_name='StorageProjectsBucketsSnapshotsCreateRequest',
        response_type_name='Operation',
        supports_download=False,
    )

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

      Args:
        request: (StorageProjectsBucketsSnapshotsDeleteRequest) 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='v2/projects/{projectsId}/buckets/{bucketsId}/snapshots/{snapshotsId}',
        http_method='DELETE',
        method_id='storage.projects.buckets.snapshots.delete',
        ordered_params=['name'],
        path_params=['name'],
        query_params=['requestId'],
        relative_path='v2/{+name}',
        request_field='',
        request_type_name='StorageProjectsBucketsSnapshotsDeleteRequest',
        response_type_name='Empty',
        supports_download=False,
    )

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

      Args:
        request: (StorageProjectsBucketsSnapshotsGetRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (Snapshot) 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='v2/projects/{projectsId}/buckets/{bucketsId}/snapshots/{snapshotsId}',
        http_method='GET',
        method_id='storage.projects.buckets.snapshots.get',
        ordered_params=['name'],
        path_params=['name'],
        query_params=['requestId'],
        relative_path='v2/{+name}',
        request_field='',
        request_type_name='StorageProjectsBucketsSnapshotsGetRequest',
        response_type_name='Snapshot',
        supports_download=False,
    )

    def List(self, request, global_params=None):
      r"""Lists the snapshots of a bucket.

      Args:
        request: (StorageProjectsBucketsSnapshotsListRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (ListSnapshotsResponse) 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='v2/projects/{projectsId}/buckets/{bucketsId}/snapshots',
        http_method='GET',
        method_id='storage.projects.buckets.snapshots.list',
        ordered_params=['parent'],
        path_params=['parent'],
        query_params=['pageSize', 'pageToken', 'requestId'],
        relative_path='v2/{+parent}/snapshots',
        request_field='',
        request_type_name='StorageProjectsBucketsSnapshotsListRequest',
        response_type_name='ListSnapshotsResponse',
        supports_download=False,
    )

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

      Args:
        request: (StorageProjectsBucketsSnapshotsPatchRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (Snapshot) 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='v2/projects/{projectsId}/buckets/{bucketsId}/snapshots/{snapshotsId}',
        http_method='PATCH',
        method_id='storage.projects.buckets.snapshots.patch',
        ordered_params=['name'],
        path_params=['name'],
        query_params=['requestId', 'updateMask'],
        relative_path='v2/{+name}',
        request_field='snapshot',
        request_type_name='StorageProjectsBucketsSnapshotsPatchRequest',
        response_type_name='Snapshot',
        supports_download=False,
    )

  class ProjectsBucketsService(base_api.BaseApiService):
    """Service class for the projects_buckets resource."""

    _NAME = 'projects_buckets'

    def __init__(self, client):
      super(StorageV2.ProjectsBucketsService, self).__init__(client)
      self._upload_configs = {
          }

    def GetReplicationStatus(self, request, global_params=None):
      r"""Returns the replication status for a given dual-region bucket.

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

    GetReplicationStatus.method_config = lambda: base_api.ApiMethodInfo(
        flat_path='v2/projects/{projectsId}/buckets/{bucketsId}/replicationStatus',
        http_method='GET',
        method_id='storage.projects.buckets.getReplicationStatus',
        ordered_params=['name'],
        path_params=['name'],
        query_params=['requestId'],
        relative_path='v2/{+name}/replicationStatus',
        request_field='',
        request_type_name='StorageProjectsBucketsGetReplicationStatusRequest',
        response_type_name='ReplicationStatus',
        supports_download=False,
    )

    def GetStorageLayout(self, request, global_params=None):
      r"""Returns the storage layout configuration for a given bucket.

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

    GetStorageLayout.method_config = lambda: base_api.ApiMethodInfo(
        flat_path='v2/projects/{projectsId}/buckets/{bucketsId}/storageLayout',
        http_method='GET',
        method_id='storage.projects.buckets.getStorageLayout',
        ordered_params=['name'],
        path_params=['name'],
        query_params=['prefix', 'requestId'],
        relative_path='v2/{+name}',
        request_field='',
        request_type_name='StorageProjectsBucketsGetStorageLayoutRequest',
        response_type_name='StorageLayout',
        supports_download=False,
    )

  class ProjectsLocationsIntelligenceFindingsRevisionsService(base_api.BaseApiService):
    """Service class for the projects_locations_intelligenceFindings_revisions resource."""

    _NAME = 'projects_locations_intelligenceFindings_revisions'

    def __init__(self, client):
      super(StorageV2.ProjectsLocationsIntelligenceFindingsRevisionsService, self).__init__(client)
      self._upload_configs = {
          }

    def Get(self, request, global_params=None):
      r"""Gets the `IntelligenceFindingRevision` resource.

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

    def List(self, request, global_params=None):
      r"""Lists all the revisions of an `IntelligenceFinding` resource.

      Args:
        request: (StorageProjectsLocationsIntelligenceFindingsRevisionsListRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (ListIntelligenceFindingRevisionsResponse) 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='v2/projects/{projectsId}/locations/{locationsId}/intelligenceFindings/{intelligenceFindingsId}/revisions',
        http_method='GET',
        method_id='storage.projects.locations.intelligenceFindings.revisions.list',
        ordered_params=['parent'],
        path_params=['parent'],
        query_params=['pageSize', 'pageToken'],
        relative_path='v2/{+parent}/revisions',
        request_field='',
        request_type_name='StorageProjectsLocationsIntelligenceFindingsRevisionsListRequest',
        response_type_name='ListIntelligenceFindingRevisionsResponse',
        supports_download=False,
    )

  class ProjectsLocationsIntelligenceFindingsService(base_api.BaseApiService):
    """Service class for the projects_locations_intelligenceFindings resource."""

    _NAME = 'projects_locations_intelligenceFindings'

    def __init__(self, client):
      super(StorageV2.ProjectsLocationsIntelligenceFindingsService, self).__init__(client)
      self._upload_configs = {
          }

    def Get(self, request, global_params=None):
      r"""Gets the `IntelligenceFinding` for a project.

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

    def List(self, request, global_params=None):
      r"""Lists the `IntelligenceFinding` resources for the specified the project.

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

    def Summarize(self, request, global_params=None):
      r"""Summarize the intelligence findings for the specified scope(org, folder or project).

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

    Summarize.method_config = lambda: base_api.ApiMethodInfo(
        flat_path='v2/projects/{projectsId}/locations/{locationsId}/intelligenceFindings:summarize',
        http_method='GET',
        method_id='storage.projects.locations.intelligenceFindings.summarize',
        ordered_params=['parent'],
        path_params=['parent'],
        query_params=['filter', 'pageSize', 'pageToken', 'resourceScope'],
        relative_path='v2/{+parent}/intelligenceFindings:summarize',
        request_field='',
        request_type_name='StorageProjectsLocationsIntelligenceFindingsSummarizeRequest',
        response_type_name='SummarizeIntelligenceFindingsResponse',
        supports_download=False,
    )

  class ProjectsLocationsObjectIndexesService(base_api.BaseApiService):
    """Service class for the projects_locations_objectIndexes resource."""

    _NAME = 'projects_locations_objectIndexes'

    def __init__(self, client):
      super(StorageV2.ProjectsLocationsObjectIndexesService, self).__init__(client)
      self._upload_configs = {
          }

    def Create(self, request, global_params=None):
      r"""Creates a new ObjectIndex in a given project and location.

      Args:
        request: (StorageProjectsLocationsObjectIndexesCreateRequest) 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='v2/projects/{projectsId}/locations/{locationsId}/objectIndexes',
        http_method='POST',
        method_id='storage.projects.locations.objectIndexes.create',
        ordered_params=['parent'],
        path_params=['parent'],
        query_params=['objectIndexId', 'requestId'],
        relative_path='v2/{+parent}/objectIndexes',
        request_field='objectIndex',
        request_type_name='StorageProjectsLocationsObjectIndexesCreateRequest',
        response_type_name='Operation',
        supports_download=False,
    )

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

      Args:
        request: (StorageProjectsLocationsObjectIndexesDeleteRequest) 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='v2/projects/{projectsId}/locations/{locationsId}/objectIndexes/{objectIndexesId}',
        http_method='DELETE',
        method_id='storage.projects.locations.objectIndexes.delete',
        ordered_params=['name'],
        path_params=['name'],
        query_params=[],
        relative_path='v2/{+name}',
        request_field='',
        request_type_name='StorageProjectsLocationsObjectIndexesDeleteRequest',
        response_type_name='Operation',
        supports_download=False,
    )

    def Get(self, request, global_params=None):
      r"""Gets details of a single ObjectIndex.

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

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

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

    def Patch(self, request, global_params=None):
      r"""Updates the parameters of a single ObjectIndex.

      Args:
        request: (StorageProjectsLocationsObjectIndexesPatchRequest) 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='v2/projects/{projectsId}/locations/{locationsId}/objectIndexes/{objectIndexesId}',
        http_method='PATCH',
        method_id='storage.projects.locations.objectIndexes.patch',
        ordered_params=['name'],
        path_params=['name'],
        query_params=['requestId', 'updateMask'],
        relative_path='v2/{+name}',
        request_field='objectIndex',
        request_type_name='StorageProjectsLocationsObjectIndexesPatchRequest',
        response_type_name='Operation',
        supports_download=False,
    )

    def Search(self, request, global_params=None):
      r"""Searches the specified ObjectIndex.

      Args:
        request: (StorageProjectsLocationsObjectIndexesSearchRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (SearchObjectIndexResponse) 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='v2/projects/{projectsId}/locations/{locationsId}/objectIndexes/{objectIndexesId}:search',
        http_method='GET',
        method_id='storage.projects.locations.objectIndexes.search',
        ordered_params=['name'],
        path_params=['name'],
        query_params=['filter', 'pageSize', 'pageToken', 'textQuery'],
        relative_path='v2/{+name}:search',
        request_field='',
        request_type_name='StorageProjectsLocationsObjectIndexesSearchRequest',
        response_type_name='SearchObjectIndexResponse',
        supports_download=False,
    )

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

    _NAME = 'projects_locations'

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

    def GetIntelligenceConfig(self, request, global_params=None):
      r"""Returns the Project scoped singleton IntelligenceConfig resource.

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

    GetIntelligenceConfig.method_config = lambda: base_api.ApiMethodInfo(
        flat_path='v2/projects/{projectsId}/locations/{locationsId}/intelligenceConfig',
        http_method='GET',
        method_id='storage.projects.locations.getIntelligenceConfig',
        ordered_params=['name'],
        path_params=['name'],
        query_params=[],
        relative_path='v2/{+name}',
        request_field='',
        request_type_name='StorageProjectsLocationsGetIntelligenceConfigRequest',
        response_type_name='IntelligenceConfig',
        supports_download=False,
    )

    def GetManagementHub(self, request, global_params=None):
      r"""Gets the `ManagementHub` resource associated with your project. **IAM Permissions**: Requires `storage.managementHubs.get` [IAM](https://cloud.google.com/iam/docs/overview#permissions) permission on the project.

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

    GetManagementHub.method_config = lambda: base_api.ApiMethodInfo(
        flat_path='v2/projects/{projectsId}/locations/{locationsId}/managementHub',
        http_method='GET',
        method_id='storage.projects.locations.getManagementHub',
        ordered_params=['name'],
        path_params=['name'],
        query_params=[],
        relative_path='v2/{+name}',
        request_field='',
        request_type_name='StorageProjectsLocationsGetManagementHubRequest',
        response_type_name='ManagementHub',
        supports_download=False,
    )

    def UpdateIntelligenceConfig(self, request, global_params=None):
      r"""Updates the Project scoped singleton IntelligenceConfig resource.

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

    UpdateIntelligenceConfig.method_config = lambda: base_api.ApiMethodInfo(
        flat_path='v2/projects/{projectsId}/locations/{locationsId}/intelligenceConfig',
        http_method='PATCH',
        method_id='storage.projects.locations.updateIntelligenceConfig',
        ordered_params=['name'],
        path_params=['name'],
        query_params=['requestId', 'updateMask'],
        relative_path='v2/{+name}',
        request_field='intelligenceConfig',
        request_type_name='StorageProjectsLocationsUpdateIntelligenceConfigRequest',
        response_type_name='IntelligenceConfig',
        supports_download=False,
    )

    def UpdateManagementHub(self, request, global_params=None):
      r"""Updates the `ManagementHub` resource associated with your project. **IAM Permissions**: Requires `storage.managementHubs.update` [IAM](https://cloud.google.com/iam/docs/overview#permissions) permission on the project.

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

    UpdateManagementHub.method_config = lambda: base_api.ApiMethodInfo(
        flat_path='v2/projects/{projectsId}/locations/{locationsId}/managementHub',
        http_method='PATCH',
        method_id='storage.projects.locations.updateManagementHub',
        ordered_params=['name'],
        path_params=['name'],
        query_params=['requestId', 'updateMask'],
        relative_path='v2/{+name}',
        request_field='managementHub',
        request_type_name='StorageProjectsLocationsUpdateManagementHubRequest',
        response_type_name='ManagementHub',
        supports_download=False,
    )

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

    _NAME = 'projects'

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