
                              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	 jrSS
 jrSS jrS rS rSS jrS rS r    SS jr   SS jr   SS jrS rg)z2Shared resource flags for Cloud Composer commands.    )absolute_import)division)unicode_literals)concepts)deps)concept_parsers)
propertiesc                     U (       a9  [         R                  " [        R                  R                  R
                  5      /O/ n[        R                  " SSUS9$ Nlocationz8Compute Engine region in which to create the {resource}.name	help_textfallthroughsr   PropertyFallthroughr	   VALUEScomposerr   r    ResourceParameterAttributeConfigfallthroughs_enabledr   s     8lib/googlecloudsdk/command_lib/composer/resource_args.pyLocationAttributeConfigr      T      z0099BBC!#  
	2	2J
! !    c                     U (       a9  [         R                  " [        R                  R                  R
                  5      /O/ n[        R                  " SSUS9$ )Nr   zMRegion where Composer environment runs or in which to create the environment.r   r   r   s     r   "EnvironmentLocationAttributeConfigr   %   sT      z0099BBC!#  
	2	2_
! !r   c                     U (       a9  [         R                  " [        R                  R                  R
                  5      /O/ n[        R                  " SSUS9$ r   r   r   s     r    OperationLocationAttributeConfigr   /   r   r   c                  ,    [         R                  " SSS9$ )Nenvironmentz.Cloud Composer environment for the {resource}.r   r   r   r    r   r   EnvironmentAttributeConfigr%   9   s    		2	2@
B Br   c                  ,    [         R                  " SSS9$ )N	operationz,Cloud Composer operation for the {resource}.r"   r#   r$   r   r   OperationAttributeConfigr(   ?   s    		2	2>
@ @r   c           	      Z    [         R                  " SS[         R                  [        U S9S9$ )Nzcomposer.projects.locationsr   r   )resource_name
projectsIdlocationsId)r   ResourceSpec DEFAULT_PROJECT_ATTRIBUTE_CONFIGr   r*   s    r   GetLocationResourceSpecr0   E   s/    			#::)35	
6 6r   c                  n    [         R                  " SS[         R                  [        5       [	        5       S9$ )Nz(composer.projects.locations.environmentsr!   )r+   r,   r-   environmentsId)r   r.   r/   r   r%   r$   r   r   GetEnvironmentResourceSpecr3   N   s0    			0!::46/1
3 3r   c                  n    [         R                  " SS[         R                  [        5       [	        5       S9$ )Nz&composer.projects.locations.operationsr'   )r+   r,   r-   operationsId)r   r.   r/   r   r(   r$   r   r   GetOperationResourceSpecr6   W   s0    			.::24+-
/ /r   Nc           	          U=(       d    SnSU(       a  SOS-   n[        Xb5      n[        R                  R                  U[	        U(       + S9SR                  XaU5      UUS9R                  U 5        g)a  Add a resource argument for a Cloud Composer location.

Fallthroughs are disabled if the argument is plural, as this would cause
the fallthrough processor to iterate over each character in the fallthrough
value and parse it as a location ID.

NOTE: Must be used only if it's the only resource arg in the command.

Args:
  parser: the parser for the command
  verb: str, the verb to describe the resource, for example, 'to update'.
  positional: boolean, if True, means that the resource is a positional rather
      than a flag.
  required: boolean, if True, the arg is required
  plural: boolean, if True, expects a list of resources
  help_supplement: str, Supplementary help text specific to the command
      in which the resource arg is being used..
 r   sr*   zThe {} {}. {}requiredpluralN)_BuildArgNamer   ConceptParserForResourcer0   formatAddToParser)parserverb
positionalr;   r<   help_supplementnounr   s           r   AddLocationResourceArgrG   `   sn    0 $)r/	fs"	-$	t	($++
v:>T9 , 
 ![(r   c                     SU(       a  SOS-   n[        XR5      n[        R                  R                  U[	        5       SR                  XQ5      UUS9R                  U 5        g)a  Add a resource argument for a Cloud Composer Environment.

NOTE: Must be used only if it's the only resource arg in the command.

Args:
  parser: the parser for the command
  verb: str, the verb to describe the resource, for example, 'to update'.
  positional: boolean, if True, means that the resource is a positional rather
      than a flag.
  required: boolean, if True, the arg is required
  plural: boolean, if True, expects a list of resources
r!   r9   r8   
The {} {}.r:   N)r=   r   r>   r?   r3   r@   rA   rB   rC   rD   r;   r<   rF   r   s          r   AddEnvironmentResourceArgrK      s^    " 
#R	0$	t	($++
 "$% , 
 ![(r   c                     SU(       a  SOS-   n[        XR5      n[        R                  R                  U[	        5       SR                  XQ5      UUS9R                  U 5        g)a  Add a resource argument for a Cloud Composer long-running operation.

NOTE: Must be used only if it's the only resource arg in the command.

Args:
  parser: the parser for the command
  verb: str, the verb to describe the resource, for example, 'to update'.
  positional: boolean, if True, means that the resource is a positional rather
      than a flag.
  required: boolean, if True, the arg is required
  plural: boolean, if True, expects a list of resources
r'   r9   r8   rI   r:   N)r=   r   r>   r?   r6   r@   rA   rJ   s          r   AddOperationResourceArgrM      s^    " 
v2	.$	t	($++
 $% , 
 ![(r   c                 B    SR                  U(       a  SU 5      $ SU 5      $ )Nz{}{}r8   z--)r@   )r   rD   s     r   r=   r=      s    	Zr4	88T4	88r   )T)TTFN)TTF)__doc__
__future__r   r   r    googlecloudsdk.calliope.conceptsr   r   (googlecloudsdk.command_lib.util.conceptsr   googlecloudsdk.corer	   r   r   r   r%   r(   r0   r3   r6   rG   rK   rM   r=   r$   r   r   <module>rT      s    9 &  ' 5 1 D *!!!B@63/ '+$("'+/ )J *.'+%*	): (,%)#(	)69r   