
    "                         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	KJr  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 rS rS rS rS rS rS rg)z3Shared resource arguments for Cloud Batch commands.    )absolute_import)division)unicode_literals)concepts)deps)concept_parsers)presentation_specs)
propertiesz!@#$%^c                      [         R                  " [        R                  R                  R
                  5      /n [        R                  " SSU S9$ )Nlocationz)Google Cloud location for the {resource}.name	help_textfallthroughs)r   PropertyFallthroughr
   VALUESbatchr   r    ResourceParameterAttributeConfig)ftss    5lib/googlecloudsdk/command_lib/batch/resource_args.pyLocationAttributeConfigr      sC    		!	!*"3"3"9"9"B"B	CD#		2	2;
     c                  ,    [         R                  " SSS9$ )NjobThe job ID for the {resource}.r   r   r   r    r   r   JobAttributeConfigr   '   s    		2	20
2 2r   c                  ,    [         R                  " SSS9$ )N
task_groupz%The task_group ID for the {resource}.r   r   r   r   r   TaskGroupAttributeConfigr"   -   s    		2	27
9 9r   c                  ,    [         R                  " SSS9$ )NtaskzThe task ID for the {resource}.r   r   r   r   r   TaskAttributeConfigr%   3   s    		2	21
3 3r   c                  \    [         R                  " SS[        5       [         R                  S9$ )Nzbatch.projects.locationsr   )resource_namelocationsId
projectsId)r   ResourceSpecr    DEFAULT_PROJECT_ATTRIBUTE_CONFIGr   r   r   GetLocationResourceSpecr,   9   s*    			 )+::	
< <r   c                  n    [         R                  " SS[        5       [        5       [         R                  S9$ )Nbatch.projects.locations.jobsr   r'   jobsIdr(   r)   )r   r*   r   r   r+   r   r   r   GetJobResourceSpecr1   A   s0    			%!)+::
< <r   c                      [         R                  " SS[         R                  " SS[        R                  " [
        SS9/S9[        5       [         R                  S9$ )Nr.   r   r   z9job ID is optional and will be generated if not specifiedhintr   r/   )r   r*   r   r   ValueFallthrough	INVALIDIDr   r+   r   r   r   GetSubmitJobResourceSpecr7   J   s]    			%664
 ###  *+::)
 r   c            
          [         R                  " SS[        5       [        5       [	        5       [        5       [         R                  S9$ )Nz.batch.projects.locations.jobs.taskGroups.tasksr$   )r'   tasksIdtaskGroupsIdr0   r(   r)   )r   r*   r%   r"   r   r   r+   r   r   r   GetTaskResourceSpecr;   c   s<    			6!#+-!)+::
< <r   c                     [         R                  " S[        5       SSS9/n[        R                  " U5      R                  U 5        g)zQAdd the location resource argument.

Args:
  parser: the parser for the command.
z
--locationzThe Batch location resource. If you omit this flag, the defaultlocation is used if you set the batch/location property.Otherwise, omitting this flag lists jobs across all locations.FrequiredN)r	   ResourcePresentationSpecr,   r   ConceptParserAddToParserparser	arg_specss     r   AddLocationResourceArgsrE   n   sH     11

!
#L 	) 	*66v>r   c                     [         R                  " S[        5       SSS9/n[        R                  " U5      R                  U 5        g)zTAdd the job resource argument as flag.

Args:
  parser: the parser for the command.
z--jobzLThe Batch job resource. If not specified,the current batch/location is used.Tr=   Nr	   r?   r1   r   r@   rA   rB   s     r   AddJobFlagResourceArgsrH      sE     11


1) 	*66v>r   c                     [         R                  " S[        5       SSS9/n[        R                  " U5      R                  U 5        gzZAdd the job resource argument as positional.

Args:
  parser: the parser for the command.
JOBzWThe Batch job resource. If --location not specified,the current batch/location is used.Tr=   NrG   rB   s     r   AddJobResourceArgsrL      sE     11


1) 	*66v>r   c                     [         R                  " S[        5       SSS9/n[        R                  " U5      R                  U 5        grJ   )r	   r?   r7   r   r@   rA   rB   s     r   AddSubmitJobResourceArgsrN      sE     11

"
$1) 	*66v>r   c                     [         R                  " S[        5       SSS9/n[        R                  " U5      R                  U 5        g)zMAdd the task resource argument.

Args:
  parser: the parser for the command.
TASKzMThe Batch task resource. If not specified,the current batch/location is used.Tr=   N)r	   r?   r;   r   r@   rA   rB   s     r   AddTaskResourceArgsrQ      sE     11


1) 	*66v>r   c                     [         R                  " S[        5       SSS9/n[        R                  " U5      R                  U 5        gziAdd the resource allowance resource argument as positional.

Args:
  parser: the parser for the command.
RESOURCE_ALLOWANCEzfThe Batch resource allowance resource. If --location not specified,the current batch/location is used.Tr=   N)r	   r?    GetResourceAllowanceResourceSpecr   r@   rA   rB   s     r    AddResourceAllowanceResourceArgsrV      sG     11

*
,? 
) 	*66v>r   c                  ,    [         R                  " SSS9$ )Nresource_allowance-The resource allowance ID for the {resource}.r   r   r   r   r    ResourceAllowanceAttributeConfigrZ      s    		2	2?
 r   c            	      p    [         R                  " SSS[         R                  [        5       [	        5       S9$ )N+batch.projects.locations.resourceAllowancesv1alpharesourceAllowance)api_versionr'   r)   r(   resourceAllowancesId)r   r*   r+   r   rZ   r   r   r   rU   rU      s3    			3'::)+;=
 r   c                     [         R                  " S[        5       SSS9/n[        R                  " U5      R                  U 5        grS   )r	   r?   &GetCreateResourceAllowanceResourceSpecr   r@   rA   rB   s     r   &AddCreateResourceAllowanceResourceArgsrc      sG     11

0
2? 
) 	*66v>r   c                      [         R                  " SSS[         R                  [        5       [         R                  " SS[
        R                  " [        SS9/S9S	9$ )
Nr\   r^   r]   rX   rY   zHresource allowance ID is optional and will be generated if not specifiedr3   r   )r'   r_   r)   r(   r`   )r   r*   r+   r   r   r   r5   r6   r   r   r   rb   rb   
  s^    			3'::)+#DD#C ##*
 r   N) __doc__
__future__r   r   r    googlecloudsdk.calliope.conceptsr   r   (googlecloudsdk.command_lib.util.conceptsr   r	   googlecloudsdk.corer
   r6   r   r   r"   r%   r,   r1   r7   r;   rE   rH   rL   rN   rQ   rV   rZ   rU   rc   rb   r   r   r   <module>rj      s     : &  ' 5 1 D G *	293<<2<?(?&?&?&?&?*?*r   