
    P                     V    d Z ddlmZ ddlmZ ddlmZ  G d dej                        Z	y)z7Generated client library for cloudfunctions version v1.    )absolute_import)base_api)cloudfunctions_v1_messagesc                       e Zd ZdZeZdZdZdZdgZ	dZ
dZdZd	Zd ZdZd
Z	 	 	 	 	 d fd	Z G d dej&                        Z G d dej&                        Z G d dej&                        Z G d dej&                        Z xZS )CloudfunctionsV1z?Generated client library for service cloudfunctions version v1.z&https://cloudfunctions.googleapis.com/z+https://cloudfunctions.mtls.googleapis.com/cloudfunctionsz.https://www.googleapis.com/auth/cloud-platformv1	CLIENT_IDCLIENT_SECRETzgoogle-cloud-sdkNc                    |xs | j                   }t        t        |   |||||||||	|
|       | j	                  |       | _        | j                  |       | _        | j                  |       | _	        | j                  |       | _        y)z#Create a new cloudfunctions handle.)
credentialsget_credentialshttpmodellog_requestlog_responsecredentials_argsdefault_global_paramsadditional_http_headersresponse_encodingN)BASE_URLsuperr   __init__OperationsService
operations!ProjectsLocationsFunctionsServiceprojects_locations_functionsProjectsLocationsServiceprojects_locationsProjectsServiceprojects)selfurlr   r   r   r   r   r   r   r   r   r   	__class__s               Wlib/googlecloudsdk/generated_clients/apis/cloudfunctions/v1/cloudfunctions_v1_client.pyr   zCloudfunctionsV1.__init__   s     
C	
D*'d%l)3 7+ + - ,,T2DO(,(N(Nt(TD%";;DAD((.DM    c                   V     e Zd ZdZdZ fdZddZd e_        ddZd e_         xZ	S )	"CloudfunctionsV1.OperationsServicez*Service class for the operations resource.r   c                 N    t         t        j                  |   |       i | _        y N)r   r   r   r   _upload_configsr"   clientr$   s     r%   r   z+CloudfunctionsV1.OperationsService.__init__4   s#    ..>vFdr&   c                 L    | j                  d      }| j                  |||      S )a}  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: (CloudfunctionsOperationsGetRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (Operation) The response message.
      Getglobal_paramsGetMethodConfig
_RunMethodr"   requestr1   configs       r%   r/   z&CloudfunctionsV1.OperationsService.Get9   1     ##E*f__
'  8 8r&   c                  F    t        j                  ddddgdgg ddddd	
      S )Nzv1/operations/{operationsId}GETzcloudfunctions.operations.getname
v1/{+name} "CloudfunctionsOperationsGetRequest	OperationF	flat_path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>z+CloudfunctionsV1.OperationsService.<lambda>F   s4     6 601xH">&!r&   c                 L    | j                  d      }| j                  |||      S )aw  Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.

      Args:
        request: (CloudfunctionsOperationsListRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (ListOperationsResponse) The response message.
      Listr0   r2   r5   s       r%   rQ   z'CloudfunctionsV1.OperationsService.ListT   1     ##F+f__
'  8 8r&   c                  D    t        j                  ddg g g dddddd	
      S )
