
                            S r SSKJr  SSKJr  SSKJr  SSKJr  SSKJ	r	  SSKJ
r
  SSKJr  SSKJr  SS	KJr  SS
KJr  SSS.r\	R&                  " \	R(                  R*                  5       " S S\R,                  5      5       r\	R&                  " \	R(                  R0                  5       " S S\5      5       r\	R&                  " \	R(                  R4                  5       " S S\5      5       rg)zDAdd an invoker binding to the IAM policy of a Google Cloud Function.    )absolute_import)division)unicode_literals)util)base)parser_extensions)flags)command)iam_utila        Adds an invoker role IAM policy binding that allows the specified member
      to invoke the specified function.

      For Cloud Functions (1st gen), this adds the Cloud Functions Invoker
      binding to the IAM policy of the specified function.

      For Cloud Functions (2nd gen), this adds the Cloud Run Invoker binding to
      the IAM policy of the specified function's underlying Cloud Run service.
      z          To add the invoker role policy binding for `FUNCTION-1` for member
          `MEMBER-1` run:

            $ {command} FUNCTION-1 --member=MEMBER-1
          )DESCRIPTIONEXAMPLESc                   T    \ rS rSrSr\r\S 5       rS\	R                  4S jrS rSrg)	AddInvokerPolicyBinding2   }Adds an invoker binding to the IAM policy of a Google Cloud Function.

This command applies to Cloud Functions 2nd gen only.
c                     [         R                  " U S5        [         R                  " U SSS9  [        R                  " U SS5        g)z!Registers flags for this command.zto add the invoker binding toT)hiddenzto add to the IAM policyFN)r	   AddFunctionResourceArgAddGen2Flagr   AddMemberFlag)parsers    3lib/surface/functions/add_invoker_policy_binding.pyArgsAddInvokerPolicyBinding.Args;   s;     
  )HI	f=dK6#=uE    argsc                     [         R                  " UR                  R                  R	                  5       R                  5       UR                  SS9$ )Nzroles/cloudfunctions.invoker)memberrole)api_util_v1AddFunctionIamPolicyBindingCONCEPTSnameParseRelativeNamer   selfr   s     r   _RunV1AddInvokerPolicyBinding._RunV1B   s>    22  "//1{{+ r   c                 J    [         R                  " XR                  5       5      $ )N)
command_v2RunReleaseTrackr&   s     r   _RunV2AddInvokerPolicyBinding._RunV2I   s    >>$ 1 1 344r    N)__name__
__module____qualname____firstlineno____doc___DETAILED_HELPdetailed_helpstaticmethodr   r   	Namespacer(   r.   __static_attributes__r0   r   r   r   r   2   s:    
 !-F F*44 5r   r   c                       \ rS rSrSrSrg)AddInvokerPolicyBindingBetaM   r   r0   Nr1   r2   r3   r4   r5   r:   r0   r   r   r<   r<   M       r   r<   c                       \ rS rSrSrSrg)AddInvokerPolicyBindingAlphaU   z|Add an invoker binding to the IAM policy of a Google Cloud Function.

This command applies to Cloud Functions 2nd Gen only.
r0   Nr>   r0   r   r   rA   rA   U   r?   r   rA   N)r5   
__future__r   r   r   #googlecloudsdk.api_lib.functions.v1r   r    googlecloudsdk.callioper   r   $googlecloudsdk.command_lib.functionsr	   Bgooglecloudsdk.command_lib.functions.v2.add_invoker_policy_bindingr
   r+   googlecloudsdk.command_lib.iamr   r6   ReleaseTracksr-   GAFunctionResourceCommandr   BETAr<   ALPHArA   r0   r   r   <module>rN      s    K &  ' C ( 5 6 5 d 3	
( D%%(()5d:: 5 *54 D%%**+"9  , D%%++,#>  -r   