
    b                         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K	Jr  SS	KJr  SS
KJr   " S S\
R"                  5      rg)zGCommand to list all of the workforce pools under a parent organization.    )absolute_import)division)unicode_literals)
list_pager)util)base)
exceptions)iam_util)flagsc                   .    \ rS rSrSr\S 5       rS rSrg)List   a  List the workforce pools for an organization.

Lists all of the workforce pools for an organization given a valid
organization ID.

This command can fail for the following reasons:
* The organization specified does not exist.
* The active account does not have permission to access the organization.

## EXAMPLES

The following command lists the workforce pools for an organization with the
ID ``12345'', including soft-deleted pools:

  $ {command} --organization=12345 --location=global --show-deleted
c                     [         R                  " U S5        [         R                  " U S5        U R                  SSSS9  [        R
                  R                  U 5        g )Nlistz--show-deleted
store_truez:Show soft-deleted workforce pools by specifying this flag.)actionhelp)r   AddParentFlagsAddLocationFlagadd_argumentr   URI_FLAGRemoveFromParser)parsers    'lib/surface/iam/workforce_pools/list.pyArgs	List.Args0   sS    	(	&&)
I  K 	MM""6*    c           
         UR                   b&  UR                   S:  a  [        R                  " S5      e[        R                  " 5       u  p#UR
                  (       d  [        R                  " SS5      e[        R                  " UR
                  S S5      n[        R                  " UR                  UR                  UUR                  [        R                  " U5      S9SUR                   UR                   SS	9$ )
N   zLimit size must be >=1z--organizationz4Should specify the organization for workforce pools.zworkforce pools)parentshowDeletedlocationworkforcePoolspageSize)fieldlimit
batch_sizebatch_size_attribute)r&   gcloud_exceptionsInvalidArgumentExceptionr   GetClientAndMessagesorganizationRequiredArgumentExceptionr
   GetParentNamer   YieldFromListlocations_workforcePools%IamLocationsWorkforcePoolsListRequestshow_deletedr   ParseLocation	page_size)selfargsclientmessagesparent_names        r   RunList.Run:   s    zz4::>667OPP002F77

@B B (():):D):<K##''66))((. 	7 	0 jj>>'	) 	)r    N)	__name__
__module____qualname____firstlineno____doc__staticmethodr   r:   __static_attributes__r<   r   r   r   r      s     " + +)r   r   N)rA   
__future__r   r   r   apitools.base.pyr   googlecloudsdk.api_lib.iamr   googlecloudsdk.callioper   r	   r)   googlecloudsdk.command_lib.iamr
   .googlecloudsdk.command_lib.iam.workforce_poolsr   ListCommandr   r<   r   r   <module>rK      s:    N &  ' ( + ( C 3 @0)4 0)r   