
                            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
 ej                   ej                  ej                  j                         G d	 d
ej                                      Z ej                  ej                  j"                  ej                  j$                         G d dej                               Zy)z%The gcloud run domain-mappings group.    )absolute_import)division)unicode_literals)base)
exceptions)flags)	platformsc                   :    e Zd ZdZdZdddZed        Zd Zd Z	y	)
DomainMappingszView and manage your Cloud Run for Anthos domain mappings.

  This set of commands can be used to view and manage your service's domain
  mappings.

  To view and manage fully managed Cloud Run domain mappings, use
  `gcloud beta run domain-mappings`.
  T{description}[          To list your Cloud Run domain mappings, run:

            $ {command} list
      DESCRIPTIONEXAMPLESc                 2    t        j                  | d       y)-Adds --platform and the various related args.T)anthos_onlyNr   AddPlatformAndLocationFlagsparsers    +lib/surface/run/domain_mappings/__init__.pyArgszDomainMappings.Args5   s     
%%f$?    c                     t        j                  || j                         t         j                  j                         | j                          |S )z@Runs before command.Run and validates platform with passed args.)r   GetAndValidatePlatformReleaseTrackProductRUN_CheckPlatform)selfcontextargss      r   FilterzDomainMappings.Filter:   s:     
  t'8'8':EMM<M<MNNr   c                 x    t        j                         t         j                  k(  rt        j                  d      y )NzaThis command group is in beta for fully managed Cloud Run; use `gcloud beta run domain-mappings`.)r	   GetPlatformPLATFORM_MANAGEDr   PlatformErrorr!   s    r   r    zDomainMappings._CheckPlatformB   s6    )"<"<<$$34 4 =r   N)
__name__
__module____qualname____doc__hiddendetailed_helpstaticmethodr   r$   r     r   r   r   r      s?     & 
		- @ @4r   r   c                   0    e Zd ZdZdddZed        Zd Zy)DomainMappingsBetazView and manage your Cloud Run domain mappings.

  This set of commands can be used to view and manage your service's domain
  mappings.
  r   r   r   c                 .    t        j                  |        y)r   Nr   r   s    r   r   zDomainMappingsBeta.Args\   s     
%%f-r   c                      y )Nr1   r)   s    r   r    z!DomainMappingsBeta._CheckPlatforma   s    r   N)r*   r+   r,   r-   r/   r0   r   r    r1   r   r   r3   r3   I   s1     
		- . .	r   r3   N)r-   
__future__r   r   r   googlecloudsdk.callioper   googlecloudsdk.command_lib.runr   r   r	   DefaultUniverseOnlyReleaseTracksr   GAGroupr   BETAALPHAr3   r1   r   r   <module>r?      s    , &  ' ( 5 0 4 D%%(())4TZZ )4 * )4X D%%**D,=,=,C,CD	 	 E	r   