
                            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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\5      5       r\R                   \l         g)z-Command for listing available configurations.    )base)commands)connection_context)flags)	platforms)pretty_print)resource_args)serverless_operations)concept_parsers)presentation_specs)logc                   R    \ rS rSrSrSSS.r\S 5       r\S 5       rSS jr	S	 r
S
rg)List   _List available Configurations.

Every Configuration is paired with a Service of the same name.
z"          {description}
          zK          To list available services:

              $ {command}
          )DESCRIPTIONEXAMPLESc           	          [         R                  " S[        R                  " 5       SSSSS9n[        R
                  " U/5      R                  U5        UR                  R                  U R                  5        g )Nz--namespacez$Namespace to list configurations in.TF)requiredprefixeshidden)
r   ResourcePresentationSpecr	   GetNamespaceResourceSpecr   ConceptParserAddToParserdisplay_info
AddUriFunc_GetResourceUri)clsparsernamespace_presentations      &lib/surface/run/configurations/list.py
CommonArgsList.CommonArgs1   sj     0HH..0. !!	 ""-+f"5
""3#6#67    c                 &    U R                  U5        g Nr#   r   r    s     r"   Args	List.Args@       NN6r%   c                 B   [         R                  S/nU(       a  UR                  S5        U(       a  UR                  S5        UR                  SS/5        UR	                  5       R                  SR                  SR                  U5      [        R                  S95        g	)
zSet display format for output.

Args:
  args: Namespace, the args namespace
  show_region: bool, True to show region of listed services
  show_namespace: bool, True to show namespace of listed services
z-firstof(id,metadata.name):label=CONFIGURATIONzregion:label=REGIONznamespace:label=NAMESPACEz8status.latestCreatedRevisionName:label="LATEST REVISION"z5status.latestReadyRevisionName:label="READY REVISION"ztable({columns}):({alias}),)columnsaliasN)
r   READY_COLUMNappendextendGetDisplayInfo	AddFormatformatjoinr   SATISFIES_PZS_ALIAS)selfargsshow_regionshow_namespacer/   s        r"   
_SetFormatList._SetFormatD   s     	!!7G nn*+nn01NNB?  	##$++HHW%X-I-I 	, 	
r%   c                    [         R                  " 5       [         R                  :H  n[        R                  " U[
        R                  R                  U R                  5       5      nU R                  XU(       + S9  UR                  R                  R                  5       n[        R                  " U5       nU R                  UR                   5        U(       de  SR#                  UR$                  5      n[&        R(                  R+                  SR#                  UR,                  UR$                  (       a  UOSS95        [.        R0                  " UR3                  U5      5      sSSS5        $ ! , (       d  f       g= f)zList available configurations.)r;   r<   z in zone [{}]zFor cluster [{cluster}]{zone}: )clusterzoneN)r   GetPlatformPLATFORM_MANAGEDr   GetConnectionContextr   ProductRUNReleaseTrackr=   CONCEPTS	namespaceParser
   ConnectSetCompleteApiEndpointendpointr6   cluster_locationr   statusPrintcluster_namer   
SortByNameListConfigurations)r9   r:   
is_managedconn_contextnamespace_refclient
zone_labels          r"   RunList.Run^   s   &&(I,F,FFJ%::emm!2!2!46LOO*n  GMM++113M		&	&|	4
!!,"7"78$++L,I,IJ


9@@ --+<<" A F 	G   !:!:=!IJ 
5	4	4s   4B,E**
E8 N)FF)__name__
__module____qualname____firstlineno____doc__detailed_helpclassmethodr#   r*   r=   rZ   __static_attributes__r\   r%   r"   r   r      sK    		- 8 8  4Kr%   r   c                   (    \ rS rSrSr\S 5       rSrg)	AlphaListp   r   c                 &    U R                  U5        g r'   r(   r)   s     r"   r*   AlphaList.Argsw   r,   r%   r\   N)r]   r^   r_   r`   ra   rc   r*   rd   r\   r%   r"   rf   rf   p   s    
  r%   rf   N)ra   googlecloudsdk.callioper   googlecloudsdk.command_lib.runr   r   r   r   r   r	   r
   (googlecloudsdk.command_lib.util.conceptsr   r   googlecloudsdk.corer   ReleaseTracksrH   BETAGAr   ALPHArf   r\   r%   r"   <module>rr      s    4 ) 3 = 0 4 7 8 @ D G # D%%**D,=,=,@,@AMK8== MK BMK` D%%++,  - LL	 r%   