
                            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S
KJr  \R                  " \R                   R"                  5       " S S\R$                  5      5       r\R                  " \R                   R(                  5       " S S\5      5       r\R                  " \R                   R,                  5       " S S\5      5       rg)z$`gcloud tasks queues create command.    )absolute_import)division)unicode_literals)GetApiAdapter)base)	constants)flags)parsers)logc                   8    \ rS rSrSrSSS.r\S 5       rS rSr	g	)
Create   sCreate a Cloud Tasks queue.

The flags available to this command represent the fields of a queue that are
mutable.
"          {description}
          s            To create a Cloud Tasks queue:

              $ {command} my-queue
                --max-attempts=10 --max-retry-duration=5s
                --max-doublings=4 --min-backoff=1s
                --max-backoff=10s
                --max-dispatches-per-second=100
                --max-concurrent-dispatches=10
                --routing-override=service:abc
         DESCRIPTIONEXAMPLESc                     [         R                  " U S5        [         R                  " U 5        [         R                  " U 5        g )N	to create)r	   AddQueueResourceArgAddLocationFlagAddCreatePushQueueFlagsparsers    "lib/surface/tasks/queues/create.pyArgsCreate.Args6   s.    	fk2	&!	!!&)    c                    U R                  5       [        R                   R                  :X  a  UR                  nO[        R
                  n[        U R                  5       5      nUR                  n[        R                  " UR                  UR                  5      n[        R                  " U5      n[        R                  " XUR                  U R                  5       S9nU R                  5       [        R                   R                  :X  a=  UR!                  UUUR"                  UR$                  UR&                  UR(                  S9nOU R                  5       [        R                   R                  :X  aS  UR!                  UUUR"                  UR$                  UR*                  UR,                  UR(                  UR                  S9nOGUR!                  UUUR"                  UR$                  UR.                  UR(                  UR,                  S9n[0        R2                  " [        R4                  " UR7                  5       5      S5        U$ )Nrelease_track)retry_configrate_limitsapp_engine_http_targethttp_target)r#   r$   app_engine_http_queuestackdriver_logging_configr&   
queue_type)r#   r$   app_engine_routing_overrider&   r(   queue)ReleaseTrackr   BETAtyper   
PUSH_QUEUEr   queuesr
   
ParseQueuer+   locationExtractLocationRefFromQueueRefParseCreateOrUpdateQueueArgsmessagesALPHAr   retryConfig
rateLimitsappEngineHttpTarget
httpTargetappEngineHttpQueuestackdriverLoggingConfigappEngineRoutingOverrider   CreatedResourceGetConsolePromptStringRelativeName)	selfargsr)   apiqueues_client	queue_reflocation_refqueue_configcreate_responses	            r   Run
Create.Run<   s   d//44499j''j
))+
,CJJM""4::t}}=I99)DL77#,,'')+L d//555%,,

#//"--!-!A!A"-- - /o 
			 1 1 6 6	6%,,

#//"-- , ? ?%1%J%J"--!&& - 	o &,,

#//"--&2&K&K"--%1%J%J - Lo &&y'='='?@'Kr    N)
__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodr   rI   __static_attributes__rK   r   r   r   r      s1    
	-" * *
*r   r   c                   2    \ rS rSrSrSSS.r\S 5       rSrg)	
BetaCreatei   r   r   r   r   c                     [         R                  " U S5        [         R                  " U 5        [         R                  " U [        R
                  R                  S9  g Nr   r!   )r	   r   r   r   r   r,   r-   r   s    r   r   BetaCreate.Args   s<    	fk2	&!	!!&8I8I8N8NOr   rK   N	rL   rM   rN   rO   rP   rQ   rR   r   rS   rK   r   r   rU   rU   i   s.    
	-" P Pr   rU   c                   2    \ rS rSrSrSSS.r\S 5       rSrg)	AlphaCreate   r   r   au            To create a Cloud Tasks queue:

              $ {command} my-queue
                --max-attempts=10 --max-retry-duration=5s
                --max-doublings=4 --min-backoff=1s
                --max-backoff=10s
                --max-tasks-dispatched-per-second=100
                --max-concurrent-tasks=10
                --routing-override=service:abc
          r   c                     [         R                  " U S5        [         R                  " U 5        [         R                  " U [        R
                  R                  S9  g rX   )r	   r   r   r   r   r,   r6   r   s    r   r   AlphaCreate.Args   s<    	fk2	&!	!!&8I8I8O8OPr   rK   NrZ   rK   r   r   r\   r\      s.    
	-" Q Qr   r\   N)rP   
__future__r   r   r   googlecloudsdk.api_lib.tasksr   googlecloudsdk.callioper    googlecloudsdk.command_lib.tasksr   r	   r
   googlecloudsdk.corer   ReleaseTracksr,   GACreateCommandr   r-   rU   r6   r\   rK   r   r   <module>rh      s    + '  ' 6 ( 6 2 4 # D%%(()GT G *GT D%%**+P P ,P< D%%++,Q& Q -Qr   