
                            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                  " SSS9\R                   " \R"                  R$                  5       " S S\R&                  5      5       5       r\R                  " SSS9\R                   " \R"                  R*                  5       " S S\5      5       5       rg)z%`gcloud tasks queues update` command.    )absolute_import)division)unicode_literals)GetApiAdapter)base)	constants)flags)parsers)logFzIThis command is deprecated. Use `gcloud beta tasks queues update` instead)
is_removedwarningc                   L   ^  \ rS rSrSrSSS.rU 4S jr\S 5       rS r	S	r
U =r$ )
UpdateAppEngine   zsUpdate a Cloud Tasks queue.

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

              $ {command} my-queue
                --clear-max-attempts --clear-max-retry-duration
                --clear-max-doublings --clear-min-backoff
                --clear-max-backoff
                --clear-max-dispatches-per-second
                --clear-max-concurrent-dispatches
                --clear-routing-override
         DESCRIPTIONEXAMPLESc                 <   > [         [        U ]
  " U0 UD6  SU l        g )NF)superr   __init__is_alphaselfargskwargs	__class__s      3lib/surface/tasks/queues/update_app_engine_queue.pyr   UpdateAppEngine.__init__8   s    	/4)4:6:DM    c                     [         R                  " U S5        [         R                  " U 5        [         R                  " U [        R
                  R                  SSS9  g Nz	to updateTF)release_trackapp_engine_queue
http_queue)r	   AddQueueResourceArgAddLocationFlagAddUpdatePushQueueFlagsr   ReleaseTrackBETAparsers    r   ArgsUpdateAppEngine.Args<   sF    	fk2	&!	!!'',,	r    c           	         [         R                  " U[        R                  U R	                  5       S9  [        U R	                  5       5      nUR                  n[         R                  " UR                  UR                  5      n[         R                  " U[        R                  UR                  SU R	                  5       SS9n[         R                  " U[        R                  U R	                  5       S9nU R                  (       dX  UR                  b  UR                  R                  OS nUR!                  UUUR"                  UR$                  UUR&                  S9nOLUR(                  b  UR(                  R                  OS nUR!                  UUUR"                  UR$                  US9n[*        R,                  R/                  SR1                  [         R2                  " UR5                  5       5      5      5        U$ )N)r#   TF)	is_updater#   r%   )retry_configrate_limitsapp_engine_routing_overridestackdriver_logging_config)r1   r2   r3   zUpdated queue [{}].)r
   CheckUpdateArgsSpecifiedr   
PUSH_QUEUEr)   r   queues
ParseQueuequeuelocationParseCreateOrUpdateQueueArgsmessagesGetSpecifiedFieldsMaskr   appEngineHttpQueueappEngineRoutingOverridePatchretryConfig
rateLimitsstackdriverLoggingConfigappEngineHttpTargetr   statusPrintformatGetConsolePromptStringRelativeName)	r   r   apiqueues_client	queue_refqueue_configupdated_fieldsr3   update_responses	            r   RunUpdateAppEngine.RunG   s   $$T%.%9%9373D3D3FH ))+
,CJJM""4::t}}=I77'')L 33i""$2C2C2EGN== ,,8 
)
)
B
B>B " &++

#//"--&A%1%J%J , Lo --9 
*
*
C
C?C " &++

#//"--&A , Co JJ*11&&y'='='?@B Cr    r   )__name__
__module____qualname____firstlineno____doc__detailed_helpr   staticmethodr-   rP   __static_attributes____classcell__r   s   @r   r   r      s<    

	-"  ( (r    r   zJThis command is deprecated. Use `gcloud alpha tasks queues update` insteadc                   F   ^  \ rS rSrSrSSS.rU 4S jr\S 5       rSr	U =r
$ )	AlphaUpdateAppEnginer   zUpdate a Cloud Tasks queue.

The flags available to this command represent the fields of a queue that are
mutable. Attempting to use this command on a different type of queue will
result in an error.
r   a            To update a Cloud Tasks queue:

              $ {command} my-queue
                --clear-max-attempts --clear-max-retry-duration
                --clear-max-doublings --clear-min-backoff
                --clear-max-backoff
                --clear-max-tasks-dispatched-per-second
                --clear-max-concurrent-tasks
                --clear-routing-override
         r   c                 <   > [         [        U ]
  " U0 UD6  SU l        g )NT)r   r^   r   r   r   s      r   r   AlphaUpdateAppEngine.__init__   s    	
.??DMr    c                     [         R                  " U S5        [         R                  " U 5        [         R                  " U [        R
                  R                  SSS9  g r"   )r	   r&   r'   r(   r   r)   ALPHAr+   s    r   r-   AlphaUpdateAppEngine.Args   sF    	fk2	&!	!!''--	r    rR   )rS   rT   rU   rV   rW   rX   r   rY   r-   rZ   r[   r\   s   @r   r^   r^   r   s2    

	-"  r    r^   N)rW   
__future__r   r   r   googlecloudsdk.api_lib.tasksr   googlecloudsdk.callioper    googlecloudsdk.command_lib.tasksr   r	   r
   googlecloudsdk.corer   	DeprecateReleaseTracksr)   r*   UpdateCommandr   rc   r^    r    r   <module>rn      s    , &  ' 6 ( 6 2 4 # 5HI D%%**+Nd(( N ,INb 5IJ D%%++,&? & -J&r    