
                         J   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 e
j                   e
j                  e
j                  j                   e
j                  j"                  e
j                  j$                         G d	 d
e
j&                                      Zy)z!Get IAM operation policy command.    )absolute_import)division)unicode_literals)dataproc)iam_helpers)base)flagsc                   &    e Zd ZdZed        Zd Zy)GetIamPolicyzGet IAM policy for an operation.

  Gets the IAM policy for an operation, given an operation ID.

  ## EXAMPLES

  The following command prints the IAM policy for an operation with the ID
  `example-operation`:

    $ {command} example-operation
  c                     t        j                  | j                               }t        j                  |d|j
                         t        j                  j                  |       y )Nzretrieve the policy for)	dpDataprocReleaseTrackr	   AddOperationResourceArgapi_versionr   URI_FLAGRemoveFromParser)clsparserr   s      1lib/surface/dataproc/operations/get_iam_policy.pyArgszGetIamPolicy.Args,   sG    {{3++-.H	!!&*C"*"6"68MM""6*    c                    t        j                  | j                               }|j                  }|j                  j
                  j                         }|j                  |j                         |j                  |j                  t        j                                    }|j                  j                  j                  |      S )N)requestedPolicyVersion)options)resourcegetIamPolicyRequest)r   r   r   messagesCONCEPTS	operationParse4DataprocProjectsRegionsOperationsGetIamPolicyRequestRelativeNameGetIamPolicyRequestGetPolicyOptionsr   !MAX_LIBRARY_IAM_SUPPORTED_VERSIONclientprojects_regions_operationsr   )selfargsr   msgsoperation_refrequests         r   RunzGetIamPolicy.Run3   s    {{4,,./HDMM++113MGG++- 44))'2'T'T *  5 
 H G ??66CCGLLr   N)__name__
__module____qualname____doc__classmethodr   r.    r   r   r   r      s!    

 + +Mr   r   N)r2   
__future__r   r   r   googlecloudsdk.api_lib.dataprocr   r   r   googlecloudsdk.callioper   #googlecloudsdk.command_lib.dataprocr	   UniverseCompatibleReleaseTracksr   ALPHABETAGAListCommandr   r4   r   r   <module>r?      s    ( &  ' : 7 ( 5 T..33T5F5F5I5I"M4## "M "Mr   