Nr:   zcloudfunctions.operations.list)filterr;   pageSize	pageTokenzv1/operationsr=   #CloudfunctionsOperationsListRequestListOperationsResponseF)
rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   rN   r&   r%   rO   z+CloudfunctionsV1.OperationsService.<lambda>a   s-    !7!72@%?3"r&   r*   )
__name__
__module____qualname____doc___NAMEr   r/   method_configrQ   __classcell__r$   s   @r%   r   r(   /   s1    4E
8C8Dr&   r   c                   .    e Zd ZdZdZ fdZddZd e_        ddZd e_        ddZ	d	 e	_        dd
Z
d e
_        ddZd e_        ddZd e_        ddZd e_        ddZd e_        ddZd e_        ddZd e_        ddZd e_         xZS )2CloudfunctionsV1.ProjectsLocationsFunctionsServicez<Service class for the projects_locations_functions resource.r   c                 N    t         t        j                  |   |       i | _        y r*   )r   r   r   r   r+   r,   s     r%   r   z;CloudfunctionsV1.ProjectsLocationsFunctionsService.__init__s   s#    >>NvVdr&   c                 L    | j                  d      }| j                  |||      S )a  Synchronously invokes a deployed Cloud Function. To be used for testing purposes as very limited traffic is allowed. For more information on the actual limits, refer to [Rate Limits](https://cloud.google.com/functions/quotas#rate_limits).

      Args:
        request: (CloudfunctionsProjectsLocationsFunctionsCallRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (CallFunctionResponse) The response message.
      Callr0   r2   r5   s       r%   re   z7CloudfunctionsV1.ProjectsLocationsFunctionsService.Callx   rR   r&   c                  F    t        j                  ddddgdgg ddddd	
      S )NzMv1/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}:callPOSTz0cloudfunctions.projects.locations.functions.callr;   zv1/{+name}:callcallFunctionRequest3CloudfunctionsProjectsLocationsFunctionsCallRequestCallFunctionResponseFr@   rL   rN   r&   r%   rO   z;CloudfunctionsV1.ProjectsLocationsFunctionsService.<lambda>   s4    !7!7aDxH'+O1"r&   c                 L    | j                  d      }| j                  |||      S )a  Creates a new function. If a function with the given name already exists in the specified project, the long running operation will return `ALREADY_EXISTS` error.

      Args:
        request: (CloudfunctionsProjectsLocationsFunctionsCreateRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (Operation) The response message.
      Creater0   r2   r5   s       r%   rl   z9CloudfunctionsV1.ProjectsLocationsFunctionsService.Create   1     ##H-f__
'  8 8r&   c                  F    t        j                  ddddgdgg ddddd	
      S )N:v1/projects/{projectsId}/locations/{locationsId}/functionsrg   z2cloudfunctions.projects.locations.functions.createlocationzv1/{+location}/functionscloudFunction5CloudfunctionsProjectsLocationsFunctionsCreateRequestr?   Fr@   rL   rN   r&   r%   rO   z;CloudfunctionsV1.ProjectsLocationsFunctionsService.<lambda>   s4    8#9#9NF"|L0%Q&$r&   c                 L    | j                  d      }| j                  |||      S )a  Deletes a function with the given name from the specified project. If the given function is used by some trigger, the trigger will be updated to remove this function.

      Args:
        request: (CloudfunctionsProjectsLocationsFunctionsDeleteRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (Operation) The response message.
      Deleter0   r2   r5   s       r%   rt   z9CloudfunctionsV1.ProjectsLocationsFunctionsService.Delete   rm   r&   c                  F    t        j                  ddddgdgg ddddd	
      S )NHv1/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}DELETEz2cloudfunctions.projects.locations.functions.deleter;   r<   r=   5CloudfunctionsProjectsLocationsFunctionsDeleteRequestr?   Fr@   rL   rN   r&   r%   rO   z;CloudfunctionsV1.ProjectsLocationsFunctionsService.<lambda>   s4    8#9#9\FxH"Q&$r&   c                 L    | j                  d      }| j                  |||      S )a-  Returns a signed URL for downloading deployed function source code. The URL is only valid for a limited period and should be used within minutes after generation. For more information about the signed URL usage see: https://cloud.google.com/storage/docs/access-control/signed-urls.

      Args:
        request: (CloudfunctionsProjectsLocationsFunctionsGenerateDownloadUrlRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GenerateDownloadUrlResponse) The response message.
      GenerateDownloadUrlr0   r2   r5   s       r%   rz   zFCloudfunctionsV1.ProjectsLocationsFunctionsService.GenerateDownloadUrl   s2     ##$9:f__
