
    s                         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KJr  SSKJr  SSKJr  SSKJr  SSKJr  \R*                   " S S\R,                  5      5       rg)z Command for deleting executions.    )absolute_import)division)unicode_literals)base)connection_context)deletion)flags)pretty_print)resource_args)serverless_operations)concept_parsers)presentation_specs)log)
console_ioc                   H    \ rS rSrSrSSS.r\S 5       r\S 5       rS r	S	r
g
)Delete"   Delete an execution.z#
          {description}
          zU
          To delete an execution:

              $ {command} my-execution
          )DESCRIPTIONEXAMPLESc                     [         R                  " S[        R                  " 5       SSSS9n[        R
                  " U SS9  [        R                  " U/5      R                  U 5        g )N	EXECUTIONzExecution to delete.TF)requiredprefixes)default_async_for_cluster)	r   ResourcePresentationSpecr   GetExecutionResourceSpecr	   AddAsyncFlagr   ConceptParserAddToParser)parserexecution_presentations     )lib/surface/run/jobs/executions/delete.py
CommonArgsDelete.CommonArgs1   s_    /HH..0 
$ !!#9":;GGO    c                 .    [         R                  U 5        g )N)r   r$   )r!   s    r#   ArgsDelete.Args?   s    
fr&   c                    [         R                  " U[        R                  R                  U R                  5       5      nUR                  R                  R                  5       n[        R                  " SR                  UR                  5      SSS9  [        R                  " U5       n[        R                   " X4R"                  UR$                  UR&                  5        SSS5        UR&                  (       a0  [(        R*                  " SR                  UR                  5      5        g[,        R.                  " UR                  S5        g! , (       d  f       Nq= f)r   zExecution [{}] will be deleted.T)messagethrow_if_unattendedcancel_on_noNz Execution [{}] is being deleted.	execution)r   GetConnectionContextr	   ProductRUNReleaseTrackCONCEPTSr.   Parser   PromptContinueformatexecutionsIdr   Connectr   r   GetExecutionDeleteExecutionasync_r
   Successr   DeletedResource)selfargsconn_contextex_refclients        r#   Run
Delete.RunC   s    %::emm!2!2!4L ]]$$**,F1889L9LM  
	&	&|	4oo
%%v'='=t{{ 
5 {{
,
3
3F4G4G
H 
&--{; 
5	4s   (7E


E N)__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodr$   r(   rC   __static_attributes__rE   r&   r#   r   r   "   sE    		- P P  <r&   r   N)rJ   
__future__r   r   r   googlecloudsdk.callioper   googlecloudsdk.command_lib.runr   r   r	   r
   r   r   (googlecloudsdk.command_lib.util.conceptsr   r   googlecloudsdk.corer   googlecloudsdk.core.consoler   UniverseCompatibleCommandr   rE   r&   r#   <module>rV      sY    ' &  ' ( = 3 0 7 8 @ D G # 2 6<T\\ 6< 6<r&   