
    5                        S r SSKJr  SSKJr  SSKJr  SSK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SS.rSrSrSrSrSrSrSrSrSrSrSr " S S\R:                  5      r\R>                  " \R@                  RB                  5      \RD                   " S S\RF                  5      5       5       r$\R>                  " \R@                  RJ                  5      \RD                   " S S\RF                  5      5       5       r&g) z/Command to describe a shared template revision.    )absolute_import)division)unicode_literalsN)shared_template_revisions)utils)base)
exceptions)
properties$Describe a shared template revision.a           To describe the shared template revision `my-revision` in shared template `my-shared-template`, space `my-space`, project `my-project` and location `us-central1`, run:

          $ {command} my-revision --shared-template=my-shared-template --space=my-space --project=my-project --location=us-central1

        Or run:

          $ {command} projects/my-project/locations/us-central1/spaces/my-space/sharedTemplates/my-shared-template/revisions/my-revision

        To describe a shared template revision `my-revision` in shared template `google-template` from the Google Catalog and location `us-central1`, run:

          $ {command} my-revision --shared-template=google-template --google-catalog --location=us-central1
        z         This command uses the designcenter/v1alpha API. The full documentation for
        this API can be found at:
        http://cloud.google.com/application-design-center/docs
        )DESCRIPTIONEXAMPLESzAPI REFERENCEzError parsing [revision].a  The [revision] resource is not properly specified.
Failed to find attribute [location]. The attribute can be set in the following ways:
- provide the argument `revision` on the command line with a fully specified name
- provide the argument `--location` on the command linea  The [revision] resource is not properly specified.
Failed to find attribute [project]. [project] must be specified unless using --google-catalog, a full resource name, or the core/project property is set. The attribute can be set in the following ways:
- provide the argument `revision` on the command line with a fully specified name
- provide the argument `--project` on the command line
- set the property `core/project`a\  The [revision] resource is not properly specified.
Failed to find attribute [space]. [space] must be specified unless using --google-catalog or a full resource name. The attribute can be set in the following ways:
- provide the argument `revision` on the command line with a fully specified name
- provide the argument `--space` on the command linea  The [revision] resource is not properly specified.
Failed to find attribute [shared-template]. The attribute can be set in the following ways:
- provide the argument `revision` on the command line with a fully specified name
- provide the argument `--shared-template` on the command linea  ID of the revision or fully qualified identifier for the sharedTemplateRevision. Format: projects/$project/locations/$location/spaces/$space/sharedTemplates/$sharedTemplate/revisions/$revision
 To set the revision attribute:
  * provide the fully qualified identifier `revision` on the command line;
  * provide the argument `revision` which represents the revision id and the other arguments `--shared-template`, `--location`, `--project`, `--space` or `--google-catalog` on the command line.zThe sharedTemplate id of the revision resource.

To set the shared-template attribute:
  * provide the argument `revision` on the command line with a fully specified name;
  * provide the argument `--shared-template` on the command line.zThe location id of the revision resource.

To set the location attribute:
  * provide the argument `revision` on the command line with a fully specified name;
  * provide the argument `--location` on the command line.zThe project id of the revision resource.

To set the project attribute:
  * provide the argument `revision` on the command line with a fully specified name;
  * provide the argument `--project` on the command line;
  * set the property `core/project`.zThe space id of the revision resource.

To set the space attribute:
  * provide the argument `revision` on the command line with a fully specified name;
  * provide the argument `--space` on the command line.zIf provided, describes a shared template revision from the Google Catalog. This sets the project to "gcpdesigncenter" and space to "googlespace".c                       \ rS rSrSrSrg)#SharedTemplateRevisionResourceError   zAException for errors related to SharedTemplateRevision resources. N)__name__
