
                            d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlm	Z	 ddl
mZ ddlmZ  ej                  ej                   j"                         G d	 d
e	j$                  ej&                               Z ej                  ej                   j*                         G d de             Z ej                  ej                   j.                         G d de             Zy),Gets IAM policy for a Google Cloud Function.    )absolute_import)division)unicode_literals)base)flags)util)commandc                   6    e Zd ZdZdddZed        Zd Zd Zy)	GetIamPolicyz+Get IAM policy for a Google Cloud Function.z{description}zd          To get the iam policy for `FUNCTION-1` run:

            $ {command} FUNCTION-1
          )DESCRIPTIONEXAMPLESc                 ^    t        j                  | d       t        j                  | d       y)z!Registers flags for this command.zto get IAM policy forT)hiddenN)r   AddFunctionResourceArgAddGen2Flag)parsers    'lib/surface/functions/get_iam_policy.pyArgszGetIamPolicy.Args)   s%     
  )@A	fT*    c                 ,    t        j                  |      S N)
command_v1Runselfargss     r   _RunV1zGetIamPolicy._RunV1/   s    >>$r   c                 J    t        j                  || j                               S r   )
command_v2r   ReleaseTrackr   s     r   _RunV2zGetIamPolicy._RunV22   s    >>$ 1 1 344r   N)	__name__
__module____qualname____doc__detailed_helpstaticmethodr   r   r"    r   r   r   r      s4    3 %- + +
 5r   r   c                       e Zd ZdZy)GetIamPolicyBetar   Nr#   r$   r%   r&   r)   r   r   r+   r+   6       4r   r+   c                       e Zd ZdZy)GetIamPolicyAlphar   Nr,   r)   r   r   r/   r/   ;   r-   r   r/   N)r&   
__future__r   r   r   googlecloudsdk.callioper   $googlecloudsdk.command_lib.functionsr   r	   6googlecloudsdk.command_lib.functions.v1.get_iam_policyr
   r   6googlecloudsdk.command_lib.functions.v2.get_iam_policyr    ReleaseTracksr!   GAFunctionResourceCommandListCommandr   BETAr+   ALPHAr/   r)   r   r   <module>r;      s    3 &  ' ( 6 5 X X D%%(()54//1A1A 5 *52 D%%**+5| 5 ,5 D%%++,5( 5 -5r   