
                             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   " S S\R                   5      rg)z$`gcloud tasks queues purge` command.    )absolute_import)division)unicode_literals)GetApiAdapter)base)flags)parsers)log)
console_ioc                   8    \ rS rSrSrSSS.r\S 5       rS rSr	g	)
Purge   a:  Purge a queue by deleting all of its tasks.

This command purges a queue by deleting all of its tasks. Purge operations can
take up to one minute to take effect. Tasks might be dispatched before the
purge takes effect. A purge is irreversible. All tasks created before this
command is run are permanently deleted.
z"          {description}
          zI          To purge a queue:

              $ {command} my-queue
         )DESCRIPTIONEXAMPLESc                 ^    [         R                  " U S5        [         R                  " U 5        g )Nzto purge)r   AddQueueResourceArgAddLocationFlag)parsers    !lib/surface/tasks/queues/purge.pyArgs
Purge.Args0   s     	fj1	&!    c                    [        U R                  5       5      R                  n[        R                  " UR
                  UR                  5      n[        R                  " UR                  5       5      n[        R                  " SSR                  U5      S9  UR                  U5        [        R                  R                  SR                  U5      5        g )NTz$Are you sure you want to purge: [{}])cancel_on_noprompt_stringzPurged queue [{}].)r   ReleaseTrackqueuesr	   
ParseQueuequeuelocationGetConsolePromptStringRelativeNamer   PromptContinueformatr   r
   statusPrint)selfargsqueues_client	queue_refqueue_shorts        r   Run	Purge.Run5   s    !$"3"3"56==M""4::t}}=I001G1G1IJK<CC 	"JJ)00=>r    N)
__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodr   r,   __static_attributes__r.   r   r   r   r      s1    		- " "	?r   r   N)r3   
__future__r   r   r   googlecloudsdk.api_lib.tasksr   googlecloudsdk.callioper    googlecloudsdk.command_lib.tasksr   r	   googlecloudsdk.corer
   googlecloudsdk.core.consoler   Commandr   r.   r   r   <module>r>      s5    + &  ' 6 ( 2 4 # 2!?DLL !?r   