
    4                     V    S r SSKJr  SSKJr  SSKJr   " S S\R                  5      r	g)z0Generated client library for apikeys version v2.    )absolute_import)base_api)apikeys_v2_messagesc                   @  ^  \ rS rSrSr\rSrSrSr	SS/r
SrS	rS
rSrS rSrSr     SU 4S jjr " S S\R(                  5      r " S S\R(                  5      r " S S\R(                  5      r " S S\R(                  5      r " S S\R(                  5      rSrU =r$ )	ApikeysV2
   z8Generated client library for service apikeys version v2.zhttps://apikeys.googleapis.com/z$https://apikeys.mtls.googleapis.com/apikeysz.https://www.googleapis.com/auth/cloud-platformz8https://www.googleapis.com/auth/cloud-platform.read-onlyv2	CLIENT_IDCLIENT_SECRETzgoogle-cloud-sdkNc                 <  > U=(       d    U R                   n[        [        U ]  XX4UXgUU	U
US9  U R	                  U 5      U l        U R                  U 5      U l        U R                  U 5      U l	        U R                  U 5      U l        U R                  U 5      U l        g)zCreate a new apikeys handle.)
credentialsget_credentialshttpmodellog_requestlog_responsecredentials_argsdefault_global_paramsadditional_http_headersresponse_encodingN)BASE_URLsuperr   __init__KeysServicekeysOperationsService
operationsProjectsLocationsKeysServiceprojects_locations_keysProjectsLocationsServiceprojects_locationsProjectsServiceprojects)selfurlr   r   r   r   r   r   r   r   r   r   	__class__s               Ilib/googlecloudsdk/generated_clients/apis/apikeys/v2/apikeys_v2_client.pyr   ApikeysV2.__init__   s     
C	)T#'%)3 7+ $ -   &DI,,T2DO#'#D#DT#JD ";;DAD((.DM    c                   J   ^  \ rS rSrSrSrU 4S jrSS jrS \l        Sr	U =r
$ )	ApikeysV2.KeysService0   z$Service class for the keys resource.r   c                 N   > [         [        R                  U ]  U5        0 U l        g N)r   r   r   r   _upload_configsr%   clientr'   s     r(   r   ApikeysV2.KeysService.__init__5   s"    I!!41&9dr*   c                 D    U R                  S5      nU R                  X1US9$ )a  Find the parent project and resource name of the API key that matches the key string in the request. If the API key has been purged, resource name will not be set. The service account must have the `apikeys.keys.lookup` permission on the parent project.

Args:
  request: (ApikeysKeysLookupKeyRequest) input message
  global_params: (StandardQueryParameters, default: None) global arguments
Returns:
  (V2LookupKeyResponse) The response message.
	LookupKeyglobal_paramsGetMethodConfig
