
    	                         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 dd	lmZ d
ddZ ej                   ej"                  j$                         G d dej&                               Zee_        y)z6List-custom-constraint command for the Org Policy CLI.    )absolute_import)division)unicode_literals)
list_pager)service)base)	arguments)utilszA      Lists the custom constraints set on an organization.
      zw      To list the custom constraints set on the Organization '1234', run:

      $ {command} --organization=1234
      )DESCRIPTIONEXAMPLESc                   &    e Zd ZdZed        Zd Zy)ListCustomConstraintsz4Lists the custom constraints set on an organization.c                 d    t        j                  |        | j                  j                  d       y )Na
  
        table(
        name.split('/').slice(-1).join():label=CUSTOM_CONSTRAINT,
        actionType:label=ACTION_TYPE,
        method_types.list():label=METHOD_TYPES,
        resource_types.list():label=RESOURCE_TYPES,
        display_name:label=DISPLAY_NAME)
     )r	   $AddOrganizationResourceFlagsToParserdisplay_info	AddFormat)parsers    3lib/surface/org_policies/list_custom_constraints.pyArgszListCustomConstraints.Args-   s)    226:
!! #	 
    c                 N   t        j                  | j                               }t        j                  | j                               }t	        j
                  |      }|j                  |      }t        j                  |j                  |d|j                  d|j                        S )N)parentcustomConstraintspageSize)fieldlimitbatch_size_attribute
batch_size)org_policy_serviceOrgPolicyClientReleaseTrackOrgPolicyMessagesr
   GetResourceFromArgs2OrgpolicyOrganizationsCustomConstraintsListRequestr   YieldFromListorganizations_customConstraintsr   	page_size)selfargsorg_policy_clientmessagesr   requests         r   RunzListCustomConstraints.Run:   s    *::4;L;L;NO!33D4E4E4GHH&&t,FII J G ##99!jj'>># #r   N)__name__
__module____qualname____doc__staticmethodr   r-    r   r   r   r   )   s    <

 

#r   r   N)r1   
__future__r   r   r   apitools.base.pyr    googlecloudsdk.api_lib.orgpolicyr   r   googlecloudsdk.callioper   'googlecloudsdk.command_lib.org_policiesr	   r
   DETAILED_HELPReleaseTracksr!   GAListCommandr   detailed_helpr3   r   r   <module>r>      sy    = &  ' ' J ( = 9	
	
 D%%(()#D,, # *#@ '4  #r   