
                            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  ej                  ej                  j                          G d
 dej"                               Z ej                  ej                  j&                         G d de             Z ej                  ej                  j*                         G d de             Zddde_        y)z(Command for listing Filestore locations.    )absolute_import)division)unicode_literals)filestore_client)base)flags)
properties)	resourcesc                   >    e Zd ZdZej
                  Zed        Zd Z	y)ListList all Filestore locations.c                     | j                   j                  t        j                         d }| j                   j	                  |       y )Nc                     t        j                         }|j                  | j                  t         j                        }|j                         S N
collection)r   GetFilestoreRegistryParsenameLOCATIONS_COLLECTIONSelfLinkresourceregistryrefs      'lib/surface/filestore/locations/list.pyUriFunczList.Args.<locals>.UriFunc&   s@    !668hNN
--$4$I$I  Kc\\^    display_info	AddFormatr   LOCATIONS_LIST_FORMAT
AddUriFuncparserr   s     r   Argsz	List.Args"   s7    
!!%"="=> ""7+r   c                 0   t         j                  j                  t        j                  j
                  j                  j                         d      }t        j                  | j                        }t        |j                  ||j                              S )Nzfile.projectsr   )version)limit)r
   REGISTRYr   r	   VALUEScoreproject	GetOrFailr   FilestoreClient_API_VERSIONlistListLocationsr)   )selfargsproject_refclients       r   RunzList.Run.   su    $$**&&002" + $K --d6G6GHF$$[

$CDDr   N)
__name__
__module____qualname____doc__r   V1_API_VERSIONr0   staticmethodr&   r7    r   r   r   r      s(    %!00,	, 	,Er   r   c                   8    e Zd ZdZej
                  Zed        Zy)ListBetar   c                     | j                   j                  t        j                         d }| j                   j	                  |       y )Nc                     t        j                  t         j                        }|j                  | j                  t         j
                        }|j                         S r   )r   r   BETA_API_VERSIONr   r   r   r   r   s      r   r   zListBeta.Args.<locals>.UriFunc@   sK    !66

+
+-hNN
--$4$I$I  Kc\\^r   r   r$   s     r   r&   zListBeta.Args<   7    
!!%"="=> ""7+r   N)	r8   r9   r:   r;   r   rC   r0   r=   r&   r>   r   r   r@   r@   6   s"    %!22,
, 
,r   r@   c                   8    e Zd ZdZej
                  Zed        Zy)	ListAlphar   c                     | j                   j                  t        j                         d }| j                   j	                  |       y )Nc                     t        j                  t         j                        }|j                  | j                  t         j
                        }|j                         S r   )r   r   ALPHA_API_VERSIONr   r   r   r   r   s      r   r   zListAlpha.Args.<locals>.UriFuncT   sK    !66

,
,.hNN
--$4$I$I  Kc\\^r   r   r$   s     r   r&   zListAlpha.ArgsP   rD   r   N)	r8   r9   r:   r;   r   rI   r0   r=   r&   r>   r   r   rF   rF   J   s"    %!33,
, 
,r   rF   r   zThe following command lists a maximum of five Filestore locations sorted
alphabetically by name in descending order:

  $ {command} --limit=5 --sort-by=~name
)DESCRIPTIONEXAMPLESN)r;   
__future__r   r   r    googlecloudsdk.api_lib.filestorer   googlecloudsdk.callioper   .googlecloudsdk.command_lib.filestore.locationsr   googlecloudsdk.corer	   r
   ReleaseTracksReleaseTrackGAListCommandr   BETAr@   ALPHArF   detailed_helpr>   r   r   <module>rX      s    / &  ' = ( @ * ) D%%(()E4 E *E2 D%%**+,t , ,,& D%%++,, , -,* 	(		
 r   