
    J	                        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	S
.r
\	R                  \	R                  " \	R                  R                  5       " S S\	R                  5      5       5       r\
\l        g)z''logging views get_iam_policy' command.    )absolute_import)division)unicode_literals)util)arg_parsers)basez,
        Get the IAM policy for a view.
    zr
     To describe a view in a project, run:

        $ {command} my-view --bucket=my-bucket --location=global
    )DESCRIPTIONEXAMPLESc                   .    \ rS rSrSr\S 5       rS rSrg)GetIamPolicy&   z"Display the IAM policy for a view.c                     U R                  SSS9  [        R                  " U S5        [        R                  " U SS5        U R                  SS[        R
                  " SS	5      S
S9  g)z Register flags for this command.VIEW_IDz"ID of the view to fetch IAM policy)helpzview to fetch IAM policyTz-Location of the bucket that contains the viewz--bucketz.+zmust be non-emptyz%ID of the bucket that holds the view.)requiredtyper   N)add_argumentr   AddParentArgsAddBucketLocationArgr   RegexpValidator)parsers    +lib/surface/logging/views/get_iam_policy.pyArgsGetIamPolicy.Args+   sn     	(LMv9:E ((0CD4	      c                     [         R                  " [         R                  " [         R                  " U5      SUR                  5      SUR                  5      n[         R
                  " U5      $ )zThis is what get-iam-policy called when the user runs this command.

Args:
  args: an argparse namespace. All the arguments that were provided to this
    command invocation.

Returns:
  The IAM policy for the specified view
bucketsviews)r   CreateResourceNameGetBucketLocationFromArgsbucketr   r   )selfargsviews      r   RunGetIamPolicy.Run:   sW     ""**40)T[[	
 	D T""r    N)	__name__
__module____qualname____firstlineno____doc__staticmethodr   r%   __static_attributes__r'   r   r   r   r   &   s     + #r   r   N)r,   
__future__r   r   r   googlecloudsdk.api_lib.loggingr   googlecloudsdk.callioper   r   DETAILED_HELPUniverseCompatibleReleaseTracksReleaseTrackGACommandr   detailed_helpr'   r   r   <module>r9      s~    . '  ' / / (		 D%%(()##4<< ## * ##L + r   