
    F	                         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                  5       " S S	\R                   5      5       rg
)zSessions delete command.    )dataproc)util)base)flags)log)
console_ioc                   6    \ rS rSrSrSS0r\S 5       rS rSr	g)	Delete   zDelete a session.EXAMPLESz          To delete a "my-session" session in the "us-central1" location, run:

            $ {command} my-session --location=us-central1
          c                     [         R                  R                  U 5        [        R                  " U 5        [
        R                  " 5       n[        R                  " U SUR                  5        g )Ndelete)	r   
ASYNC_FLAGAddToParserr   AddTimeoutFlagdpDataprocAddSessionResourceArgapi_version)parserr   s     'lib/surface/dataproc/sessions/delete.pyArgsDelete.Args'   sE    OO'	 {{}H	(2F2FG    c                    [         R                  " 5       nUR                  R                  R	                  5       n[
        R                  " SR                  UR                  5       5      SSS9  UR                  R                  UR                  5       S9nUR                  R                  R                  U5      nUR                  (       a>  [         R"                  R%                  SR                  UR                  5       5      5        U$ [&        R(                  " UUSR                  UR                  5       5      UR*                  S9n[         R,                  " UR                  5       5        U$ )	Nz"The session '{0}' will be deleted.TzDeletion canceled by user.)messagecancel_on_nocancel_string)namezDeleting session '{0}'z$Waiting for session '{0}' to delete.)r   	timeout_s)r   r   CONCEPTSsessionParser   PromptContinueformatNamemessages.DataprocProjectsLocationsSessionsDeleteRequestRelativeNameclientprojects_locations_sessionsr
   async_r   statuswriter   WaitForOperationtimeoutDeletedResource)selfargsr   
session_idrequest	operations         r   Run
Delete.Run.   s"   {{}H&&,,.J4;;OO2	4 NN$$& O (G ;;BB7KI{{	jj/66
//
 %%6==OO,, I 
//12r    N)
__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodr   r7   __static_attributes__r9   r   r   r
   r
      s/    - H Hr   r
   N)r>   googlecloudsdk.api_lib.dataprocr   r   r   googlecloudsdk.callioper   #googlecloudsdk.command_lib.dataprocr   googlecloudsdk.corer   googlecloudsdk.core.consoler   ReleaseTracksReleaseTrackBETACommandr
   r9   r   r   <module>rK      sT      ; 0 ( 5 # 2 D%%**+.T\\ . ,.r   