File: //usr/lib/google-cloud-sdk/lib/surface/tasks/queues/__pycache__/purge.cpython-312.pyc
�
��� � � � d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddl m
Z
ddl mZ dd lm
Z
dd
lmZ G d� dej � Zy
)z$`gcloud tasks queues purge` command.� )�absolute_import)�division)�unicode_literals)�
GetApiAdapter)�base)�flags)�parsers)�log)�
console_ioc �0 � e Zd ZdZddd�Zed� � Zd� Zy)�PurgeaD 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 �Z � t j | d� t j | � y )Nzto purge)r �AddQueueResourceArg�AddLocationFlag)�parsers �!lib/surface/tasks/queues/purge.py�Argsz
Purge.Args0 s � � ���f�j�1� ���&�!� c � � t | j � � j }t j |j
|j � }t j |j � � }t j ddj |� �� |j |� t j j dj |� � y )NTz$Are you sure you want to purge: [{}])�cancel_on_no�
prompt_stringzPurged queue [{}].)r �ReleaseTrack�queuesr �
ParseQueue�queue�location�GetConsolePromptString�RelativeNamer �PromptContinue�formatr
r
�status�Print)�self�args�
queues_client� queue_ref�queue_shorts r �Runz Purge.Run5 s� � �!�$�"3�"3�"5�6�=�=�M��"�"�4�:�:�t�}�}�=�I��0�0��1G�1G�1I�J�K�����<�C�C���� ��� �"��J�J���)�0�0��=�>r N)�__name__�
__module__�__qualname__�__doc__�
detailed_help�staticmethodr r* � r r r
r
s1 � ���
� �-� �"� �"� ?r r
N)r. �
__future__r r r �googlecloudsdk.api_lib.tasksr �googlecloudsdk.callioper � googlecloudsdk.command_lib.tasksr r �googlecloudsdk.corer
�googlecloudsdk.core.consoler �Commandr
r1 r r �<module>r9 s5 �� +� &� � '� 6� (� 2� 4� #� 2�!?�D�L�L� !?r