
    
                     ,   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"                  ej                   j$                         G d dej&                                      Zee_        y)z+Stop command for Colab Enterprise Runtimes.    )
operations)runtimes)util)base)endpoint_util)flagsz7
        Stop a Colab Enterprise notebook runtime.
    z
        To stop a runtime with id `my-runtime` in region `us-central1`, run:

        $ {command} my-runtime --region=us-central1
    )DESCRIPTIONEXAMPLESc                   &    e Zd ZdZed        Zd Zy)StopzStop a runtime.c                 .    t        j                  |        y)z Register flags for this command.N)r   AddStopRuntimeFlags)parsers    "lib/surface/colab/runtimes/stop.pyArgsz	Stop.Args+   s     
f%    c                    | j                         }t        j                  | j                               }|j                  j                  j                         }|j                         d   }t        j                  d|      5  t        j                  |      }|j                  }|j                  t        j                  ||            }t        j                  t        j                   |      |t        j"                  |j$                        ddt        j&                  |      d|j                  j                  j                         j)                               cd	d	d	       S # 1 sw Y   y	xY w)
z9This is what gets called when the user runs this command.locationsIdBETA)versionregion)clientupdateruntimezStopping runtime...)operations_clientopop_ref
log_methodkindasynchronousmessageresourceN)ReleaseTrackr   GetMessagesCONCEPTSr   ParseAsDictr   AiplatformEndpointOverrides	GetClient#projects_locations_notebookRuntimesr   runtimes_utilCreateRuntimeStopRequestMessageWaitForOpMayber   OperationsClientParseRuntimeOperationnameGetAsyncConfigRelativeName)	selfargsrelease_trackmessagesruntime_refr   
api_clientruntime_service	operations	            r   RunzStop.Run0   s%   %%'M 1 1 34H--''--/K!-0F		2	2v
 >>-0j

8
8  "&&

7
7h
Gi   &77zJ44nn **40'==((..0==?
 
 
s   C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   r+   r   googlecloudsdk.callioper   googlecloudsdk.command_lib.air   +googlecloudsdk.command_lib.colab_enterpriser   _DETAILED_HELPDefaultUniverseOnlyReleaseTracksr#   GAr   UpdateCommandr   detailed_helprA   r   r   <module>rM      s     2 0 M 8 ( 7 =		 D%%(($*;*;*@*@A$4 $ B $N $ r   