
                          n    S 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.    )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'   6   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+   >   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   AddRegistrationResourceArgr9   H   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   r-   r.   N)r   r1   r2   r'   r3   r4   )r5   r6   s     r   AddLocationResourceArgr;   _   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   r-   r.   N)r   r1   r2   r+   r3   r4   )r5   r6   r8   s      r   AddOperationResourceArgr=   r   sQ     ++k]   &
b , 	 
V	r   )NT)r-   )T)__doc__ googlecloudsdk.calliope.conceptsr   r   (googlecloudsdk.command_lib.util.conceptsr   r   r   r   r%   r'   r+   r9   r;   r=   r   r   r   <module>rA      sB    8 6 1 D?	?%<%.&r   