
    	                         S r SSKJr  SSKJr  SSKJr  SSKrSSKJr  SSKJ	r	  SSK
Jr   " S	 S
\	R                  5      rg)z*Command for access approval list requests.    )absolute_import)division)unicode_literalsN)requests)base)parentc                   V    \ rS rSrSrS\R                  " S5      0r\S 5       r	S r
Srg)	List   zgList Access Approval requests.

List Access Approval requests by parent (project/folder/organization).
EXAMPLESa          To list all approval requests owned by project my-project-123, run:

          $ {command} --project=my-project-123 --state=all

        To list pending approval requests owned by organization 999, run:

          $ {command} --organization=999

        or

          $ {command} --organization=999 --state=pending

        Note that the user needs to have permission
        accessapproval.requests.list on the project/folder/organization
        c                     [         R                  " U 5        U R                  SSSS9  [        R                  R                  U 5        g)zAdd command-specific args.z--statependingzfilter for request state)defaulthelpN)r   Argsadd_argumentr   URI_FLAGRemoveFromParser)parsers    ,lib/surface/access_approval/requests/list.pyr   	List.Args6   s@     KK
'  ) 	MM""6*    c                     [         R                  " U5      n[        R                  " UUR                  (       a  UR                  R                  5       S9$ SS9$ )zThis is what gets called when the user runs this command.

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

Returns:
  Some value that we want to have printed later.
N)r   filter)r   	GetParentr   r
   stateupper)selfargsps      r   RunList.Run@   sJ     	A=="jj

5 5.25 5r    N)__name__
__module____qualname____firstlineno____doc__textwrapdedentdetailed_helpstaticmethodr   r!   __static_attributes__r#   r   r   r
   r
      s=     
//  -( + +5r   r
   )r(   
__future__r   r   r   r)   &googlecloudsdk.api_lib.access_approvalr   googlecloudsdk.callioper   *googlecloudsdk.command_lib.access_approvalr   ListCommandr
   r#   r   r   <module>r3      s1    1 &  '  ; ( =054 05r   