_RunMethodr%   requestr7   configs       r(   r5   ApikeysV2.KeysService.LookupKey:   s/     ##K0f__
  8 8r*   c                  >    [         R                  " SS/ / S/SSSSSS	9
$ )
NGETzapikeys.keys.lookupKey	keyStringzv2/keys:lookupKey ApikeysKeysLookupKeyRequestV2LookupKeyResponseF)
http_method	method_idordered_paramspath_paramsquery_paramsrelative_pathrequest_fieldrequest_type_nameresponse_type_namesupports_downloadr   ApiMethodInfo r*   r(   <lambda>ApikeysV2.KeysService.<lambda>G   s/    h&<&<*!])70'r*   r0   r/   )__name__
__module____qualname____firstlineno____doc___NAMEr   r5   method_config__static_attributes____classcell__r'   s   @r(   r   r,   0   s"    .E
8Ir*   r   c                   J   ^  \ rS rSrSrSrU 4S jrSS jrS \l        Sr	U =r
$ )	ApikeysV2.OperationsServiceT   z*Service class for the operations resource.r   c                 N   > [         [        R                  U ]  U5        0 U l        g r/   )r   r   r   r   r0   r1   s     r(   r   $ApikeysV2.OperationsService.__init__Y   s"    I''7?dr*   c                 D    U R                  S5      nU R                  X1US9$ )aR  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: (ApikeysOperationsGetRequest) input message
  global_params: (StandardQueryParameters, default: None) global arguments
Returns:
  (Operation) The response message.
Getr6   r8   r;   s       r(   re   ApikeysV2.OperationsService.Get^   /     ##E*f__
  8 8r*   c                  B    [         R                  " SSSS/S// SSSSS	S
9$ )Nzv2/operations/{operationsId}r@   zapikeys.operations.getname
v2/{+name}rB   ApikeysOperationsGetRequest	OperationF	flat_pathrE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   rO   rQ   r*   r(   rR   $ApikeysV2.OperationsService.<lambda>k   s4     6 60*xH"7&!r*   rT   r/   )rU   rV   rW   rX   rY   rZ   r   re   r[   r\   r]   r^   s   @r(   r   r`   T   s"    4E
8Cr*   r   c                      ^  \ rS rSrSrSrU 4S jrSS jrS \l        SS jr	S \	l        SS	 jr
S
 \
l        SS jrS \l        SS jrS \l        SS jrS \l        SS jrS \l        SrU =r$ )&ApikeysV2.ProjectsLocationsKeysServicey   z7Service class for the projects_locations_keys resource.r    c                 N   > [         [        R                  U ]  U5        0 U l        g r/   )r   r   r   r   r0   r1   s     r(   r   /ApikeysV2.ProjectsLocationsKeysService.__init__~   s"    I22DB6Jdr*   c                 D    U R                  S5      nU R                  X1US9$ )a4  Creates a new API key. NOTE: Key is a global resource; hence the only supported value for location is `global`.

Args:
  request: (ApikeysProjectsLocationsKeysCreateRequest) input message
  global_params: (StandardQueryParameters, default: None) global arguments
Returns:
  (Operation) The response message.
Creater6   r8   r;   s       r(   rv   -ApikeysV2.ProjectsLocationsKeysService.Create   /     ##H-f__
  8 8r*   c                  D    [         R                  " SSSS/S/S/SSSS	S
S9$ )N5v2/projects/{projectsId}/locations/{locationsId}/keysPOSTz&apikeys.projects.locations.keys.createparentkeyIdv2/{+parent}/keysv2Key)ApikeysProjectsLocationsKeysCreateRequestrl   Frm   rO   rQ   r*   r(   rR   /ApikeysV2.ProjectsLocationsKeysService.<lambda>   s6    8#9#9I: zJY)E&$r*   c                 D    U R                  S5      nU R                  X1US9$ )a  Deletes an API key. Deleted key can be retrieved within 30 days of deletion. Afterward, key will be purged from the project. NOTE: Key is a global resource; hence the only supported value for location is `global`.

Args:
  request: (ApikeysProjectsLocationsKeysDeleteRequest) input message
  global_params: (StandardQueryParameters, default: None) global arguments
Returns:
  (Operation) The response message.
Deleter6   r8   r;   s       r(   r   -ApikeysV2.ProjectsLocationsKeysService.Delete   rx   r*   c                  D    [         R                  " SSSS/S/S/SSSS	S
S9$ )N>v2/projects/{projectsId}/locations/{locationsId}/keys/{keysId}DELETEz&apikeys.projects.locations.keys.deleteri   etagrj   rB   )ApikeysProjectsLocationsKeysDeleteRequestrl   Frm   rO   rQ   r*   r(   rR   r      s6    8#9#9R:xHX"E&$r*   c                 D    U R                  S5      nU R                  X1US9$ )av  Gets the metadata for an API key. The key string of the API key isn't included in the response. NOTE: Key is a global resource; hence the only supported value for location is `global`.

Args:
  request: (ApikeysProjectsLocationsKeysGetRequest) input message
  global_params: (StandardQueryParameters, default: None) global arguments
Returns:
  (V2Key) The response message.
re   r6   r8   r;   s       r(   re   *ApikeysV2.ProjectsLocationsKeysService.Get   rg   r*   c                  B    [         R                  " SSSS/S// SSSSS	S
9$ )Nr   r@   z#apikeys.projects.locations.keys.getri   rj   rB   &ApikeysProjectsLocationsKeysGetRequestV2KeyFrm   rO   rQ   r*   r(   rR   r      s4     6 6R7xH"B"!r*   c                 D    U R                  S5      nU R                  X1US9$ )aS  Get the key string for an API key. NOTE: Key is a global resource; hence the only supported value for location is `global`.

Args:
  request: (ApikeysProjectsLocationsKeysGetKeyStringRequest) input message
  global_params: (StandardQueryParameters, default: None) global arguments
Returns:
  (V2GetKeyStringResponse) The response message.
GetKeyStringr6   r8   r;   s       r(   r   3ApikeysV2.ProjectsLocationsKeysService.GetKeyString   s/     ##N3f__
  8 8r*   c                  B    [         R                  " SSSS/S// SSSSS	S
9$ )NzHv2/projects/{projectsId}/locations/{locationsId}/keys/{keysId}/keyStringr@   z,apikeys.projects.locations.keys.getKeyStringri   zv2/{+name}/keyStringrB   /ApikeysProjectsLocationsKeysGetKeyStringRequestV2GetKeyStringResponseFrm   rO   rQ   r*   r(   rR   r      s4    )?)?\@xH,K3*r*   c                 D    U R                  S5      nU R                  X1US9$ )a  Lists the API keys owned by a project. The key string of the API key isn't included in the response. NOTE: Key is a global resource; hence the only supported value for location is `global`.

Args:
  request: (ApikeysProjectsLocationsKeysListRequest) input message
  global_params: (StandardQueryParameters, default: None) global arguments
Returns:
  (V2ListKeysResponse) The response message.
Listr6   r8   r;   s       r(   r   +ApikeysV2.ProjectsLocationsKeysService.List   s/     ##F+f__
  8 8r*   c                  F    [         R                  " SSSS/S// SQSSSS	S
S9$ )Nrz   r@   z$apikeys.projects.locations.keys.listr|   )pageSize	pageTokenshowDeletedr~   rB   'ApikeysProjectsLocationsKeysListRequestV2ListKeysResponseFrm   rO   rQ   r*   r(   rR   r      s4    !7!7I8 zJ=)C/"r*   c                 D    U R                  S5      nU R                  X1US9$ )a  Patches the modifiable fields of an API key. The key string of the API key isn't included in the response. NOTE: Key is a global resource; hence the only supported value for location is `global`.

Args:
  request: (ApikeysProjectsLocationsKeysPatchRequest) input message
  global_params: (StandardQueryParameters, default: None) global arguments
Returns:
  (Operation) The response message.
Patchr6   r8   r;   s       r(   r   ,ApikeysV2.ProjectsLocationsKeysService.Patch
  s/     ##G,f__
  8 8r*   c                  D    [         R                  " SSSS/S/S/SSSS	S
S9$ )Nr   PATCHz%apikeys.projects.locations.keys.patchri   
updateMaskrj   r   (ApikeysProjectsLocationsKeysPatchRequestrl   Frm   rO   rQ   r*   r(   rR   r     s6    ("8"8R9xH"^"D&#r*   c                 D    U R                  S5      nU R                  X1US9$ )aV  Undeletes an API key which was deleted within 30 days. NOTE: Key is a global resource; hence the only supported value for location is `global`.

Args:
  request: (ApikeysProjectsLocationsKeysUndeleteRequest) input message
  global_params: (StandardQueryParameters, default: None) global arguments
Returns:
  (Operation) The response message.
Undeleter6   r8   r;   s       r(   r   /ApikeysV2.ProjectsLocationsKeysService.Undelete%  s/     ##J/f__
  8 8r*   c                  B    [         R                  " SSSS/S// SSSSS	S
9$ )NzGv2/projects/{projectsId}/locations/{locationsId}/keys/{keysId}:undeleter{   z(apikeys.projects.locations.keys.undeleteri   zv2/{+name}:undeletev2UndeleteKeyRequest+ApikeysProjectsLocationsKeysUndeleteRequestrl   Frm   rO   rQ   r*   r(   rR   r   2  s4    X%;%;[<xH+,G&&r*   rT   r/   )rU   rV   rW   rX   rY   rZ   r   rv   r[   r   re   r   r   r   r   r\   r]   r^   s   @r(   r   rq   y   s|    A%E
8F8F8C8"L8D8E8Hr*   r   c                   0   ^  \ rS rSrSrSrU 4S jrSrU =r$ )"ApikeysV2.ProjectsLocationsServicei@  z2Service class for the projects_locations resource.r"   c                 N   > [         [        R                  U ]  U5        0 U l        g r/   )r   r   r!   r   r0   r1   s     r(   r   +ApikeysV2.ProjectsLocationsService.__init__E  s"    I..>vFdr*   rT   	rU   rV   rW   rX   rY   rZ   r   r\   r]   r^   s   @r(   r!   r   @  s    < E r*   r!   c                   0   ^  \ rS rSrSrSrU 4S jrSrU =r$ )ApikeysV2.ProjectsServiceiJ  z(Service class for the projects resource.r$   c                 N   > [         [        R                  U ]  U5        0 U l        g r/   )r   r   r#   r   r0   r1   s     r(   r   "ApikeysV2.ProjectsService.__init__O  s"    I%%t5f=dr*   rT   r   r^   s   @r(   r#   r   J  s    2E r*   r#   )r   r   r$   r"   r    )rB   NTNNFFNNNN)rU   rV   rW   rX   rY   messagesMESSAGES_MODULEr   MTLS_BASE_URL_PACKAGE_SCOPES_VERSION
_CLIENT_ID_CLIENT_SECRET_USER_AGENT_CLIENT_CLASS_NAME_URL_VERSION_API_KEYr   r   BaseApiServicer   r   r   r!   r#   r\   r]   r^   s   @r(   r   r   
   s    @/.(8-(=?yz'(*"."+",()-6:/4<@?C	/*"H++ "H#(11 #JEX%<%< EN!8!8 //  r*   r   N)
rY   
__future__r   apitools.base.pyr   0googlecloudsdk.generated_clients.apis.apikeys.v2r   r   BaseApiClientr   rQ   r*   r(   <module>r      s'    6 ' % \H&& Hr*   