
                         ~   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  \
R                  " \
R                  R                  \
R                  R                   5       " S	 S
\
R"                  5      5       r\
R                  " \
R                  R&                  5       " S S\
R"                  5      5       rg)z?Command to list all folder IDs associated with the active user.    )absolute_import)division)unicode_literals)
list_pager)folders)base)flagsc                   .    \ rS rSrSr\S 5       rS rSrg)ListBeta   a$  List folders accessible by the active account.

List all folders to which the user has access under the specified
parent (either an Organization or a Folder). Exactly one of --folder
or --organization must be provided.

## EXAMPLES

The following command lists folders under org with ID `123456789`:

  $ {command} --organization=123456789

The following command lists folders under folder with ID `123456789`:

  $ {command} --folder=123456789

The following command lists all the folders including the delete requested
ones under the folder with ID `123456789`:

  $ {command} --folder=123456789 --show-deleted

The following command lists only the deleted folders under folder with
ID `123456789`:

  $ {command} --folder=123456789 --show-deleted \

      --filter='lifecycleState:DELETE_REQUESTED':

c                     [         R                  " S5      R                  U 5        [         R                  " S5      R                  U 5        U R	                  SSSS9  U R
                  R                  S5        g )Nto list folders underz--show-deleted
store_truezj            Put --show-deleted flag to include folders
            for which delete is requested.
        )actionhelpz
        table(
          displayName:label=DISPLAY_NAME,
          parent:label=PARENT_NAME,
          name.segment():label=ID:align=right:sort=1,
          lifecycleState
        )
    )r	   FolderIdFlagAddToParserOrganizationIdFlagadd_argumentdisplay_info	AddFormatparsers    ,lib/surface/resource_manager/folders/list.pyArgsListBeta.Args;   so    	./;;FC	45AA&I
   !! # 	    c           	      ,   [         R                  " U5        [        R                  " [        R
                  " 5       [        R                  " 5       R                  [         R                  " U5      UR                  S9UR                  SUR                  SS9$ )Run the list command.)parentshowDeletedpageSizer   limitbatch_size_attribute
batch_sizefield)r	   CheckParentFlagsr   YieldFromListr   FoldersServiceFoldersMessages&CloudresourcemanagerFoldersListRequestGetParentFromFlagsshow_deletedr$   	page_sizeselfargss     r   RunListBeta.RunO   sy    	4 ## !HH++D1)) 	I 	+ jj'>> r    N	__name__
__module____qualname____firstlineno____doc__staticmethodr   r3   __static_attributes__r5   r   r   r   r      s     < 	 	&r   r   c                   .    \ rS rSrSr\S 5       rS rSrg)List]   a  List folders accessible by the active account.

List all folders to which the user has access under the specified
parent (either an Organization or a Folder). Exactly one of --folder
or --organization must be provided.

## EXAMPLES

The following command lists folders under org with ID `123456789`:

  $ {command} --organization=123456789

The following command lists folders under folder with ID `123456789`:

  $ {command} --folder=123456789
c                     [         R                  " S5      R                  U 5        [         R                  " S5      R                  U 5        U R                  R                  S5        g )Nr   z
        table(
          displayName:label=DISPLAY_NAME,
          parent:label=PARENT_NAME,
          name.segment():label=ID:align=right:sort=1
        )
    )r	   r   r   r   r   r   r   s    r   r   	List.Argsp   sO    	./;;FC	45AA&I
!! # 	r   c           	         [         R                  " U5        [        R                  " [        R
                  " 5       [        R                  " 5       R                  [         R                  " U5      S9UR                  SUR                  SS9$ )r   )r    r"   r   r#   )r	   r(   r   r)   r   r*   r+   r,   r-   r$   r/   r0   s     r   r3   List.Run|   sn    	4 ## !HH++D1 	I 	3jj'>> r   r5   Nr6   r5   r   r   r?   r?   ]   s     " 		 		
r   r?   N)r;   
__future__r   r   r   apitools.base.pyr   'googlecloudsdk.api_lib.resource_managerr   googlecloudsdk.callioper   +googlecloudsdk.command_lib.resource_managerr	   ReleaseTracksReleaseTrackALPHABETAListCommandr   GAr?   r5   r   r   <module>rP      s    F &  ' ' ; ( = D%%++T->->-C-CD>t > E>B D%%(()(4 ( *(r   