'  8 8r&   c                  F    t        j                  ddddgdgg ddddd	
      S )Nz\v1/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}:generateDownloadUrlrg   z?cloudfunctions.projects.locations.functions.generateDownloadUrlr;   zv1/{+name}:generateDownloadUrlgenerateDownloadUrlRequestBCloudfunctionsProjectsLocationsFunctionsGenerateDownloadUrlRequestGenerateDownloadUrlResponseFr@   rL   rN   r&   r%   rO   z;CloudfunctionsV1.ProjectsLocationsFunctionsService.<lambda>   s4    0F0FpSxH62^81r&   c                 L    | j                  d      }| j                  |||      S )a  Returns a signed URL for uploading a function source code. For more information about the signed URL usage see: https://cloud.google.com/storage/docs/access-control/signed-urls. Once the function source code upload is complete, the used signed URL should be provided in CreateFunction or UpdateFunction request as a reference to the function source code. When uploading source code to the generated signed URL, please follow these restrictions: * Source file type should be a zip file. * Source file size should not exceed 100MB limit. * No credentials should be attached - the signed URLs provide access to the target bucket using internal service identity; if credentials were attached, the identity from the credentials would be used, but that identity does not have permissions to upload files to the URL. When making a HTTP PUT request, these two headers need to be specified: * `content-type: application/zip` * `x-goog-content-length-range: 0,104857600` And this header SHOULD NOT be specified: * `Authorization: Bearer YOUR_TOKEN`.

      Args:
        request: (CloudfunctionsProjectsLocationsFunctionsGenerateUploadUrlRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (GenerateUploadUrlResponse) The response message.
      GenerateUploadUrlr0   r2   r5   s       r%   r   zDCloudfunctionsV1.ProjectsLocationsFunctionsService.GenerateUploadUrl   s2     ##$78f__
'  8 8r&   c                  F    t        j                  ddddgdgg ddddd	
      S )NzLv1/projects/{projectsId}/locations/{locationsId}/functions:generateUploadUrlrg   z=cloudfunctions.projects.locations.functions.generateUploadUrlparentz(v1/{+parent}/functions:generateUploadUrlgenerateUploadUrlRequest@CloudfunctionsProjectsLocationsFunctionsGenerateUploadUrlRequestGenerateUploadUrlResponseFr@   rL   rN   r&   r%   rO   z;CloudfunctionsV1.ProjectsLocationsFunctionsService.<lambda>   s4    h.D.D`Q zJ@0\6/r&   c                 L    | j                  d      }| j                  |||      S )a8  Returns a function with the given name from the requested project.

      Args:
        request: (CloudfunctionsProjectsLocationsFunctionsGetRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (CloudFunction) The response message.
      r/   r0   r2   r5   s       r%   r/   z6CloudfunctionsV1.ProjectsLocationsFunctionsService.Get   r8   r&   c                  H    t        j                  ddddgdgdgdddd	d
      S )Nrv   r:   z/cloudfunctions.projects.locations.functions.getr;   	versionIdr<   r=   2CloudfunctionsProjectsLocationsFunctionsGetRequestCloudFunctionFr@   rL   rN   r&   r%   rO   z;CloudfunctionsV1.ProjectsLocationsFunctionsService.<lambda>  s6     6 6\CxH!]"N*!r&   c                 L    | j                  d      }| j                  |||      S )ay  Gets the IAM access control policy for a function. Returns an empty policy if the function exists and does not have a policy set.

      Args:
        request: (CloudfunctionsProjectsLocationsFunctionsGetIamPolicyRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (Policy) The response message.
      GetIamPolicyr0   r2   r5   s       r%   r   z?CloudfunctionsV1.ProjectsLocationsFunctionsService.GetIamPolicy  1     ##N3f__
'  8 8r&   c                  H    t        j                  ddddgdgdgdddd	d
      S )NzUv1/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}:getIamPolicyr:   z8cloudfunctions.projects.locations.functions.getIamPolicyresourceoptions_requestedPolicyVersionzv1/{+resource}:getIamPolicyr=   ;CloudfunctionsProjectsLocationsFunctionsGetIamPolicyRequestPolicyFr@   rL   rN   r&   r%   rO   z;CloudfunctionsV1.ProjectsLocationsFunctionsService.<lambda>'  s7    )?)?iL"|L673W#*r&   c                 L    | j                  d      }| j                  |||      S )a@  Returns a list of functions that belong to the requested project.

      Args:
        request: (CloudfunctionsProjectsLocationsFunctionsListRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (ListFunctionsResponse) The response message.
      rQ   r0   r2   r5   s       r%   rQ   z7CloudfunctionsV1.ProjectsLocationsFunctionsService.List5  rR   r&   c                  J    t        j                  ddddgdgddgddd	d
d      S )Nro   r:   z0cloudfunctions.projects.locations.functions.listr   rU   rV   zv1/{+parent}/functionsr=   3CloudfunctionsProjectsLocationsFunctionsListRequestListFunctionsResponseFr@   rL   rN   r&   r%   rO   z;CloudfunctionsV1.ProjectsLocationsFunctionsService.<lambda>B  s9    !7!7ND zJ +..O2"r&   c                 L    | j                  d      }| j                  |||      S )a  Updates existing function.

      Args:
        request: (CloudfunctionsProjectsLocationsFunctionsPatchRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (Operation) The response message.
      Patchr0   r2   r5   s       r%   r   z8CloudfunctionsV1.ProjectsLocationsFunctionsService.PatchP  s1     ##G,f__
'  8 8r&   c                  H    t        j                  ddddgdgdgdddd	d
      S )Nrv   PATCHz1cloudfunctions.projects.locations.functions.patchr;   
updateMaskr<   rq   4CloudfunctionsProjectsLocationsFunctionsPatchRequestr?   Fr@   rL   rN   r&   r%   rO   z;CloudfunctionsV1.ProjectsLocationsFunctionsService.<lambda>]  s6    ("8"8\ExH"^"%P&#r&   c                 L    | j                  d      }| j                  |||      S )aS  Sets the IAM access control policy on the specified function. Replaces any existing policy.

      Args:
        request: (CloudfunctionsProjectsLocationsFunctionsSetIamPolicyRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (Policy) The response message.
      SetIamPolicyr0   r2   r5   s       r%   r   z?CloudfunctionsV1.ProjectsLocationsFunctionsService.SetIamPolicyk  r   r&   c                  F    t        j                  ddddgdgg ddddd	
      S )NzUv1/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}:setIamPolicyrg   z8cloudfunctions.projects.locations.functions.setIamPolicyr   zv1/{+resource}:setIamPolicysetIamPolicyRequest;CloudfunctionsProjectsLocationsFunctionsSetIamPolicyRequestr   Fr@   rL   rN   r&   r%   rO   z;CloudfunctionsV1.ProjectsLocationsFunctionsService.<lambda>x  s4    )?)?iL"|L3+W#*r&   c                 L    | j                  d      }| j                  |||      S )a  Tests the specified permissions against the IAM access control policy for a function. If the function does not exist, this will return an empty set of permissions, not a NOT_FOUND error.

      Args:
        request: (CloudfunctionsProjectsLocationsFunctionsTestIamPermissionsRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (TestIamPermissionsResponse) The response message.
      TestIamPermissionsr0   r2   r5   s       r%   r   zECloudfunctionsV1.ProjectsLocationsFunctionsService.TestIamPermissions  s2     ##$89f__
'  8 8r&   c                  F    t        j                  ddddgdgg ddddd	
      S )Nz[v1/projects/{projectsId}/locations/{locationsId}/functions/{functionsId}:testIamPermissionsrg   z>cloudfunctions.projects.locations.functions.testIamPermissionsr   z!v1/{+resource}:testIamPermissionstestIamPermissionsRequestACloudfunctionsProjectsLocationsFunctionsTestIamPermissionsRequestTestIamPermissionsResponseFr@   rL   rN   r&   r%   rO   z;CloudfunctionsV1.ProjectsLocationsFunctionsService.<lambda>  s4    x/E/EoR"|L91]70r&   r*   )rY   rZ   r[   r\   r]   r   re   r^   rl   rt   rz   r   r/   r   rQ   r   r   r   r_   r`   s   @r%   r   rb   n   s    F*E
8D8F8F8)%8'#8C8"L8D8E8"L8($$r&   r   c                   >     e Zd ZdZdZ fdZddZd e_         xZS ))CloudfunctionsV1.ProjectsLocationsServicez2Service class for the projects_locations resource.r   c                 N    t         t        j                  |   |       i | _        y r*   )r   r   r   r   r+   r,   s     r%   r   z2CloudfunctionsV1.ProjectsLocationsService.__init__  s#    55tEfMdr&   c                 L    | j                  d      }| j                  |||      S )a7  Lists information about the supported locations for this service.

      Args:
        request: (CloudfunctionsProjectsLocationsListRequest) input message
        global_params: (StandardQueryParameters, default: None) global arguments
      Returns:
        (ListLocationsResponse) The response message.
      rQ   r0   r2   r5   s       r%   rQ   z.CloudfunctionsV1.ProjectsLocationsService.List  rR   r&   c                  J    t        j                  ddddgdgg ddddd	d
      S )Nz"v1/projects/{projectsId}/locationsr:   z&cloudfunctions.projects.locations.listr;   )extraLocationTypesrT   rU   rV   zv1/{+name}/locationsr=   *CloudfunctionsProjectsLocationsListRequestListLocationsResponseFr@   rL   rN   r&   r%   rO   z2CloudfunctionsV1.ProjectsLocationsService.<lambda>  s4    !7!76:xHN,F2"r&   r*   )	rY   rZ   r[   r\   r]   r   rQ   r^   r_   r`   s   @r%   r   r     s"    < E
8Dr&   r   c                   &     e Zd ZdZdZ fdZ xZS ) CloudfunctionsV1.ProjectsServicez(Service class for the projects resource.r!   c                 N    t         t        j                  |   |       i | _        y r*   )r   r   r    r   r+   r,   s     r%   r   z)CloudfunctionsV1.ProjectsService.__init__  s#    ,,d<VDdr&   )rY   rZ   r[   r\   r]   r   r_   r`   s   @r%   r    r     s    2E r&   r    )r=   NTNNFFNNNN)rY   rZ   r[   r\   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`   s   @r%   r   r   
   s    G/5(?-(=>'(*"."+),()-6:/4<@?C	/(=(11 =~q(*A*A qf	#!8!8 #J//  r&   r   N)
r\   
__future__r   apitools.base.pyr   7googlecloudsdk.generated_clients.apis.cloudfunctions.v1r   r   BaseApiClientr   rN   r&   r%   <module>r      s'    = ' % jDx-- Dr&   