
                            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lmZ dd	lmZ  ej&                  ej(                  j*                         G d
 dej,                               Z ej&                  ej(                  j0                         G d de             Z ej&                  ej(                  j4                         G d de             Zddde_        y)z)Command for listing Filestore operations.    )absolute_import)division)unicode_literals)filestore_client)base)flags)concept_parsers)
propertiesc                   >    e Zd ZdZej
                  Zed        Zd Z	y)ListList all Filestore operations.c                 ,   t        j                  t        j                  d      g      j	                  |        t        j                  |        | j                  j                  t        j                         d }| j                  j                  |       y )N)The location in which to list operations.c                     t        j                         }|j                  | j                  t         j                        }|j                         S N)
collection)r   GetFilestoreRegistryParsenameOPERATIONS_COLLECTIONSelfLinkresourceregistryrefs      (lib/surface/filestore/operations/list.pyUriFunczList.Args.<locals>.UriFunc-   sA    !668hNN
--%;;  =c \\^    r	   ConceptParserr   "GetListingLocationPresentationSpecAddToParserinstances_flagsAddLocationArgdisplay_info	AddFormatoperations_flagsOPERATIONS_LIST_FORMAT
AddUriFuncparserr   s     r   Argsz	List.Args$   sv    !!		1	17
9 	: k&""6*
!!"2"I"IJ ""7+r   c                    t         j                  j                  j                  j	                          |j
                  j                  j                         j                         }|j                  =|j                  1|j                  d      }|j                  |d<   dj                  |      }t        j                  | j                        }t        |j!                  ||j"                              S )N/)version)limit)r
   VALUEScoreproject	GetOrFailCONCEPTSzoner   RelativeNamelocationsplitjoinr   FilestoreClient_API_VERSIONlistListOperationsr1   )selfargslocation_reflocation_listclients        r   RunzList.Run6   s    "",,.==%%++-::<LyyT]]6"((-m--mBXXm,l--d6G6GHF%%l$**%EFFr   N)
__name__
__module____qualname____doc__r   V1_API_VERSIONr=   staticmethodr,   rE    r   r   r   r      s(    &!00,, ,"
Gr   r   c                   8    e Zd ZdZej
                  Zed        Zy)ListBetar   c                 ,   t        j                  t        j                  d      g      j	                  |        t        j                  |        | j                  j                  t        j                         d }| j                  j                  |       y )Nr   c                     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>.UriFuncR   sL    !66

+
+-hNN
--%;;  =c \\^r   r   r*   s     r   r,   zListBeta.ArgsI   v    !!		1	17
9 	: k&""6*
!!"2"I"IJ ""7+r   N)	rF   rG   rH   rI   r   rQ   r=   rK   r,   rL   r   r   rN   rN   C   s"    &!22,, ,r   rN   c                   8    e Zd ZdZej
                  Zed        Zy)	ListAlphar   c                 ,   t        j                  t        j                  d      g      j	                  |        t        j                  |        | j                  j                  t        j                         d }| j                  j                  |       y )Nr   c                     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>.UriFuncl   sL    !66

,
,.hNN
--%;;  =c \\^r   r   r*   s     r   r,   zListAlpha.Argsc   rR   r   N)	rF   rG   rH   rI   r   rW   r=   rK   r,   rL   r   r   rT   rT   ]   s"    &!33,, ,r   rT   r   zThe following command lists a maximum of five Filestore operations sorted
alphabetically by name in descending order:

  $ {command} --limit=5 --sort-by=~name
)DESCRIPTIONEXAMPLESN)rI   
__future__r   r   r    googlecloudsdk.api_lib.filestorer   googlecloudsdk.callioper   $googlecloudsdk.command_lib.filestorer   .googlecloudsdk.command_lib.filestore.instancesr#   /googlecloudsdk.command_lib.filestore.operationsr'   (googlecloudsdk.command_lib.util.conceptsr	   googlecloudsdk.corer
   ReleaseTracksReleaseTrackGAListCommandr   BETArN   ALPHArT   detailed_helprL   r   r   <module>ri      s    0 &  ' = ( 6 S U D * D%%(()!G4 !G *!GH D%%**+,t , ,,2 D%%++,, , -,4 4 r   