"""Generated client library for cloudidentity 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.cloudidentity.v1 import cloudidentity_v1_messages as messages


class CloudidentityV1(base_api.BaseApiClient):
  """Generated client library for service cloudidentity version v1."""

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

  _PACKAGE = 'cloudidentity'
  _SCOPES = ['https://www.googleapis.com/auth/cloud-identity.devices.lookup', 'https://www.googleapis.com/auth/cloud-identity.groups', 'https://www.googleapis.com/auth/cloud-identity.groups.readonly', '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 = 'CloudidentityV1'
  _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 cloudidentity handle."""
    url = url or self.BASE_URL
    super(CloudidentityV1, 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.devices_deviceUsers_clientStates = self.DevicesDeviceUsersClientStatesService(self)
    self.devices_deviceUsers_endpointApps = self.DevicesDeviceUsersEndpointAppsService(self)
    self.devices_deviceUsers = self.DevicesDeviceUsersService(self)
    self.devices = self.DevicesService(self)
    self.groups_memberships = self.GroupsMembershipsService(self)
    self.groups = self.GroupsService(self)

  class DevicesDeviceUsersClientStatesService(base_api.BaseApiService):
    """Service class for the devices_deviceUsers_clientStates resource."""

    _NAME = 'devices_deviceUsers_clientStates'

    def __init__(self, client):
      super(CloudidentityV1.DevicesDeviceUsersClientStatesService, self).__init__(client)
      self._upload_configs = {
          }

    def Get(self, request, global_params=None):
      r"""Gets the client state for the device user.

      Args:
        request: (CloudidentityDevicesDeviceUsersClientStatesGetRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleAppsCloudidentityDevicesV1ClientState) 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/devices/{devicesId}/deviceUsers/{deviceUsersId}/clientStates/{clientStatesId}',
        http_method='GET',
        method_id='cloudidentity.devices.deviceUsers.clientStates.get',
        ordered_params=['name'],
        path_params=['name'],
        query_params=['customer'],
        relative_path='v1/{+name}',
        request_field='',
        request_type_name='CloudidentityDevicesDeviceUsersClientStatesGetRequest',
        response_type_name='GoogleAppsCloudidentityDevicesV1ClientState',
        supports_download=False,
    )

    def List(self, request, global_params=None):
      r"""Lists the client states for the given search query.

      Args:
        request: (CloudidentityDevicesDeviceUsersClientStatesListRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleAppsCloudidentityDevicesV1ListClientStatesResponse) 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/devices/{devicesId}/deviceUsers/{deviceUsersId}/clientStates',
        http_method='GET',
        method_id='cloudidentity.devices.deviceUsers.clientStates.list',
        ordered_params=['parent'],
        path_params=['parent'],
        query_params=['customer', 'filter', 'orderBy', 'pageToken'],
        relative_path='v1/{+parent}/clientStates',
        request_field='',
        request_type_name='CloudidentityDevicesDeviceUsersClientStatesListRequest',
        response_type_name='GoogleAppsCloudidentityDevicesV1ListClientStatesResponse',
        supports_download=False,
    )

    def Patch(self, request, global_params=None):
      r"""Updates the client state for the device user.

      Args:
        request: (CloudidentityDevicesDeviceUsersClientStatesPatchRequest) 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/devices/{devicesId}/deviceUsers/{deviceUsersId}/clientStates/{clientStatesId}',
        http_method='PATCH',
        method_id='cloudidentity.devices.deviceUsers.clientStates.patch',
        ordered_params=['name'],
        path_params=['name'],
        query_params=['customer', 'updateMask'],
        relative_path='v1/{+name}',
        request_field='googleAppsCloudidentityDevicesV1ClientState',
        request_type_name='CloudidentityDevicesDeviceUsersClientStatesPatchRequest',
        response_type_name='Operation',
        supports_download=False,
    )

  class DevicesDeviceUsersEndpointAppsService(base_api.BaseApiService):
    """Service class for the devices_deviceUsers_endpointApps resource."""

    _NAME = 'devices_deviceUsers_endpointApps'

    def __init__(self, client):
      super(CloudidentityV1.DevicesDeviceUsersEndpointAppsService, self).__init__(client)
      self._upload_configs = {
          }

    def List(self, request, global_params=None):
      r"""Lists all managed apps intalled on the device.

      Args:
        request: (CloudidentityDevicesDeviceUsersEndpointAppsListRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (Operation) 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/devices/{devicesId}/deviceUsers/{deviceUsersId}/endpointApps',
        http_method='GET',
        method_id='cloudidentity.devices.deviceUsers.endpointApps.list',
        ordered_params=['parent'],
        path_params=['parent'],
        query_params=['customer', 'orderBy', 'pageSize', 'pageToken'],
        relative_path='v1/{+parent}/endpointApps',
        request_field='',
        request_type_name='CloudidentityDevicesDeviceUsersEndpointAppsListRequest',
        response_type_name='Operation',
        supports_download=False,
    )

  class DevicesDeviceUsersService(base_api.BaseApiService):
    """Service class for the devices_deviceUsers resource."""

    _NAME = 'devices_deviceUsers'

    def __init__(self, client):
      super(CloudidentityV1.DevicesDeviceUsersService, self).__init__(client)
      self._upload_configs = {
          }

    def Approve(self, request, global_params=None):
      r"""Approves device to access user data.

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

    Approve.method_config = lambda: base_api.ApiMethodInfo(
        flat_path='v1/devices/{devicesId}/deviceUsers/{deviceUsersId}:approve',
        http_method='POST',
        method_id='cloudidentity.devices.deviceUsers.approve',
        ordered_params=['name'],
        path_params=['name'],
        query_params=[],
        relative_path='v1/{+name}:approve',
        request_field='googleAppsCloudidentityDevicesV1ApproveDeviceUserRequest',
        request_type_name='CloudidentityDevicesDeviceUsersApproveRequest',
        response_type_name='Operation',
        supports_download=False,
    )

    def Block(self, request, global_params=None):
      r"""Blocks device from accessing user data.

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

    Block.method_config = lambda: base_api.ApiMethodInfo(
        flat_path='v1/devices/{devicesId}/deviceUsers/{deviceUsersId}:block',
        http_method='POST',
        method_id='cloudidentity.devices.deviceUsers.block',
        ordered_params=['name'],
        path_params=['name'],
        query_params=[],
        relative_path='v1/{+name}:block',
        request_field='googleAppsCloudidentityDevicesV1BlockDeviceUserRequest',
        request_type_name='CloudidentityDevicesDeviceUsersBlockRequest',
        response_type_name='Operation',
        supports_download=False,
    )

    def CancelWipe(self, request, global_params=None):
      r"""Cancels an unfinished user account wipe. This operation can be used to cancel device wipe in the gap between the wipe operation returning success and the device being wiped.

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

    CancelWipe.method_config = lambda: base_api.ApiMethodInfo(
        flat_path='v1/devices/{devicesId}/deviceUsers/{deviceUsersId}:cancelWipe',
        http_method='POST',
        method_id='cloudidentity.devices.deviceUsers.cancelWipe',
        ordered_params=['name'],
        path_params=['name'],
        query_params=[],
        relative_path='v1/{+name}:cancelWipe',
        request_field='googleAppsCloudidentityDevicesV1CancelWipeDeviceUserRequest',
        request_type_name='CloudidentityDevicesDeviceUsersCancelWipeRequest',
        response_type_name='Operation',
        supports_download=False,
    )

    def CollectBugReport(self, request, global_params=None):
      r"""Collects bug report on the specified device, which can be later downloaded from [Admin Console](https://admin.google.com).

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

    CollectBugReport.method_config = lambda: base_api.ApiMethodInfo(
        flat_path='v1/devices/{devicesId}/deviceUsers/{deviceUsersId}:collectBugReport',
        http_method='POST',
        method_id='cloudidentity.devices.deviceUsers.collectBugReport',
        ordered_params=['name'],
        path_params=['name'],
        query_params=[],
        relative_path='v1/{+name}:collectBugReport',
        request_field='googleAppsCloudidentityDevicesV1CollectBugReportRequest',
        request_type_name='CloudidentityDevicesDeviceUsersCollectBugReportRequest',
        response_type_name='Operation',
        supports_download=False,
    )

    def Delete(self, request, global_params=None):
      r"""Deletes the specified DeviceUser. This also revokes the user's access to device data.

      Args:
        request: (CloudidentityDevicesDeviceUsersDeleteRequest) 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/devices/{devicesId}/deviceUsers/{deviceUsersId}',
        http_method='DELETE',
        method_id='cloudidentity.devices.deviceUsers.delete',
        ordered_params=['name'],
        path_params=['name'],
        query_params=['customer'],
        relative_path='v1/{+name}',
        request_field='',
        request_type_name='CloudidentityDevicesDeviceUsersDeleteRequest',
        response_type_name='Operation',
        supports_download=False,
    )

    def Get(self, request, global_params=None):
      r"""Retrieves the specified DeviceUser.

      Args:
        request: (CloudidentityDevicesDeviceUsersGetRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleAppsCloudidentityDevicesV1DeviceUser) 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/devices/{devicesId}/deviceUsers/{deviceUsersId}',
        http_method='GET',
        method_id='cloudidentity.devices.deviceUsers.get',
        ordered_params=['name'],
        path_params=['name'],
        query_params=['customer'],
        relative_path='v1/{+name}',
        request_field='',
        request_type_name='CloudidentityDevicesDeviceUsersGetRequest',
        response_type_name='GoogleAppsCloudidentityDevicesV1DeviceUser',
        supports_download=False,
    )

    def List(self, request, global_params=None):
      r"""Lists/Searches DeviceUsers.

      Args:
        request: (CloudidentityDevicesDeviceUsersListRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleAppsCloudidentityDevicesV1ListDeviceUsersResponse) 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/devices/{devicesId}/deviceUsers',
        http_method='GET',
        method_id='cloudidentity.devices.deviceUsers.list',
        ordered_params=['parent'],
        path_params=['parent'],
        query_params=['customer', 'filter', 'orderBy', 'pageSize', 'pageToken'],
        relative_path='v1/{+parent}/deviceUsers',
        request_field='',
        request_type_name='CloudidentityDevicesDeviceUsersListRequest',
        response_type_name='GoogleAppsCloudidentityDevicesV1ListDeviceUsersResponse',
        supports_download=False,
    )

    def Lookup(self, request, global_params=None):
      r"""Looks up resource names of the DeviceUsers associated with the caller's credentials, as well as the properties provided in the request. This method must be called with end-user credentials with the scope: https://www.googleapis.com/auth/cloud-identity.devices.lookup If multiple properties are provided, only DeviceUsers having all of these properties are considered as matches - i.e. the query behaves like an AND. Different platforms require different amounts of information from the caller to ensure that the DeviceUser is uniquely identified. - iOS: No properties need to be passed, the caller's credentials are sufficient to identify the corresponding DeviceUser. - Android: Specifying the 'android_id' field is required. - Desktop: Specifying the 'raw_resource_id' field is required.

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

    Lookup.method_config = lambda: base_api.ApiMethodInfo(
        flat_path='v1/devices/{devicesId}/deviceUsers:lookup',
        http_method='GET',
        method_id='cloudidentity.devices.deviceUsers.lookup',
        ordered_params=['parent'],
        path_params=['parent'],
        query_params=['androidId', 'pageSize', 'pageToken', 'rawResourceId', 'userId'],
        relative_path='v1/{+parent}:lookup',
        request_field='',
        request_type_name='CloudidentityDevicesDeviceUsersLookupRequest',
        response_type_name='GoogleAppsCloudidentityDevicesV1LookupSelfDeviceUsersResponse',
        supports_download=False,
    )

    def Patch(self, request, global_params=None):
      r"""Updates the specified DeviceUser.

      Args:
        request: (CloudidentityDevicesDeviceUsersPatchRequest) 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/devices/{devicesId}/deviceUsers/{deviceUsersId}',
        http_method='PATCH',
        method_id='cloudidentity.devices.deviceUsers.patch',
        ordered_params=['name'],
        path_params=['name'],
        query_params=['customer', 'name1', 'updateMask'],
        relative_path='v1/{+name}',
        request_field='googleAppsCloudidentityDevicesV1DeviceUser',
        request_type_name='CloudidentityDevicesDeviceUsersPatchRequest',
        response_type_name='Operation',
        supports_download=False,
    )

    def Signout(self, request, global_params=None):
      r"""Signs out the user from the specified device.

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

    Signout.method_config = lambda: base_api.ApiMethodInfo(
        flat_path='v1/devices/{devicesId}/deviceUsers/{deviceUsersId}:signout',
        http_method='POST',
        method_id='cloudidentity.devices.deviceUsers.signout',
        ordered_params=['name'],
        path_params=['name'],
        query_params=[],
        relative_path='v1/{+name}:signout',
        request_field='googleAppsCloudidentityDevicesV1SignoutDeviceUserRequest',
        request_type_name='CloudidentityDevicesDeviceUsersSignoutRequest',
        response_type_name='Operation',
        supports_download=False,
    )

    def Sync(self, request, global_params=None):
      r"""Syncs the device to company's policy.

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

    Sync.method_config = lambda: base_api.ApiMethodInfo(
        flat_path='v1/devices/{devicesId}/deviceUsers/{deviceUsersId}:sync',
        http_method='POST',
        method_id='cloudidentity.devices.deviceUsers.sync',
        ordered_params=['name'],
        path_params=['name'],
        query_params=[],
        relative_path='v1/{+name}:sync',
        request_field='googleAppsCloudidentityDevicesV1SyncDeviceUserRequest',
        request_type_name='CloudidentityDevicesDeviceUsersSyncRequest',
        response_type_name='Operation',
        supports_download=False,
    )

    def Unenroll(self, request, global_params=None):
      r"""Unenrolls the user from Advanced Windows Management without affecting their user account.

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

    Unenroll.method_config = lambda: base_api.ApiMethodInfo(
        flat_path='v1/devices/{devicesId}/deviceUsers/{deviceUsersId}:unenroll',
        http_method='POST',
        method_id='cloudidentity.devices.deviceUsers.unenroll',
        ordered_params=['name'],
        path_params=['name'],
        query_params=[],
        relative_path='v1/{+name}:unenroll',
        request_field='googleAppsCloudidentityDevicesV1UnenrollDeviceUserRequest',
        request_type_name='CloudidentityDevicesDeviceUsersUnenrollRequest',
        response_type_name='Operation',
        supports_download=False,
    )

    def Wipe(self, request, global_params=None):
      r"""Wipes the user's account on a device. Other data on the device that is not associated with the user's work account is not affected. For example, if a Gmail app is installed on a device that is used for personal and work purposes, and the user is logged in to the Gmail app with their personal account as well as their work account, wiping the "deviceUser" by their work administrator will not affect their personal account within Gmail or other apps such as Photos.

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

    Wipe.method_config = lambda: base_api.ApiMethodInfo(
        flat_path='v1/devices/{devicesId}/deviceUsers/{deviceUsersId}:wipe',
        http_method='POST',
        method_id='cloudidentity.devices.deviceUsers.wipe',
        ordered_params=['name'],
        path_params=['name'],
        query_params=[],
        relative_path='v1/{+name}:wipe',
        request_field='googleAppsCloudidentityDevicesV1WipeDeviceUserRequest',
        request_type_name='CloudidentityDevicesDeviceUsersWipeRequest',
        response_type_name='Operation',
        supports_download=False,
    )

  class DevicesService(base_api.BaseApiService):
    """Service class for the devices resource."""

    _NAME = 'devices'

    def __init__(self, client):
      super(CloudidentityV1.DevicesService, self).__init__(client)
      self._upload_configs = {
          }

    def CancelWipe(self, request, global_params=None):
      r"""Cancels an unfinished device wipe. This operation can be used to cancel device wipe in the gap between the wipe operation returning success and the device being wiped. This operation is possible when the device is in a "pending wipe" state. The device enters the "pending wipe" state when a wipe device command is issued, but has not yet been sent to the device. The cancel wipe will fail if the wipe command has already been issued to the device.

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

    CancelWipe.method_config = lambda: base_api.ApiMethodInfo(
        flat_path='v1/devices/{devicesId}:cancelWipe',
        http_method='POST',
        method_id='cloudidentity.devices.cancelWipe',
        ordered_params=['name'],
        path_params=['name'],
        query_params=[],
        relative_path='v1/{+name}:cancelWipe',
        request_field='googleAppsCloudidentityDevicesV1CancelWipeDeviceRequest',
        request_type_name='CloudidentityDevicesCancelWipeRequest',
        response_type_name='Operation',
        supports_download=False,
    )

    def Create(self, request, global_params=None):
      r"""Creates a device. Only company-owned device may be created.

      Args:
        request: (CloudidentityDevicesCreateRequest) 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(
        http_method='POST',
        method_id='cloudidentity.devices.create',
        ordered_params=[],
        path_params=[],
        query_params=['customer'],
        relative_path='v1/devices',
        request_field='googleAppsCloudidentityDevicesV1Device',
        request_type_name='CloudidentityDevicesCreateRequest',
        response_type_name='Operation',
        supports_download=False,
    )

    def Delete(self, request, global_params=None):
      r"""Deletes the specified device.

      Args:
        request: (CloudidentityDevicesDeleteRequest) 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/devices/{devicesId}',
        http_method='DELETE',
        method_id='cloudidentity.devices.delete',
        ordered_params=['name'],
        path_params=['name'],
        query_params=['customer'],
        relative_path='v1/{+name}',
        request_field='',
        request_type_name='CloudidentityDevicesDeleteRequest',
        response_type_name='Operation',
        supports_download=False,
    )

    def Get(self, request, global_params=None):
      r"""Retrieves the specified device.

      Args:
        request: (CloudidentityDevicesGetRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleAppsCloudidentityDevicesV1Device) 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/devices/{devicesId}',
        http_method='GET',
        method_id='cloudidentity.devices.get',
        ordered_params=['name'],
        path_params=['name'],
        query_params=['customer'],
        relative_path='v1/{+name}',
        request_field='',
        request_type_name='CloudidentityDevicesGetRequest',
        response_type_name='GoogleAppsCloudidentityDevicesV1Device',
        supports_download=False,
    )

    def List(self, request, global_params=None):
      r"""Lists/Searches devices.

      Args:
        request: (CloudidentityDevicesListRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GoogleAppsCloudidentityDevicesV1ListDevicesResponse) 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='cloudidentity.devices.list',
        ordered_params=[],
        path_params=[],
        query_params=['customer', 'filter', 'orderBy', 'pageSize', 'pageToken', 'view'],
        relative_path='v1/devices',
        request_field='',
        request_type_name='CloudidentityDevicesListRequest',
        response_type_name='GoogleAppsCloudidentityDevicesV1ListDevicesResponse',
        supports_download=False,
    )

    def Lock(self, request, global_params=None):
      r"""Locks the specified device, without signing out the user. Locking a device will require the user to enter their passcode, biometric or other device- level authentication in order to use the device again.

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

    Lock.method_config = lambda: base_api.ApiMethodInfo(
        flat_path='v1/devices:lock',
        http_method='POST',
        method_id='cloudidentity.devices.lock',
        ordered_params=['name'],
        path_params=['name'],
        query_params=[],
        relative_path='v1/{+name}:lock',
        request_field='googleAppsCloudidentityDevicesV1LockDeviceRequest',
        request_type_name='CloudidentityDevicesLockRequest',
        response_type_name='Operation',
        supports_download=False,
    )

    def Patch(self, request, global_params=None):
      r"""Updates the specified device.

      Args:
        request: (CloudidentityDevicesPatchRequest) 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/devices/{devicesId}',
        http_method='PATCH',
        method_id='cloudidentity.devices.patch',
        ordered_params=['name'],
        path_params=['name'],
        query_params=['customer', 'name1', 'updateMask'],
        relative_path='v1/{+name}',
        request_field='googleAppsCloudidentityDevicesV1Device',
        request_type_name='CloudidentityDevicesPatchRequest',
        response_type_name='Operation',
        supports_download=False,
    )

    def ResetPin(self, request, global_params=None):
      r"""Resets the specified device's pin.

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

    ResetPin.method_config = lambda: base_api.ApiMethodInfo(
        flat_path='v1/devices:resetPin',
        http_method='POST',
        method_id='cloudidentity.devices.resetPin',
        ordered_params=['name'],
        path_params=['name'],
        query_params=[],
        relative_path='v1/{+name}:resetPin',
        request_field='googleAppsCloudidentityDevicesV1ResetPinRequest',
        request_type_name='CloudidentityDevicesResetPinRequest',
        response_type_name='Operation',
        supports_download=False,
    )

    def Ring(self, request, global_params=None):
      r"""Rings the specified device. A device typically has the functionality to attract user attention by providing an audio or vibration signal. This method enables the caller to activate that signal.

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

    Ring.method_config = lambda: base_api.ApiMethodInfo(
        flat_path='v1/devices:ring',
        http_method='POST',
        method_id='cloudidentity.devices.ring',
        ordered_params=['name'],
        path_params=['name'],
        query_params=[],
        relative_path='v1/{+name}:ring',
        request_field='googleAppsCloudidentityDevicesV1RingDeviceRequest',
        request_type_name='CloudidentityDevicesRingRequest',
        response_type_name='Operation',
        supports_download=False,
    )

    def Wipe(self, request, global_params=None):
      r"""Wipes all data on the specified device.

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

    Wipe.method_config = lambda: base_api.ApiMethodInfo(
        flat_path='v1/devices/{devicesId}:wipe',
        http_method='POST',
        method_id='cloudidentity.devices.wipe',
        ordered_params=['name'],
        path_params=['name'],
        query_params=[],
        relative_path='v1/{+name}:wipe',
        request_field='googleAppsCloudidentityDevicesV1WipeDeviceRequest',
        request_type_name='CloudidentityDevicesWipeRequest',
        response_type_name='Operation',
        supports_download=False,
    )

  class GroupsMembershipsService(base_api.BaseApiService):
    """Service class for the groups_memberships resource."""

    _NAME = 'groups_memberships'

    def __init__(self, client):
      super(CloudidentityV1.GroupsMembershipsService, self).__init__(client)
      self._upload_configs = {
          }

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

      Args:
        request: (CloudidentityGroupsMembershipsCreateRequest) 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/groups/{groupsId}/memberships',
        http_method='POST',
        method_id='cloudidentity.groups.memberships.create',
        ordered_params=['parent'],
        path_params=['parent'],
        query_params=[],
        relative_path='v1/{+parent}/memberships',
        request_field='membership',
        request_type_name='CloudidentityGroupsMembershipsCreateRequest',
        response_type_name='Operation',
        supports_download=False,
    )

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

      Args:
        request: (CloudidentityGroupsMembershipsDeleteRequest) 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/groups/{groupsId}/memberships/{membershipsId}',
        http_method='DELETE',
        method_id='cloudidentity.groups.memberships.delete',
        ordered_params=['name'],
        path_params=['name'],
        query_params=[],
        relative_path='v1/{+name}',
        request_field='',
        request_type_name='CloudidentityGroupsMembershipsDeleteRequest',
        response_type_name='Operation',
        supports_download=False,
    )

    def Get(self, request, global_params=None):
      r"""Retrieves a `Membership`.

      Args:
        request: (CloudidentityGroupsMembershipsGetRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (Membership) 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/groups/{groupsId}/memberships/{membershipsId}',
        http_method='GET',
        method_id='cloudidentity.groups.memberships.get',
        ordered_params=['name'],
        path_params=['name'],
        query_params=[],
        relative_path='v1/{+name}',
        request_field='',
        request_type_name='CloudidentityGroupsMembershipsGetRequest',
        response_type_name='Membership',
        supports_download=False,
    )

    def List(self, request, global_params=None):
      r"""Lists the `Membership`s within a `Group`.

      Args:
        request: (CloudidentityGroupsMembershipsListRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (ListMembershipsResponse) 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/groups/{groupsId}/memberships',
        http_method='GET',
        method_id='cloudidentity.groups.memberships.list',
        ordered_params=['parent'],
        path_params=['parent'],
        query_params=['pageSize', 'pageToken', 'view'],
        relative_path='v1/{+parent}/memberships',
        request_field='',
        request_type_name='CloudidentityGroupsMembershipsListRequest',
        response_type_name='ListMembershipsResponse',
        supports_download=False,
    )

    def Lookup(self, request, global_params=None):
      r"""Looks up the [resource name](https://cloud.google.com/apis/design/resource_names) of a `Membership` by its `EntityKey`.

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

    Lookup.method_config = lambda: base_api.ApiMethodInfo(
        flat_path='v1/groups/{groupsId}/memberships:lookup',
        http_method='GET',
        method_id='cloudidentity.groups.memberships.lookup',
        ordered_params=['parent'],
        path_params=['parent'],
        query_params=['memberKey_id', 'memberKey_namespace'],
        relative_path='v1/{+parent}/memberships:lookup',
        request_field='',
        request_type_name='CloudidentityGroupsMembershipsLookupRequest',
        response_type_name='LookupMembershipNameResponse',
        supports_download=False,
    )

    def ModifyMembershipRoles(self, request, global_params=None):
      r"""Modifies the `MembershipRole`s of a `Membership`.

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

    ModifyMembershipRoles.method_config = lambda: base_api.ApiMethodInfo(
        flat_path='v1/groups/{groupsId}/memberships/{membershipsId}:modifyMembershipRoles',
        http_method='POST',
        method_id='cloudidentity.groups.memberships.modifyMembershipRoles',
        ordered_params=['name'],
        path_params=['name'],
        query_params=[],
        relative_path='v1/{+name}:modifyMembershipRoles',
        request_field='modifyMembershipRolesRequest',
        request_type_name='CloudidentityGroupsMembershipsModifyMembershipRolesRequest',
        response_type_name='ModifyMembershipRolesResponse',
        supports_download=False,
    )

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

      Args:
        request: (CloudidentityGroupsMembershipsPatchRequest) 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/groups/{groupsId}/memberships/{membershipsId}',
        http_method='PATCH',
        method_id='cloudidentity.groups.memberships.patch',
        ordered_params=['name'],
        path_params=['name'],
        query_params=['updateMask'],
        relative_path='v1/{+name}',
        request_field='membership',
        request_type_name='CloudidentityGroupsMembershipsPatchRequest',
        response_type_name='Operation',
        supports_download=False,
    )

  class GroupsService(base_api.BaseApiService):
    """Service class for the groups resource."""

    _NAME = 'groups'

    def __init__(self, client):
      super(CloudidentityV1.GroupsService, self).__init__(client)
      self._upload_configs = {
          }

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

      Args:
        request: (CloudidentityGroupsCreateRequest) 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(
        http_method='POST',
        method_id='cloudidentity.groups.create',
        ordered_params=[],
        path_params=[],
        query_params=['initialGroupConfig'],
        relative_path='v1/groups',
        request_field='group',
        request_type_name='CloudidentityGroupsCreateRequest',
        response_type_name='Operation',
        supports_download=False,
    )

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

      Args:
        request: (CloudidentityGroupsDeleteRequest) 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/groups/{groupsId}',
        http_method='DELETE',
        method_id='cloudidentity.groups.delete',
        ordered_params=['name'],
        path_params=['name'],
        query_params=[],
        relative_path='v1/{+name}',
        request_field='',
        request_type_name='CloudidentityGroupsDeleteRequest',
        response_type_name='Operation',
        supports_download=False,
    )

    def Get(self, request, global_params=None):
      r"""Retrieves a `Group`.

      Args:
        request: (CloudidentityGroupsGetRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (Group) 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/groups/{groupsId}',
        http_method='GET',
        method_id='cloudidentity.groups.get',
        ordered_params=['name'],
        path_params=['name'],
        query_params=[],
        relative_path='v1/{+name}',
        request_field='',
        request_type_name='CloudidentityGroupsGetRequest',
        response_type_name='Group',
        supports_download=False,
    )

    def List(self, request, global_params=None):
      r"""Lists the `Group`s under a customer or namespace.

      Args:
        request: (CloudidentityGroupsListRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (ListGroupsResponse) 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='cloudidentity.groups.list',
        ordered_params=[],
        path_params=[],
        query_params=['pageSize', 'pageToken', 'parent', 'view'],
        relative_path='v1/groups',
        request_field='',
        request_type_name='CloudidentityGroupsListRequest',
        response_type_name='ListGroupsResponse',
        supports_download=False,
    )

    def Lookup(self, request, global_params=None):
      r"""Looks up the [resource name](https://cloud.google.com/apis/design/resource_names) of a `Group` by its `EntityKey`.

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

    Lookup.method_config = lambda: base_api.ApiMethodInfo(
        http_method='GET',
        method_id='cloudidentity.groups.lookup',
        ordered_params=[],
        path_params=[],
        query_params=['groupKey_id', 'groupKey_namespace'],
        relative_path='v1/groups:lookup',
        request_field='',
        request_type_name='CloudidentityGroupsLookupRequest',
        response_type_name='LookupGroupNameResponse',
        supports_download=False,
    )

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

      Args:
        request: (CloudidentityGroupsPatchRequest) 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/groups/{groupsId}',
        http_method='PATCH',
        method_id='cloudidentity.groups.patch',
        ordered_params=['name'],
        path_params=['name'],
        query_params=['updateMask'],
        relative_path='v1/{+name}',
        request_field='group',
        request_type_name='CloudidentityGroupsPatchRequest',
        response_type_name='Operation',
        supports_download=False,
    )

    def Search(self, request, global_params=None):
      r"""Searches for `Group`s matching a specified query.

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

    Search.method_config = lambda: base_api.ApiMethodInfo(
        http_method='GET',
        method_id='cloudidentity.groups.search',
        ordered_params=[],
        path_params=[],
        query_params=['pageSize', 'pageToken', 'query', 'view'],
        relative_path='v1/groups:search',
        request_field='',
        request_type_name='CloudidentityGroupsSearchRequest',
        response_type_name='SearchGroupsResponse',
        supports_download=False,
    )
