
    h
                     >   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
  \R                  \R                  " \R                  R                  \R                  R                  \R                  R                   5       " S S	\R"                  5      5       5       rg
)z$'logging operations cancel' command.    )absolute_import)division)unicode_literals)util)base)
console_ioc                   .    \ rS rSrSr\S 5       rS rSrg)Cancel   a  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                 t    U R                  SSS9  U R                  SSSS9  [        R                  " U S5        g	)
z Register flags for this command.operation_idzThe Id of the operation.)helpz
--locationTzLocation of the operation.)requiredr   zoperation to cancelN)add_argumentr   AddParentArgs)parsers    (lib/surface/logging/operations/cancel.pyArgsCancel.Args+   sG     -GH
t*F  H 	v45    c                    [         R                  " [         R                  " [         R                  " U5      SUR                  5      SUR                  5      n[         R
                  " UR                  U5      n[        R                  " SU-  SS9  [         R                  " 5       R                  US9n[         R                  " 5       R                  R                  U5        [        SU-  5        [        S5        g	)
zThis 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
operationszReally cancel operation [%s]?T)cancel_on_no)namezCancelled [%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   Run
Cancel.Run4   s     ,,""4(+t}}	Fd'')N 44T5F5FM=N+/1  55>5J  	NN2299'B	
0
01	 . /r    N)	__name__
__module____qualname____firstlineno____doc__staticmethodr   r+   __static_attributes__r-   r   r   r
   r
      s     

 6 6/r   r
   N)r2   
__future__r   r   r   googlecloudsdk.api_lib.loggingr   googlecloudsdk.callioper   googlecloudsdk.core.consoler   DefaultUniverseOnlyReleaseTracksReleaseTrackGABETAALPHACommandr
   r-   r   r   <module>r@      s    + &  ' / ( 2 $++00$2C2C2I2I0/T\\ 0/ 0/r   