File: //usr/lib/google-cloud-sdk/lib/surface/datastore/operations/__pycache__/cancel.cpython-312.pyc
�
�� � � � d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddl m
Z
ddlmZ dd lm
Z
dd
lmZ G d� dej � Zy
)z/The gcloud datastore operations cancel command.� )�absolute_import)�division)�unicode_literals)�
operations)�base)�flags)�
properties)� resources)�
console_ioc �. � e Zd ZdZddiZed� � Zd� Zy)�Cancelz;Cancel a currently-running Cloud Datastore admin operation.�EXAMPLESz� To cancel the currently-running operation with id `exampleId`, run:
$ {command} exampleId
or
$ {command} projects/your-project-id/operations/exampleId
c �0 � t j | d� y)ztRegister flags for this command.
Args:
parser: argparse.ArgumentParser, the parser for this command.
�cancelN)r �AddOperationNameFlag)�parsers �*lib/surface/datastore/operations/cancel.py�ArgszCancel.Args- s � �
���v�x�0� c �H � t j j |j dt j
j j j id�� j � }t j dj |� d�� t j |� S )N�
projectsIdzdatastore.projects.operations)�params�
collectionz%The operation [{}] will be cancelled.T)�message�cancel_on_no)r
�REGISTRY�Parse�namer �VALUES�core�project� GetOrFail�RelativeNamer �PromptContinue�formatr �CancelOperation)�self�argsr s r �Runz
Cancel.Run6 s� � ����#�#�� � ��*�+�+�0�0�8�8�B�B�
� 3� $� 4�
5A�L�N� � ���7�>�>�t�D��� �%�%�d�+�+r N)�__name__�
__module__�__qualname__�__doc__�
detailed_help�staticmethodr r) � r r r
r
s/ � �C� �
��-� �1� �1�,r r
N)r- �
__future__r r r � googlecloudsdk.api_lib.datastorer �googlecloudsdk.callioper �$googlecloudsdk.command_lib.datastorer �googlecloudsdk.corer r
�googlecloudsdk.core.consoler �Commandr
r0 r r �<module>r8 s5 �� 6� &� � '� 7� (� 6� *� )� 2�$,�T�\�\� $,r