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

from __future__ import absolute_import

from apitools.base.py import base_api
from googlecloudsdk.third_party.apis.policysimulator.v1beta1 import policysimulator_v1beta1_messages as messages


class PolicysimulatorV1beta1(base_api.BaseApiClient):
  """Generated client library for service policysimulator version v1beta1."""

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

  _PACKAGE = 'policysimulator'
  _SCOPES = ['https://www.googleapis.com/auth/cloud-platform']
  _VERSION = 'v1beta1'
  _CLIENT_ID = 'CLIENT_ID'
  _CLIENT_SECRET = 'CLIENT_SECRET'
  _USER_AGENT = 'google-cloud-sdk'
  _CLIENT_CLASS_NAME = 'PolicysimulatorV1beta1'
  _URL_VERSION = 'v1beta1'
  _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 policysimulator handle."""
    url = url or self.BASE_URL
    super(PolicysimulatorV1beta1, 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_replays_results = self.FoldersLocationsReplaysResultsService(self)
    self.folders_locations_replays = self.FoldersLocationsReplaysService(self)
    self.folders_locations = self.FoldersLocationsService(self)
    self.folders = self.FoldersService(self)
    self.operations = self.OperationsService(self)
    self.organizations_locations_replays_results = self.OrganizationsLocationsReplaysResultsService(self)
    self.organizations_locations_replays = self.OrganizationsLocationsReplaysService(self)
    self.organizations_locations = self.OrganizationsLocationsService(self)
    self.organizations = self.OrganizationsService(self)
    self.projects_locations_replays_results = self.ProjectsLocationsReplaysResultsService(self)
    self.projects_locations_replays = self.ProjectsLocationsReplaysService(self)
    self.projects_locations = self.ProjectsLocationsService(self)
    self.projects = self.ProjectsService(self)

  class FoldersLocationsReplaysResultsService(base_api.BaseApiService):
    """Service class for the folders_locations_replays_results resource."""

    _NAME = 'folders_locations_replays_results'

    def __init__(self, client):
      super(PolicysimulatorV1beta1.FoldersLocationsReplaysResultsService, self).__init__(client)
      self._upload_configs = {
          }

    def List(self, request, global_params=None):
      r"""Lists the results of running a Replay.

      Args:
        request: (PolicysimulatorFoldersLocationsReplaysResultsListRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudPolicysimulatorV1beta1ListReplayResultsResponse) 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='v1beta1/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}/results',
        http_method='GET',
        method_id='policysimulator.folders.locations.replays.results.list',
        ordered_params=['parent'],
        path_params=['parent'],
        query_params=['pageSize', 'pageToken'],
        relative_path='v1beta1/{+parent}/results',
        request_field='',
        request_type_name='PolicysimulatorFoldersLocationsReplaysResultsListRequest',
        response_type_name='GoogleCloudPolicysimulatorV1beta1ListReplayResultsResponse',
        supports_download=False,
    )

  class FoldersLocationsReplaysService(base_api.BaseApiService):
    """Service class for the folders_locations_replays resource."""

    _NAME = 'folders_locations_replays'

    def __init__(self, client):
      super(PolicysimulatorV1beta1.FoldersLocationsReplaysService, self).__init__(client)
      self._upload_configs = {
          }

    def Create(self, request, global_params=None):
      r"""Creates and starts a Replay using the given ReplayConfig.

      Args:
        request: (PolicysimulatorFoldersLocationsReplaysCreateRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleLongrunningOperation) 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='v1beta1/folders/{foldersId}/locations/{locationsId}/replays',
        http_method='POST',
        method_id='policysimulator.folders.locations.replays.create',
        ordered_params=['parent'],
        path_params=['parent'],
        query_params=[],
        relative_path='v1beta1/{+parent}/replays',
        request_field='googleCloudPolicysimulatorV1beta1Replay',
        request_type_name='PolicysimulatorFoldersLocationsReplaysCreateRequest',
        response_type_name='GoogleLongrunningOperation',
        supports_download=False,
    )

    def Get(self, request, global_params=None):
      r"""Gets the specified Replay. Each `Replay` is available for at least 7 days.

      Args:
        request: (PolicysimulatorFoldersLocationsReplaysGetRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudPolicysimulatorV1beta1Replay) 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='v1beta1/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}',
        http_method='GET',
        method_id='policysimulator.folders.locations.replays.get',
        ordered_params=['name'],
        path_params=['name'],
        query_params=[],
        relative_path='v1beta1/{+name}',
        request_field='',
        request_type_name='PolicysimulatorFoldersLocationsReplaysGetRequest',
        response_type_name='GoogleCloudPolicysimulatorV1beta1Replay',
        supports_download=False,
    )

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

    _NAME = 'folders_locations'

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

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

    _NAME = 'folders'

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

  class OperationsService(base_api.BaseApiService):
    """Service class for the operations resource."""

    _NAME = 'operations'

    def __init__(self, client):
      super(PolicysimulatorV1beta1.OperationsService, self).__init__(client)
      self._upload_configs = {
          }

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

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

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

    def List(self, request, global_params=None):
      r"""Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `"/v1/{name=users/*}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.

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

    List.method_config = lambda: base_api.ApiMethodInfo(
        http_method='GET',
        method_id='policysimulator.operations.list',
        ordered_params=[],
        path_params=[],
        query_params=['filter', 'name', 'pageSize', 'pageToken'],
        relative_path='v1beta1/operations',
        request_field='',
        request_type_name='PolicysimulatorOperationsListRequest',
        response_type_name='GoogleLongrunningListOperationsResponse',
        supports_download=False,
    )

  class OrganizationsLocationsReplaysResultsService(base_api.BaseApiService):
    """Service class for the organizations_locations_replays_results resource."""

    _NAME = 'organizations_locations_replays_results'

    def __init__(self, client):
      super(PolicysimulatorV1beta1.OrganizationsLocationsReplaysResultsService, self).__init__(client)
      self._upload_configs = {
          }

    def List(self, request, global_params=None):
      r"""Lists the results of running a Replay.

      Args:
        request: (PolicysimulatorOrganizationsLocationsReplaysResultsListRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudPolicysimulatorV1beta1ListReplayResultsResponse) 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='v1beta1/organizations/{organizationsId}/locations/{locationsId}/replays/{replaysId}/results',
        http_method='GET',
        method_id='policysimulator.organizations.locations.replays.results.list',
        ordered_params=['parent'],
        path_params=['parent'],
        query_params=['pageSize', 'pageToken'],
        relative_path='v1beta1/{+parent}/results',
        request_field='',
        request_type_name='PolicysimulatorOrganizationsLocationsReplaysResultsListRequest',
        response_type_name='GoogleCloudPolicysimulatorV1beta1ListReplayResultsResponse',
        supports_download=False,
    )

  class OrganizationsLocationsReplaysService(base_api.BaseApiService):
    """Service class for the organizations_locations_replays resource."""

    _NAME = 'organizations_locations_replays'

    def __init__(self, client):
      super(PolicysimulatorV1beta1.OrganizationsLocationsReplaysService, self).__init__(client)
      self._upload_configs = {
          }

    def Create(self, request, global_params=None):
      r"""Creates and starts a Replay using the given ReplayConfig.

      Args:
        request: (PolicysimulatorOrganizationsLocationsReplaysCreateRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleLongrunningOperation) 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='v1beta1/organizations/{organizationsId}/locations/{locationsId}/replays',
        http_method='POST',
        method_id='policysimulator.organizations.locations.replays.create',
        ordered_params=['parent'],
        path_params=['parent'],
        query_params=[],
        relative_path='v1beta1/{+parent}/replays',
        request_field='googleCloudPolicysimulatorV1beta1Replay',
        request_type_name='PolicysimulatorOrganizationsLocationsReplaysCreateRequest',
        response_type_name='GoogleLongrunningOperation',
        supports_download=False,
    )

    def Get(self, request, global_params=None):
      r"""Gets the specified Replay. Each `Replay` is available for at least 7 days.

      Args:
        request: (PolicysimulatorOrganizationsLocationsReplaysGetRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleCloudPolicysimulatorV1beta1Replay) 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='v1beta1/organizations/{organizationsId}/locations/{locationsId}/replays/{replaysId}',
        http_method='GET',
        method_id='policysimulator.organizations.locations.replays.get',
        ordered_params=['name'],
        path_params=['name'],
        query_params=[],
        relative_path='v1beta1/{+name}',
        request_field='',
        request_type_name='PolicysimulatorOrganizationsLocationsReplaysGetRequest',
        response_type_name='GoogleCloudPolicysimulatorV1beta1Replay',
        supports_download=False,
    )

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

    _NAME = 'organizations_locations'

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

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

    _NAME = 'organizations'

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

  class ProjectsLocationsReplaysResultsService(base_api.BaseApiService):
    """Service class for the projects_locations_replays_results resource."""

    _NAME = 'projects_locations_replays_results'

    def __init__(self, client):
      super(PolicysimulatorV1beta1.ProjectsLocationsReplaysResultsService, self).__init__(client)
      self._upload_configs = {
          }

    def List(self, request, global_params=None):
      r"""Lists the results of running a Replay.

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

  class ProjectsLocationsReplaysService(base_api.BaseApiService):
    """Service class for the projects_locations_replays resource."""

    _NAME = 'projects_locations_replays'

    def __init__(self, client):
      super(PolicysimulatorV1beta1.ProjectsLocationsReplaysService, self).__init__(client)
      self._upload_configs = {
          }

    def Create(self, request, global_params=None):
      r"""Creates and starts a Replay using the given ReplayConfig.

      Args:
        request: (PolicysimulatorProjectsLocationsReplaysCreateRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleLongrunningOperation) 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='v1beta1/projects/{projectsId}/locations/{locationsId}/replays',
        http_method='POST',
        method_id='policysimulator.projects.locations.replays.create',
        ordered_params=['parent'],
        path_params=['parent'],
        query_params=[],
        relative_path='v1beta1/{+parent}/replays',
        request_field='googleCloudPolicysimulatorV1beta1Replay',
        request_type_name='PolicysimulatorProjectsLocationsReplaysCreateRequest',
        response_type_name='GoogleLongrunningOperation',
        supports_download=False,
    )

    def Get(self, request, global_params=None):
      r"""Gets the specified Replay. Each `Replay` is available for at least 7 days.

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

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

    _NAME = 'projects_locations'

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

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

    _NAME = 'projects'

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