"""Generated client library for gameservices version v1."""
# 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.gameservices.v1 import gameservices_v1_messages as messages


class GameservicesV1(base_api.BaseApiClient):
  """Generated client library for service gameservices version v1."""

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

  _PACKAGE = 'gameservices'
  _SCOPES = ['https://www.googleapis.com/auth/cloud-platform']
  _VERSION = 'v1'
  _CLIENT_ID = '1042881264118.apps.googleusercontent.com'
  _CLIENT_SECRET = 'x_Tw5K8nnjoRAqULM9PFAC2b'
  _USER_AGENT = 'google-cloud-sdk'
  _CLIENT_CLASS_NAME = 'GameservicesV1'
  _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 gameservices handle."""
    url = url or self.BASE_URL
    super(GameservicesV1, 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_gameServerDeployments_configs = self.ProjectsLocationsGameServerDeploymentsConfigsService(self)
    self.projects_locations_gameServerDeployments = self.ProjectsLocationsGameServerDeploymentsService(self)
    self.projects_locations_operations = self.ProjectsLocationsOperationsService(self)
    self.projects_locations_realms_gameServerClusters = self.ProjectsLocationsRealmsGameServerClustersService(self)
    self.projects_locations_realms = self.ProjectsLocationsRealmsService(self)
    self.projects_locations = self.ProjectsLocationsService(self)
    self.projects = self.ProjectsService(self)

  class ProjectsLocationsGameServerDeploymentsConfigsService(base_api.BaseApiService):
    """Service class for the projects_locations_gameServerDeployments_configs resource."""

    _NAME = 'projects_locations_gameServerDeployments_configs'

    def __init__(self, client):
      super(GameservicesV1.ProjectsLocationsGameServerDeploymentsConfigsService, self).__init__(client)
      self._upload_configs = {
          }

    def Create(self, request, global_params=None):
      r"""Creates a new game server config in a given project, location, and game server deployment. Game server configs are immutable, and are not applied until referenced in the game server deployment rollout resource.

      Args:
        request: (GameservicesProjectsLocationsGameServerDeploymentsConfigsCreateRequest) 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}/gameServerDeployments/{gameServerDeploymentsId}/configs',
        http_method='POST',
        method_id='gameservices.projects.locations.gameServerDeployments.configs.create',
        ordered_params=['parent'],
        path_params=['parent'],
        query_params=['configId'],
        relative_path='v1/{+parent}/configs',
        request_field='gameServerConfig',
        request_type_name='GameservicesProjectsLocationsGameServerDeploymentsConfigsCreateRequest',
        response_type_name='Operation',
        supports_download=False,
    )

    def Delete(self, request, global_params=None):
      r"""Deletes a single game server config. The deletion will fail if the game server config is referenced in a game server deployment rollout.

      Args:
        request: (GameservicesProjectsLocationsGameServerDeploymentsConfigsDeleteRequest) 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}/gameServerDeployments/{gameServerDeploymentsId}/configs/{configsId}',
        http_method='DELETE',
        method_id='gameservices.projects.locations.gameServerDeployments.configs.delete',
        ordered_params=['name'],
        path_params=['name'],
        query_params=[],
        relative_path='v1/{+name}',
        request_field='',
        request_type_name='GameservicesProjectsLocationsGameServerDeploymentsConfigsDeleteRequest',
        response_type_name='Operation',
        supports_download=False,
    )

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

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

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

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

  class ProjectsLocationsGameServerDeploymentsService(base_api.BaseApiService):
    """Service class for the projects_locations_gameServerDeployments resource."""

    _NAME = 'projects_locations_gameServerDeployments'

    def __init__(self, client):
      super(GameservicesV1.ProjectsLocationsGameServerDeploymentsService, self).__init__(client)
      self._upload_configs = {
          }

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

      Args:
        request: (GameservicesProjectsLocationsGameServerDeploymentsCreateRequest) 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}/gameServerDeployments',
        http_method='POST',
        method_id='gameservices.projects.locations.gameServerDeployments.create',
        ordered_params=['parent'],
        path_params=['parent'],
        query_params=['deploymentId'],
        relative_path='v1/{+parent}/gameServerDeployments',
        request_field='gameServerDeployment',
        request_type_name='GameservicesProjectsLocationsGameServerDeploymentsCreateRequest',
        response_type_name='Operation',
        supports_download=False,
    )

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

      Args:
        request: (GameservicesProjectsLocationsGameServerDeploymentsDeleteRequest) 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}/gameServerDeployments/{gameServerDeploymentsId}',
        http_method='DELETE',
        method_id='gameservices.projects.locations.gameServerDeployments.delete',
        ordered_params=['name'],
        path_params=['name'],
        query_params=[],
        relative_path='v1/{+name}',
        request_field='',
        request_type_name='GameservicesProjectsLocationsGameServerDeploymentsDeleteRequest',
        response_type_name='Operation',
        supports_download=False,
    )

    def FetchDeploymentState(self, request, global_params=None):
      r"""Retrieves information about the current state of the game server deployment. Gathers all the Agones fleets and Agones autoscalers, including fleets running an older version of the game server deployment.

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

    FetchDeploymentState.method_config = lambda: base_api.ApiMethodInfo(
        flat_path='v1/projects/{projectsId}/locations/{locationsId}/gameServerDeployments/{gameServerDeploymentsId}:fetchDeploymentState',
        http_method='POST',
        method_id='gameservices.projects.locations.gameServerDeployments.fetchDeploymentState',
        ordered_params=['name'],
        path_params=['name'],
        query_params=[],
        relative_path='v1/{+name}:fetchDeploymentState',
        request_field='fetchDeploymentStateRequest',
        request_type_name='GameservicesProjectsLocationsGameServerDeploymentsFetchDeploymentStateRequest',
        response_type_name='FetchDeploymentStateResponse',
        supports_download=False,
    )

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

      Args:
        request: (GameservicesProjectsLocationsGameServerDeploymentsGetRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GameServerDeployment) 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}/gameServerDeployments/{gameServerDeploymentsId}',
        http_method='GET',
        method_id='gameservices.projects.locations.gameServerDeployments.get',
        ordered_params=['name'],
        path_params=['name'],
        query_params=[],
        relative_path='v1/{+name}',
        request_field='',
        request_type_name='GameservicesProjectsLocationsGameServerDeploymentsGetRequest',
        response_type_name='GameServerDeployment',
        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: (GameservicesProjectsLocationsGameServerDeploymentsGetIamPolicyRequest) 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}/gameServerDeployments/{gameServerDeploymentsId}:getIamPolicy',
        http_method='GET',
        method_id='gameservices.projects.locations.gameServerDeployments.getIamPolicy',
        ordered_params=['resource'],
        path_params=['resource'],
        query_params=['options_requestedPolicyVersion'],
        relative_path='v1/{+resource}:getIamPolicy',
        request_field='',
        request_type_name='GameservicesProjectsLocationsGameServerDeploymentsGetIamPolicyRequest',
        response_type_name='Policy',
        supports_download=False,
    )

    def GetRollout(self, request, global_params=None):
      r"""Gets details a single game server deployment rollout.

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

    GetRollout.method_config = lambda: base_api.ApiMethodInfo(
        flat_path='v1/projects/{projectsId}/locations/{locationsId}/gameServerDeployments/{gameServerDeploymentsId}/rollout',
        http_method='GET',
        method_id='gameservices.projects.locations.gameServerDeployments.getRollout',
        ordered_params=['name'],
        path_params=['name'],
        query_params=[],
        relative_path='v1/{+name}/rollout',
        request_field='',
        request_type_name='GameservicesProjectsLocationsGameServerDeploymentsGetRolloutRequest',
        response_type_name='GameServerDeploymentRollout',
        supports_download=False,
    )

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

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

    def Patch(self, request, global_params=None):
      r"""Patches a game server deployment.

      Args:
        request: (GameservicesProjectsLocationsGameServerDeploymentsPatchRequest) 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}/gameServerDeployments/{gameServerDeploymentsId}',
        http_method='PATCH',
        method_id='gameservices.projects.locations.gameServerDeployments.patch',
        ordered_params=['name'],
        path_params=['name'],
        query_params=['updateMask'],
        relative_path='v1/{+name}',
        request_field='gameServerDeployment',
        request_type_name='GameservicesProjectsLocationsGameServerDeploymentsPatchRequest',
        response_type_name='Operation',
        supports_download=False,
    )

    def PreviewRollout(self, request, global_params=None):
      r"""Previews the game server deployment rollout. This API does not mutate the rollout resource.

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

    PreviewRollout.method_config = lambda: base_api.ApiMethodInfo(
        flat_path='v1/projects/{projectsId}/locations/{locationsId}/gameServerDeployments/{gameServerDeploymentsId}/rollout:preview',
        http_method='PATCH',
        method_id='gameservices.projects.locations.gameServerDeployments.previewRollout',
        ordered_params=['name'],
        path_params=['name'],
        query_params=['previewTime', 'updateMask'],
        relative_path='v1/{+name}/rollout:preview',
        request_field='gameServerDeploymentRollout',
        request_type_name='GameservicesProjectsLocationsGameServerDeploymentsPreviewRolloutRequest',
        response_type_name='PreviewGameServerDeploymentRolloutResponse',
        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: (GameservicesProjectsLocationsGameServerDeploymentsSetIamPolicyRequest) 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}/gameServerDeployments/{gameServerDeploymentsId}:setIamPolicy',
        http_method='POST',
        method_id='gameservices.projects.locations.gameServerDeployments.setIamPolicy',
        ordered_params=['resource'],
        path_params=['resource'],
        query_params=[],
        relative_path='v1/{+resource}:setIamPolicy',
        request_field='setIamPolicyRequest',
        request_type_name='GameservicesProjectsLocationsGameServerDeploymentsSetIamPolicyRequest',
        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: (GameservicesProjectsLocationsGameServerDeploymentsTestIamPermissionsRequest) 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}/gameServerDeployments/{gameServerDeploymentsId}:testIamPermissions',
        http_method='POST',
        method_id='gameservices.projects.locations.gameServerDeployments.testIamPermissions',
        ordered_params=['resource'],
        path_params=['resource'],
        query_params=[],
        relative_path='v1/{+resource}:testIamPermissions',
        request_field='testIamPermissionsRequest',
        request_type_name='GameservicesProjectsLocationsGameServerDeploymentsTestIamPermissionsRequest',
        response_type_name='TestIamPermissionsResponse',
        supports_download=False,
    )

    def UpdateRollout(self, request, global_params=None):
      r"""Patches a single game server deployment rollout. The method will not return an error if the update does not affect any existing realms. For example - if the default_game_server_config is changed but all existing realms use the override, that is valid. Similarly, if a non existing realm is explicitly called out in game_server_config_overrides field, that will also not result in an error.

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

    UpdateRollout.method_config = lambda: base_api.ApiMethodInfo(
        flat_path='v1/projects/{projectsId}/locations/{locationsId}/gameServerDeployments/{gameServerDeploymentsId}/rollout',
        http_method='PATCH',
        method_id='gameservices.projects.locations.gameServerDeployments.updateRollout',
        ordered_params=['name'],
        path_params=['name'],
        query_params=['updateMask'],
        relative_path='v1/{+name}/rollout',
        request_field='gameServerDeploymentRollout',
        request_type_name='GameservicesProjectsLocationsGameServerDeploymentsUpdateRolloutRequest',
        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(GameservicesV1.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: (GameservicesProjectsLocationsOperationsCancelRequest) 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='gameservices.projects.locations.operations.cancel',
        ordered_params=['name'],
        path_params=['name'],
        query_params=[],
        relative_path='v1/{+name}:cancel',
        request_field='cancelOperationRequest',
        request_type_name='GameservicesProjectsLocationsOperationsCancelRequest',
        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: (GameservicesProjectsLocationsOperationsDeleteRequest) 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='gameservices.projects.locations.operations.delete',
        ordered_params=['name'],
        path_params=['name'],
        query_params=[],
        relative_path='v1/{+name}',
        request_field='',
        request_type_name='GameservicesProjectsLocationsOperationsDeleteRequest',
        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: (GameservicesProjectsLocationsOperationsGetRequest) 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='gameservices.projects.locations.operations.get',
        ordered_params=['name'],
        path_params=['name'],
        query_params=[],
        relative_path='v1/{+name}',
        request_field='',
        request_type_name='GameservicesProjectsLocationsOperationsGetRequest',
        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`. 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: (GameservicesProjectsLocationsOperationsListRequest) 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='gameservices.projects.locations.operations.list',
        ordered_params=['name'],
        path_params=['name'],
        query_params=['filter', 'pageSize', 'pageToken'],
        relative_path='v1/{+name}/operations',
        request_field='',
        request_type_name='GameservicesProjectsLocationsOperationsListRequest',
        response_type_name='ListOperationsResponse',
        supports_download=False,
    )

  class ProjectsLocationsRealmsGameServerClustersService(base_api.BaseApiService):
    """Service class for the projects_locations_realms_gameServerClusters resource."""

    _NAME = 'projects_locations_realms_gameServerClusters'

    def __init__(self, client):
      super(GameservicesV1.ProjectsLocationsRealmsGameServerClustersService, self).__init__(client)
      self._upload_configs = {
          }

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

      Args:
        request: (GameservicesProjectsLocationsRealmsGameServerClustersCreateRequest) 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}/realms/{realmsId}/gameServerClusters',
        http_method='POST',
        method_id='gameservices.projects.locations.realms.gameServerClusters.create',
        ordered_params=['parent'],
        path_params=['parent'],
        query_params=['gameServerClusterId'],
        relative_path='v1/{+parent}/gameServerClusters',
        request_field='gameServerCluster',
        request_type_name='GameservicesProjectsLocationsRealmsGameServerClustersCreateRequest',
        response_type_name='Operation',
        supports_download=False,
    )

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

      Args:
        request: (GameservicesProjectsLocationsRealmsGameServerClustersDeleteRequest) 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}/realms/{realmsId}/gameServerClusters/{gameServerClustersId}',
        http_method='DELETE',
        method_id='gameservices.projects.locations.realms.gameServerClusters.delete',
        ordered_params=['name'],
        path_params=['name'],
        query_params=[],
        relative_path='v1/{+name}',
        request_field='',
        request_type_name='GameservicesProjectsLocationsRealmsGameServerClustersDeleteRequest',
        response_type_name='Operation',
        supports_download=False,
    )

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

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

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

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

    def Patch(self, request, global_params=None):
      r"""Patches a single game server cluster.

      Args:
        request: (GameservicesProjectsLocationsRealmsGameServerClustersPatchRequest) 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}/realms/{realmsId}/gameServerClusters/{gameServerClustersId}',
        http_method='PATCH',
        method_id='gameservices.projects.locations.realms.gameServerClusters.patch',
        ordered_params=['name'],
        path_params=['name'],
        query_params=['updateMask'],
        relative_path='v1/{+name}',
        request_field='gameServerCluster',
        request_type_name='GameservicesProjectsLocationsRealmsGameServerClustersPatchRequest',
        response_type_name='Operation',
        supports_download=False,
    )

    def PreviewCreate(self, request, global_params=None):
      r"""Previews creation of a new game server cluster in a given project and location.

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

    PreviewCreate.method_config = lambda: base_api.ApiMethodInfo(
        flat_path='v1/projects/{projectsId}/locations/{locationsId}/realms/{realmsId}/gameServerClusters:previewCreate',
        http_method='POST',
        method_id='gameservices.projects.locations.realms.gameServerClusters.previewCreate',
        ordered_params=['parent'],
        path_params=['parent'],
        query_params=['gameServerClusterId', 'previewTime'],
        relative_path='v1/{+parent}/gameServerClusters:previewCreate',
        request_field='gameServerCluster',
        request_type_name='GameservicesProjectsLocationsRealmsGameServerClustersPreviewCreateRequest',
        response_type_name='PreviewCreateGameServerClusterResponse',
        supports_download=False,
    )

    def PreviewDelete(self, request, global_params=None):
      r"""Previews deletion of a single game server cluster.

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

    PreviewDelete.method_config = lambda: base_api.ApiMethodInfo(
        flat_path='v1/projects/{projectsId}/locations/{locationsId}/realms/{realmsId}/gameServerClusters/{gameServerClustersId}:previewDelete',
        http_method='DELETE',
        method_id='gameservices.projects.locations.realms.gameServerClusters.previewDelete',
        ordered_params=['name'],
        path_params=['name'],
        query_params=['previewTime'],
        relative_path='v1/{+name}:previewDelete',
        request_field='',
        request_type_name='GameservicesProjectsLocationsRealmsGameServerClustersPreviewDeleteRequest',
        response_type_name='PreviewDeleteGameServerClusterResponse',
        supports_download=False,
    )

    def PreviewUpdate(self, request, global_params=None):
      r"""Previews updating a GameServerCluster.

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

    PreviewUpdate.method_config = lambda: base_api.ApiMethodInfo(
        flat_path='v1/projects/{projectsId}/locations/{locationsId}/realms/{realmsId}/gameServerClusters/{gameServerClustersId}:previewUpdate',
        http_method='PATCH',
        method_id='gameservices.projects.locations.realms.gameServerClusters.previewUpdate',
        ordered_params=['name'],
        path_params=['name'],
        query_params=['previewTime', 'updateMask'],
        relative_path='v1/{+name}:previewUpdate',
        request_field='gameServerCluster',
        request_type_name='GameservicesProjectsLocationsRealmsGameServerClustersPreviewUpdateRequest',
        response_type_name='PreviewUpdateGameServerClusterResponse',
        supports_download=False,
    )

  class ProjectsLocationsRealmsService(base_api.BaseApiService):
    """Service class for the projects_locations_realms resource."""

    _NAME = 'projects_locations_realms'

    def __init__(self, client):
      super(GameservicesV1.ProjectsLocationsRealmsService, self).__init__(client)
      self._upload_configs = {
          }

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

      Args:
        request: (GameservicesProjectsLocationsRealmsCreateRequest) 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}/realms',
        http_method='POST',
        method_id='gameservices.projects.locations.realms.create',
        ordered_params=['parent'],
        path_params=['parent'],
        query_params=['realmId'],
        relative_path='v1/{+parent}/realms',
        request_field='realm',
        request_type_name='GameservicesProjectsLocationsRealmsCreateRequest',
        response_type_name='Operation',
        supports_download=False,
    )

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

      Args:
        request: (GameservicesProjectsLocationsRealmsDeleteRequest) 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}/realms/{realmsId}',
        http_method='DELETE',
        method_id='gameservices.projects.locations.realms.delete',
        ordered_params=['name'],
        path_params=['name'],
        query_params=[],
        relative_path='v1/{+name}',
        request_field='',
        request_type_name='GameservicesProjectsLocationsRealmsDeleteRequest',
        response_type_name='Operation',
        supports_download=False,
    )

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

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

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

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

    def Patch(self, request, global_params=None):
      r"""Patches a single realm.

      Args:
        request: (GameservicesProjectsLocationsRealmsPatchRequest) 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}/realms/{realmsId}',
        http_method='PATCH',
        method_id='gameservices.projects.locations.realms.patch',
        ordered_params=['name'],
        path_params=['name'],
        query_params=['updateMask'],
        relative_path='v1/{+name}',
        request_field='realm',
        request_type_name='GameservicesProjectsLocationsRealmsPatchRequest',
        response_type_name='Operation',
        supports_download=False,
    )

    def PreviewUpdate(self, request, global_params=None):
      r"""Previews patches to a single realm.

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

    PreviewUpdate.method_config = lambda: base_api.ApiMethodInfo(
        flat_path='v1/projects/{projectsId}/locations/{locationsId}/realms/{realmsId}:previewUpdate',
        http_method='PATCH',
        method_id='gameservices.projects.locations.realms.previewUpdate',
        ordered_params=['name'],
        path_params=['name'],
        query_params=['previewTime', 'updateMask'],
        relative_path='v1/{+name}:previewUpdate',
        request_field='realm',
        request_type_name='GameservicesProjectsLocationsRealmsPreviewUpdateRequest',
        response_type_name='PreviewRealmUpdateResponse',
        supports_download=False,
    )

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

    _NAME = 'projects_locations'

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

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

      Args:
        request: (GameservicesProjectsLocationsGetRequest) 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='gameservices.projects.locations.get',
        ordered_params=['name'],
        path_params=['name'],
        query_params=[],
        relative_path='v1/{+name}',
        request_field='',
        request_type_name='GameservicesProjectsLocationsGetRequest',
        response_type_name='Location',
        supports_download=False,
    )

    def List(self, request, global_params=None):
      r"""Lists information about the supported locations for this service.

      Args:
        request: (GameservicesProjectsLocationsListRequest) 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='gameservices.projects.locations.list',
        ordered_params=['name'],
        path_params=['name'],
        query_params=['filter', 'includeUnrevealedLocations', 'pageSize', 'pageToken'],
        relative_path='v1/{+name}/locations',
        request_field='',
        request_type_name='GameservicesProjectsLocationsListRequest',
        response_type_name='ListLocationsResponse',
        supports_download=False,
    )

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

    _NAME = 'projects'

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