
    A                         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                   G d	 d
e
j                               Zy)z)Get IAM workflow template policy command.    )absolute_import)division)unicode_literals)dataproc)iam_helpers)base)flagsc                   &    e Zd ZdZed        Zd Zy)GetIamPolicya	  Get IAM policy for a workflow template.

  Gets the IAM policy for a workflow template, given a template ID.

  ## EXAMPLES

  The following command prints the IAM policy for a workflow template with the
  ID `example-workflow`:

    $ {command} example-workflow
  c                     t        j                  | j                               }t        j                  |d|j
                         y )Nzretrieve the policy for)api_version)dpDataprocReleaseTrackr	   AddTemplateResourceArgr   )clsparserr   s      9lib/surface/dataproc/workflow_templates/get_iam_policy.pyArgszGetIamPolicy.Args*   s6    {{3++-.H	  )x7K7KM    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templateParse;DataprocProjectsRegionsWorkflowTemplatesGetIamPolicyRequestRelativeNameGetIamPolicyRequestGetPolicyOptionsr   !MAX_LIBRARY_IAM_SUPPORTED_VERSIONclient"projects_regions_workflowTemplatesr   )selfargsr   msgstemplate_refrequests         r   RunzGetIamPolicy.Run0   s    {{4,,./HD==))//1LNN**, 44))'2'T'T *  5 
 O G ??==JJ r   N)__name__
__module____qualname____doc__classmethodr   r,    r   r   r   r      s"    
 M M
r   r   N)r0   
__future__r   r   r   googlecloudsdk.api_lib.dataprocr   r   r   googlecloudsdk.callioper   #googlecloudsdk.command_lib.dataprocr	   DefaultUniverseOnlyCommandr   r2   r   r   <module>r9      sD     0 &  ' : 7 ( 5 "4<< " "r   