
                            d Z ddlmZ ddlmZ ddlmZ ddlm	Z	 ddl
mZ ddlmZ dd	d
Ze	j                   e	j                   e	j"                  j$                         G d de	j&                                      Zee_        y)z(Delete command for Workbench Executions.    )
operations)util)
executions)base)endpoint_util)flagsz4
        Delete a Workbench notebook execution.
    z
        To delete an execution with id `my-execution`, in region `us-central1`, run:

         $ {command} my-execution --region=us-central1
    )DESCRIPTIONEXAMPLESc                   &    e Zd ZdZed        Zd Zy)DeletezDelete an execution.c                 2    t        j                  | d       y)z_Register flags for this command.

    Args:
      parser: argparse parser for the command.
    T)for_workbenchN)r   AddDeleteExecutionFlags)parsers    *lib/surface/workbench/executions/delete.pyArgszDelete.Args+   s     
!!&=    c           
         | j                         }t        j                  | j                               }|j                  j                  j                         }|j                  }t        j                  d|      5  t        j                  |      }|j                  }t        j                  |||       |j                  t        j                  ||            }t        j                  t!        j"                  |      |t        j$                  |j&                        t        j(                  |      ddd      cddd       S # 1 sw Y   yxY w)	zThis is what gets called when the user runs this command.

    Args:
      args: argparse namespace, the arguments of the command.

    Returns:
      The delete operation or the results if async.
    BETA)versionregion)clientznotebook executiondeletez&Waiting for execution to be deleted...)operations_clientopop_refasynchronouskind
log_methodmessageN)ReleaseTrackr   GetMessagesCONCEPTS	executionParselocationsIdr   AiplatformEndpointOverrides	GetClient(projects_locations_notebookExecutionJobsexecutions_util ValidateAndGetWorkbenchExecutionr   CreateExecutionDeleteRequestWaitForOpMayber   OperationsClientParseExecutionOperationnameGetAsyncConfig)	selfargsrelease_trackmessagesexecution_refr   
api_clientexecutions_service	operations	            r   Runz
Delete.Run4   s    %%'M 1 1 34HMM++113M&&F		2	2v
 >>-0j

=
=  66
, %++

6
6Hi
   &77zJ 88nn **40#:

 
 
s   ;B=EEN)__name__
__module____qualname____doc__staticmethodr   r:    r   r   r   r   &   s     > >&r   r   N)r>   googlecloudsdk.api_lib.air   'googlecloudsdk.api_lib.colab_enterpriser   (googlecloudsdk.api_lib.notebook_executorr   r*   googlecloudsdk.callioper   googlecloudsdk.command_lib.air   ,googlecloudsdk.command_lib.notebook_executorr   _DETAILED_HELPDefaultUniverseOnlyReleaseTracksr!   r   DeleteCommandr   detailed_helpr@   r   r   <module>rL      s     / 0 8 R ( 7 >		 D%%**+2T 2 , 2j & r   