HEX
Server: Apache/2.4.68 (Debian)
System: Linux as-cs-widget-demo-us-central1 6.1.0-44-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.164-1 (2026-03-09) x86_64
User: root (0)
PHP: 8.2.32
Disabled: NONE
Upload Files
File: //usr/lib/google-cloud-sdk/lib/surface/logging/operations/__pycache__/cancel.cpython-312.pyc
�

��h
��>�dZddlmZddlmZddlmZddlmZddlmZddl	m
Z
ejejejjejjejj �Gd�d	ej"���Zy
)z$'logging operations cancel' command.�)�absolute_import)�division)�unicode_literals)�util)�base)�
console_ioc�&�eZdZdZed��Zd�Zy)�Cancela"Cancel a long running operation.

  Cancel a long running operation with given OPERATION_ID in given LOCATION.
  This operation can be a copy_log_entries operation which is scheduled before.

  ## EXAMPLES

  To cancel an operation, run:

    $ {command} OPERATION_ID --location=LOCATION
  c�~�|jdd��|jddd��tj|d�y	)
z Register flags for this command.�operation_idzThe Id of the operation.)�helpz
--locationTzLocation of the operation.)�requiredr
zoperation to cancelN)�add_argumentr�
AddParentArgs)�parsers �(lib/surface/logging/operations/cancel.py�ArgszCancel.Args+sG������-G��H�
����t�*F��H�	���v�4�5�c���tjtjtj|�d|j�d|j�}tj
|j|�}t
jd|zd��tj�j|��}tj�jj|�td|z�td�y	)
z�This is what gets called when the user runs this command.

    Args:
      args: an argparse namespace. All the arguments that were provided to this
        command invocation.

    Returns:
      A long running operation.
    �	locations�
operationszReally cancel operation [%s]?T)�cancel_on_no)�namezCancelled [%s]zKNote:it may take up to 10 minutes for the operation's status to be updated.N)r�CreateResourceName�GetParentFromArgs�locationr�GetOperationReferencer�PromptContinue�GetMessages�/LoggingProjectsLocationsOperationsCancelRequest�	GetClient�projects_locations_operationsr
�print)�self�args�operation_name�operation_reference�requests     r�Runz
Cancel.Run4s����,�,�����"�"�4�(�+�t�}�}�	F��d�'�'�)�N��4�4�T�5F�5F��M�����=��N�+/�1�����5�5�>�5�J��	�N�N��2�2�9�9�'�B�	�
�0�
0�1�	�.�/rN)�__name__�
__module__�__qualname__�__doc__�staticmethodrr)�rrr
r
s ��

��6��6�/rr
N)r-�
__future__rrr�googlecloudsdk.api_lib.loggingr�googlecloudsdk.callioper�googlecloudsdk.core.consoler�DefaultUniverseOnly�
ReleaseTracks�ReleaseTrack�GA�BETA�ALPHA�Commandr
r/rr�<module>r;s���+�&��'�/�(�2�������������$�+�+�0�0�$�2C�2C�2I�2I��0/�T�\�\�0/���0/r