
                             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 r
S	 rS
 rS rS rS rSS jrSS jrSS jrg)z1Shared resource flags for Cloud Domains commands.    )absolute_import)division)unicode_literals)concepts)deps)concept_parsersc                  ,    [         R                  " SSS9$ )Nregistrationz+The domain registration for the {resource}.name	help_textr    ResourceParameterAttributeConfig     7lib/googlecloudsdk/command_lib/domains/resource_args.pyRegistrationAttributeConfigr          		2	2=
? ?r   c                  \    [         R                  " SS[        R                  " S S5      /S9$ )Nlocationz&The Cloud location for the {resource}.c                      g)Nglobalr   r   r   r   <lambda>)LocationAttributeConfig.<locals>.<lambda>%   s    8r   zlocation is always global)r   r   fallthroughs)r   r   r   Fallthroughr   r   r   LocationAttributeConfigr       s2    		2	28


+-H
I
	 	r   c                  ,    [         R                  " SSS9$ )Nr
   z+Cloud Domains operation for the {resource}.r   r   r   r   r   OperationAttributeConfigr   )   r   r   c            	      p    [         R                  " SS[        5       [        5       [         R                  SS9$ )Nz(domains.projects.locations.registrationsr
   F)resource_nameregistrationsIdlocationsId
projectsIddisable_auto_completers)r   ResourceSpecr   r    DEFAULT_PROJECT_ATTRIBUTE_CONFIGr   r   r   GetRegistrationResourceSpecr(   /   s3    			0"13)+::#
% %r   c                  \    [         R                  " SS[        5       [         R                  S9$ )Nzdomains.projects.locationsr   )r!   r#   r$   )r   r&   r   r'   r   r   r   GetLocationResourceSpecr*   9   s*    			")+::	
< <r   c            	      p    [         R                  " SS[        5       [        5       [         R                  SS9$ )Nz%domains.projects.locations.operations	operationF)r!   operationsIdr#   r$   r%   )r   r&   r   r   r'   r   r   r   GetOperationResourceSpecr.   A   s3    			-+-)+::#
% %r   Nc                     U=(       d    Sn[         R                  R                  U(       a  SOS[        5       SR	                  X!5      SSS0S9R                  U 5        g	)
a  Add a resource argument for a Cloud Domains registration.

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, such as 'to update'.
  noun: str, the resource; default: 'The domain registration'.
  positional: bool, if True, means that the registration ID is a positional
    arg rather than a flag.
zThe domain registrationr
   z--registrationz{} {}.Tr    requiredflag_name_overridesN)r   ConceptParserForResourcer(   formatAddToParser)parserverbnoun
positionals       r   AddRegistrationResourceArgr<   K   s[     
	**$++"n(8!#ood!
b , 	 
V	r   c                     [         R                  R                  S[        5       SR	                  U5      SSS0S9R                  U 5        g)zAdd a resource argument for a cloud location.

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, such as 'to update'.
z
--locationzThe Cloud location {}.Tr   r0   r1   N)r   r4   r5   r*   r6   r7   )r8   r9   s     r   AddLocationResourceArgr>   b   sM     ++%%d+
b , 	 
V	r   c                     [         R                  R                  U(       a  SOS[        5       SR	                  U5      SSS0S9R                  U 5        g)	a[  Add a resource argument for a Cloud Domains registration.

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, such as 'to update'.
  positional: bool, if True, means that the registration ID is a positional
    arg rather than a flag.
r,   z--operationzThe operation {}.Tr   r0   r1   N)r   r4   r5   r.   r6   r7   )r8   r9   r;   s      r   AddOperationResourceArgr@   u   sQ     ++k]   &
b , 	 
V	r   )NT)r0   )T)__doc__
__future__r   r   r    googlecloudsdk.calliope.conceptsr   r   (googlecloudsdk.command_lib.util.conceptsr   r   r   r   r(   r*   r.   r<   r>   r@   r   r   r   <module>rE      sI    8 &  ' 5 1 D?	?%<%.&r   