
                            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 ddlmZ ddlmZ ddlmZ ej$                   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(                  j2                         G d de             Zy)z(Surface for listing all domain mappings.    )absolute_import)division)unicode_literals)base)commands)connection_context)flags)	platforms)pretty_print)resource_args)serverless_operations)concept_parsers)presentation_specsc                   D    e Zd ZdZdZdddZed        Zed        Zd Z	y	)
Listz/Lists domain mappings for Cloud Run for Anthos.Tz          {description}

          For domain mapping support with fully managed Cloud Run, use
          `gcloud beta run domain-mappings list`.[          To list all Cloud Run domain mappings, run:

              $ {command}
          DESCRIPTIONEXAMPLESc                    t        j                  dt        j                         dddd      }t	        j
                  |g      j                  |       |j                  j                  dj                  t        j                  t        j                               |j                  j                  | j                         y )Nz--namespacez%Namespace to list domain mappings in.TF)requiredprefixeshiddenztable(
        {ready_column},
        metadata.name:label=DOMAIN,
        route_name:label=SERVICE,
        region:label=REGION):({alias}))ready_columnalias)r   ResourcePresentationSpecr   GetNamespaceResourceSpecr   ConceptParserAddToParserdisplay_info	AddFormatformatr   READY_COLUMNr   SATISFIES_PZS_ALIAS
AddUriFunc_GetResourceUri)clsparsernamespace_presentations      'lib/surface/run/domain_mappings/list.py
CommonArgszList.CommonArgs8   s     0HH..0/ !!	 ""-+f"5
!!	* +1&%22.. +1 +
	 ""3#6#67    c                 &    | j                  |       y Nr+   r'   r(   s     r*   Argsz	List.ArgsR       NN6r,   c                    t        j                  |t        j                  j                  | j                         t        j                         t        j                  k7  rdnd      }|j                  j                  j                         }t        j                  |      5 }| j                  |j                         t!        j"                  |j%                  |            cddd       S # 1 sw Y   yxY w)zList available domain mappings.v1alpha1N)version_override)r   GetConnectionContextr	   ProductRUNReleaseTrackr
   GetPlatformPLATFORM_MANAGEDCONCEPTS	namespaceParser   ConnectSetCompleteApiEndpointendpointr   
SortByNameListDomainMappings)selfargsconn_contextnamespace_refclients        r*   RunzList.RunV   s     &::#//1Y5O5OO %#&L MM++113M		&	&|	4
!!,"7"78  !:!:=!IJ 
5	4	4s    ?C))C2N)
__name__
__module____qualname____doc__r   detailed_helpclassmethodr+   r1   rI    r,   r*   r   r   !   sM     8 &5- 8 82  Kr,   r   c                   *    e Zd ZdZdddZed        Zy)BetaListLists domain mappings.z{description}r   r   c                 &    | j                  |       y r.   r/   r0   s     r*   r1   zBetaList.Argsu   r2   r,   N)rJ   rK   rL   rM   rN   rO   r1   rP   r,   r*   rR   rR   f   s*     		-  r,   rR   c                        e Zd ZdZed        Zy)	AlphaListrS   c                 &    | j                  |       y r.   r/   r0   s     r*   r1   zAlphaList.Args~   r2   r,   N)rJ   rK   rL   rM   rO   r1   rP   r,   r*   rV   rV   z   s     r,   rV   N)rM   
__future__r   r   r   googlecloudsdk.callioper   googlecloudsdk.command_lib.runr   r   r	   r
   r   r   r   (googlecloudsdk.command_lib.util.conceptsr   r   DefaultUniverseOnlyReleaseTracksr9   GAr   BETArR   ALPHArV   rP   r,   r*   <module>ra      s    / &  ' ( 3 = 0 4 7 8 @ D G D%%(()@K8== @K * @KF D%%**+t  ,& D%%++,  -r,   