__module____qualname____firstlineno____doc____static_attributes__r       Glib/surface/design_center/spaces/shared_templates/revisions/describe.pyr   r      s    Ir   r   c                   B    \ rS rSrSr\r\S 5       r\S 5       r	S r
Srg)DescribeAlpha   r   c                 B   U R                  SS[        S9  U R                  SS[        S9  U R                  SS[        S9  U R	                  5       nUR                  SS	[
        S
9  UR                  S5      nUR                  SS[        S9  UR                  SS[        S9  g NrevisionREVISION)metavarhelpz--shared-templateF)requiredr"   z
--locationz--google-catalog
store_true)actionr"   z:Specify --project and --space for custom shared templates.z	--projectz--space	add_argument_REVISION_HELP_TEXT_SHARED_TEMPLATE_HELP_TEXT_LOCATION_HELP_TEXTadd_mutually_exclusive_group_GOOGLE_CATALOG_HELP_TEXTadd_argument_group_PROJECT_HELP_TEXT_SPACE_HELP_TEXTparsergroupproject_space_groups      r   ArgsDescribeAlpha.Args            '       //1E	&    22D $$ % 
 $$ % r   c                 T    [         R                  " S5      nUR                  U 5      SL$ z,Validates the shared template revision name.zV^projects/[^/]+/locations/[^/]+/spaces/[^/]+/sharedTemplates/[^/]+/revisions(/[^/]+)?$Nrecompilematchnamepatterns     r   ValidSharedTemplateRevisionName-DescribeAlpha.ValidSharedTemplateRevisionName   +     jjaG ==d**r   c                    [         R                  " [        R                  R                  S9nU R                  UR                  5      (       a  UR                  S5      (       dS  UR                  S5      (       d=  UR                  S5      (       d'  UR                  S5      (       d  UR                  (       a  [        R                  " S5      eUR                  UR                  S9$ UR                  S5      (       d  [        [         S[         35      eUR                  nUR                  (       a  [         R"                  " 5       nS	nOUR$                  =(       d2    [&        R(                  R*                  R$                  R-                  5       nU(       d  [        [         S[.         35      eUR                  S5      (       d  [        [         S[0         35      eUR2                  nUR                  S5      (       d  [        [         S[4         35      eUR6                  nS
R9                  XCXVUR                  5      nUR                  US9$ zRun the describe command.)release_trackshared_templatelocationprojectspacez}--shared-template, --location, --project, --space, and --google-catalog cannot be used when a full resource name is provided.)r>   
googlespacezBprojects/{}/locations/{}/spaces/{}/sharedTemplates/{}/revisions/{})apisSharedTemplateRevisionsClientr   ReleaseTrackALPHAr@   r   IsSpecifiedgoogle_catalogr	   ConflictingArgumentsExceptionDescriber   _BASE_ERROR_MESSAGE_LOCATION_NOT_SPECIFIED_MESSAGErG   api_lib_utilsGetGoogleCatalogProjectIdrH   r
   VALUEScoreGet_PROJECT_NOT_SPECIFIED_MESSAGE_SPACE_NOT_SPECIFIED_MESSAGErI   &_SHARED_TEMPLATE_NOT_SPECIFIED_MESSAGErF   formatselfargsclientlocation_id
project_idspace_idshared_template_idshared_template_revision_names           r   RunDescribeAlpha.Run   s   //''--F
 ++DMM::


,
-
-j))i((g&&  66
 	

 __$--_00 J''/ !$C#D
E  --K ::<jh<<G:#4#4#9#9#A#A#E#E#Gj1"#2&D%EF
 	
 g&&1"#2&B%CD
 	
 h-../ !$J#K
L  --
 	M	X4==

 " ?? =?>>r   r   Nr   r   r   r   r   _DETAILED_HELPdetailed_helpstaticmethodr4   r@   rh   r   r   r   r   r   r      8     - -( (T + +;?r   r   c                   B    \ rS rSrSr\r\S 5       r\S 5       r	S r
Srg)
DescribeGai  r   c                 B   U R                  SS[        S9  U R                  SS[        S9  U R                  SS[        S9  U R	                  5       nUR                  SS	[
        S
9  UR                  S5      nUR                  SS[        S9  UR                  SS[        S9  g r   r&   r0   s      r   r4   DescribeGa.Args  r6   r   c                 T    [         R                  " S5      nUR                  U 5      SL$ r8   r9   r=   s     r   r@   *DescribeGa.ValidSharedTemplateRevisionName@  rB   r   c                    [         R                  " [        R                  R                  S9nU R                  UR                  5      (       a  UR                  S5      (       dS  UR                  S5      (       d=  UR                  S5      (       d'  UR                  S5      (       d  UR                  (       a  [        R                  " S5      eUR                  UR                  S9$ UR                  S5      (       d  [        [         S[         35      eUR                  nUR                  (       a  [         R"                  " 5       nS	nOUR$                  =(       d2    [&        R(                  R*                  R$                  R-                  5       nU(       d  [        [         S[.         35      eUR                  S5      (       d  [        [         S[0         35      eUR2                  nUR                  S5      (       d  [        [         S[4         35      eUR6                  nS
R9                  XCXVUR                  5      nUR                  US9$ rD   )rL   rM   r   rN   GAr@   r   rP   rQ   r	   rR   rS   r   rT   rU   rG   rV   rW   rH   r
   rX   rY   rZ   r[   r\   rI   r]   rF   r^   r_   s           r   rh   DescribeGa.RunH  s   //''**F
 ++DMM::


,
-
-j))i((g&&  66
 	

 __$--_00 J''/ !$C#D
E  --K ::<jh<<G:#4#4#9#9#A#A#E#E#Gj1"#2&D%EF
 	
 g&&1"#2&B%CD
 	
 h-../ !$J#K
L  --
 	M	X4==

 " ?? =?>>r   r   Nrj   r   r   r   rp   rp     rn   r   rp   )'r   
__future__r   r   r   r:   $googlecloudsdk.api_lib.design_centerr   rL   r   rV   googlecloudsdk.callioper   r	   googlecloudsdk.corecore_exceptionsr
   rk   rT   rU   r[   r\   r]   r(   r)   r*   r.   r/   r,   Errorr   ReleaseTracksrN   rO   UniverseCompatibleDescribeCommandr   rv   rp   r   r   r   <module>r      sT   6 &  ' 	 R G ( . = * :, 2 >  ( ; E '< H A + >  J/*?*? J D%%++,s?D(( s?  -s?l D%%(()s?%% s?  *s?r   