
                            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  \R                   \R"                  " \R$                  R&                  5       " S
 S\R(                  5      5       5       r\R,                  \R"                  " \R$                  R.                  5       " S S\5      5       5       rg)zList all versions for a secret.    )api)base)parser_arguments)parser_extensions)args)fmt)resource_expr_rewrite)resource_projection_specc                   ~    \ rS rSrSr\S\R                  4S j5       rS\	R                  S\R                  4S jrSrg	)
List   List all versions for a secret.

List all versions and their status (For example: active/disabled/destroyed)
for a secret.

## EXAMPLES

List all versions for the secret named 'my-secret':

  $ {command} my-secret
parserc                     [         R                  " U SSSS9  [         R                  " U SSS9  [        R                  R                  U S5        g)	zArgs is called by calliope to gather arguments for secrets versions list command.

Args:
  parser: An argparse parser that you can use to add arguments that will be
    available to this command.
from which to list versionsTpurpose
positionalrequiredto create secretFr   hiddend   Nsecrets_args	AddSecretAddLocationr   PAGE_SIZE_FLAG
SetDefaultr   s    $lib/surface/secrets/versions/list.pyArgs	List.Args+   sI     -	 V-?N""63/    r   returnc                 p   [         R                  " U R                  5       5      nUR                  R                  R                  5       nUR                  (       a  [        R                  " XS9  O[        R                  " XS9  SnUR                  (       aj  [        R                  " 5       nUR                  5       n[        R                  " UR                   UR"                  S9nUR%                  UR                  US9u  p[         R&                  " US9R)                  UUR*                  UUR                  S9$ )zRun is called by calliope to implement the secret versions list command.

Args:
  args: an argparse namespace, all the arguments that were provided to this
    command invocation.

Returns:
  API call to invoke secret version list.
api_versionNsymbolsaliasesdefaults
secret_reflimitrequest_filtersecret_locationsecrets_apiGetApiFromTrackReleaseTrackCONCEPTSsecretParselocationsecrets_fmt'RegionalSecretVersionTableUsingArgumentSecretVersionTableUsingArgumentfilterr	   BackendGetDisplayInfor
   ProjectionSpec
transformsr+   RewriteVersionsListWithPagerr0   	selfr   r(   r/   server_filterrewriterdisplay_infor-   _s	            r!   RunList.Run<   s     --d.?.?.ABK%%++-J}}99
 11$PM{{&..0h((*l)88))<3G3Gh "))$++)IaK8FFjj$	 G  r$    N)__name__
__module____qualname____firstlineno____doc__staticmethodr   ArgumentInterceptorr"   r   	Namespacer4   rD   rL   __static_attributes__rN   r$   r!   r   r      sI    
 0#77 0 0  '11  k6J6J  r$   r   c                   .    \ rS rSrSr\S 5       rS rSrg)ListBeta_   r   c                     [         R                  " U SSSS9  [         R                  " U SSS9  [        R                  R                  U S5        g )Nr   Tr   r   Fr   r   r   r    s    r!   r"   ListBeta.Argsn   sG    -	 V-?N""63/r$   c                 p   [         R                  " U R                  5       5      nUR                  R                  R                  5       nUR                  (       a  [        R                  " XS9  O[        R                  " XS9  S nUR                  (       aj  [        R                  " 5       nUR                  5       n[        R                  " UR                   UR"                  S9nUR%                  UR                  US9u  p[         R&                  " US9R)                  UUR*                  UUR                  S9$ )Nr'   r)   r,   r.   r3   rF   s	            r!   rL   ListBeta.Runy   s    --d.?.?.ABK%%++-J}}99
 11$PM{{&..0h((*l)88))<3G3Gh "))$++)IaK8FFjj$	 G  r$   rN   N)	rO   rP   rQ   rR   rS   rT   r"   rL   rW   rN   r$   r!   rY   rY   _   s     
 0 0r$   rY   N)rS   googlecloudsdk.api_lib.secretsr   r4   googlecloudsdk.callioper   r   r   "googlecloudsdk.command_lib.secretsr   r   r   r;   googlecloudsdk.core.resourcer	   r
   UniverseCompatibleReleaseTracksr6   GAListCommandr   DefaultUniverseOnlyBETArY   rN   r$   r!   <module>ri      s    & > ( 4 5 C A > A D%%(()>4 > * >B D%%**+/t / , /r$   