
    "                        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 update` command.    )absolute_import)division)unicode_literals)GetApiAdapter)base)	constants)flags)parsers)logc                   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$ )
Update   sUpdate a Cloud Tasks queue.

The flags available to this command represent the fields of a queue that are
mutable.
"          {description}
                      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      "lib/surface/tasks/queues/update.pyr   Update.__init__5   s    	&$ $1&1DM    c                     [         R                  " U S5        [         R                  " U 5        [         R                  " U 5        g )N	to update)r	   AddQueueResourceArgAddLocationFlagAddUpdatePushQueueFlagsparsers    r   ArgsUpdate.Args9   s.    	fk2	&!	!!&)r!   c                    U R                  5       [        R                   R                  :X  a  UR                  nO[        R
                  n[        R                  " UUU R                  5       S9  [        U R                  5       5      nUR                  n[        R                  " UR                  UR                  5      n[        R                  " UUUR                  SU R                  5       S9n[        R                  " XU R                  5       S9nU R                  5       [        R                   R                   :X  a  UR"                  b  UR"                  R$                  OS n[        R&                  " U5      n	UR)                  UUUR*                  UR,                  UU	S   U	S   U	S   U	S   U	S   U	S	   U	S
   S9n
GO1U R                  5       [        R                   R                  :X  a  UR.                  b  UR.                  R$                  OS n[        R&                  " U5      n	UR)                  UUUR*                  UR,                  UUR0                  UR                  U	S   U	S   U	S   U	S   U	S   U	S	   U	S
   S9n
OpUR$                  n[        R&                  " U5      n	UR)                  UUUR*                  UR,                  UUR0                  U	S   U	S   U	S   U	S   U	S   U	S	   U	S
   S9n
[2        R4                  R7                  SR9                  [        R:                  " UR=                  5       5      5      5        U
$ )Nrelease_trackT)	is_updater-   http_uri_overridehttp_method_overridehttp_header_overridehttp_oauth_email_overridehttp_oauth_scope_overridehttp_oidc_email_overridehttp_oidc_audience_override)
retry_configrate_limitsapp_engine_routing_overrider/   r0   r1   r2   r3   r4   r5   )r6   r7   r8   stackdriver_logging_config
queue_typer/   r0   r1   r2   r3   r4   r5   )r6   r7   r8   r9   r/   r0   r1   r2   r3   r4   r5   zUpdated queue [{}].)ReleaseTrackr   BETAtyper   
PUSH_QUEUEr
   CheckUpdateArgsSpecifiedr   queues
ParseQueuequeuelocationParseCreateOrUpdateQueueArgsmessagesGetSpecifiedFieldsMaskALPHAappEngineHttpTargetappEngineRoutingOverrideGetHttpTargetArgsPatchretryConfig
rateLimitsappEngineHttpQueuestackdriverLoggingConfigr   statusPrintformatGetConsolePromptStringRelativeName)r   r   r:   apiqueues_client	queue_refqueue_configupdated_fieldsr8   http_target_argsupdate_responses              r   Run
Update.Run?   so   d//44499j''j$$T%/373D3D3FH ))+
,CJJM""4::t}}=I77'')+L 33(9(9(;=N d//555 --9 
*
*
C
C?C " !22<@%++

#//"--&A,-@A/0FG/0FG$4)% %5)% $44N#O&6+'! , o( 
			 1 1 6 6	6 ,,8 
)
)
B
B>B " !22<@%++

#//"--&A%1%J%J!&&,-@A/0FG/0FG$4)% %5)% $44N#O&6+'% , o. %1$I$I! 22<@%++

#//"--&A%1%J%J,-@A/0FG/0FG$4)% %5)% $44N#O&6+'# , o* JJ*11&&y'='='?@B Cr!   r   )__name__
__module____qualname____firstlineno____doc__detailed_helpr   staticmethodr)   r\   __static_attributes____classcell__r   s   @r   r   r      s>    
	-" * *
f fr!   r   c                   F   ^  \ rS rSrSrSSS.rU 4S jr\S 5       rSr	U =r
$ )	
BetaUpdate   r   r   r   r   c                 <   > [         [        U ]
  " U0 UD6  SU l        g r   )r   rj   r   r   r   s      r   r   BetaUpdate.__init__   s    	*d$d5f5DMr!   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)   BetaUpdate.Args   s?    	fk2	&!	!!d//446r!   r^   r_   r`   ra   rb   rc   rd   r   re   r)   rf   rg   rh   s   @r   rj   rj      s2    
	-" 6 6r!   rj   c                   F   ^  \ rS rSrSrSSS.rU 4S jr\S 5       rSr	U =r
$ )	AlphaUpdate   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   rs   r   r   r   s      r   r   AlphaUpdate.__init__   s    	+t%t6v6DMr!   c                     [         R                  " U S5        [         R                  " U 5        [         R                  " U [        R
                  R                  S9  g ro   )r	   r$   r%   r&   r   r;   rG   r'   s    r   r)   AlphaUpdate.Args   s<    	fk2	&!	!!&8I8I8O8OPr!   r^   rq   rh   s   @r   rs   rs      s4    
	-" Q Qr!   rs   N)rc   
__future__r   r   r   googlecloudsdk.api_lib.tasksr   googlecloudsdk.callioper    googlecloudsdk.command_lib.tasksr   r	   r
   googlecloudsdk.corer   ReleaseTracksr;   GAUpdateCommandr   r<   rj   rG   rs    r!   r   <module>r      s    , &  ' 6 ( 6 2 4 # D%%(()GT G *GT D%%**+ 6  6 , 6F D%%++, Q&  Q - Qr!   