
                         F   d Z ddlmZ ddlmZ ddlmZ ddl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;Command to list the policies on the given attachment point.    )absolute_import)division)unicode_literalsN)policies)base)policies_flagsc                   N    e Zd ZdZd ej
                  d      iZed        Zd Z	y)Listz0List the policies on the given attachment point.EXAMPLESz          The following command lists the IAM policy defined at the resource
          project ``123'' of kind ``denypolicies'':

            $ {command} --attachment-point=cloudresourcemanager.googleapis.com/projects/123 --kind=denypolicies
          c                    t         j                  j                  |        t        j                         j                  |        t        j                         j                  |        t        j                         j                  |        y )N)r   URI_FLAGRemoveFromParserflagsGetPageTokenFlagAddToParserGetAttachmentPointFlagGetKindFlag)parsers     lib/surface/iam/policies/list.pyArgsz	List.Args,   sY    MM""6*	((0	  "..v6	##F+    c                    t        j                  |j                  j                               }t        j                  |j                  j                               }|j
                  j                  dd      }|j                  j                  |j                  dj                  ||j                        |j                  |j                              }|S )N/z%2Fzpolicies/{}/{})parentpageSize	pageToken)apisGetClientInstancecalliope_commandReleaseTrackGetMessagesModuleattachment_pointreplacer   ListPoliciesIamPoliciesListPoliciesRequestformatkind	page_size
page_token)selfargsclientmessagesr"   results         r   RunzList.Run4   s    ##D$9$9$F$F$HIF%%d&;&;&H&H&JKH,,44S%@__))//#**+;TYYG^^oo 	0 	'(F
 Mr   N)
__name__
__module____qualname____doc__textwrapdedentdetailed_helpstaticmethodr   r/    r   r   r
   r
      s?     9 
(//  - , ,r   r
   )r3   
__future__r   r   r   r4   googlecloudsdk.api_lib.iamr   r   googlecloudsdk.callioper   googlecloudsdk.command_lib.iamr   r   UniverseCompatibleReleaseTracksr    ALPHABETAGAListCommandr
   r8   r   r   <module>rC      s    B &  '  7 ( B D%%++T->->-C-C%%((* 4  *  r   