
                         ,   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-Create command for Colab Enterprise Runtimes.    )
operations)runtimes)util)base)endpoint_util)flagsze
        Create a notebook runtime that can be used to run code from your notebook (IPYNB file).
    a  
        To create a runtime in region 'us-central1' with the display name 'my-runtime' and template with id 'my-template', run:

        $ {command} --region=us-central1 --display-name=my-runtime --runtime-template=my-template

        To create a runtime for user 'USER@DOMAIN.COM', run:

        $ {command} --runtime-user=USER@DOMAIN.COM --region=us-central1 --display-name=my-runtime --runtime-template=my-template
    )DESCRIPTIONEXAMPLESc                   &    e Zd ZdZed        Zd Zy)CreatezCreate a notebook runtime.c                 .    t        j                  |        y)z Register flags for this command.N)r   AddCreateRuntimeFlags)parsers    $lib/surface/colab/runtimes/create.pyArgszCreate.Args/   s     
'    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$                        t        j&                  |      dddt        j(                  |       d	      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runtimecreatezCreating a runtime for z...)operations_clientopop_refasynchronouskind
log_methodmessageN)ReleaseTrackr   GetMessagesCONCEPTSr   ParseAsDictr   AiplatformEndpointOverrides	GetClient#projects_locations_notebookRuntimesAssignruntimes_util!CreateRuntimeAssignRequestMessageWaitForOpMayber   OperationsClientParseRuntimeOperationnameGetAsyncConfig"GetRuntimeUserFromArgsOrProperties)	selfargsrelease_trackmessages
region_refr   
api_clientruntimes_service	operations	            r   Runz
Create.Run4   s   %%'M 1 1 34H%%++-J /F		2	2v
 >>-0j#GG"))

9
9$
Ii   &77zJ44Y^^D**40BB4HIN
 
 
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   r+   r   googlecloudsdk.callioper   googlecloudsdk.command_lib.air   +googlecloudsdk.command_lib.colab_enterpriser   _DETAILED_HELPDefaultUniverseOnlyReleaseTracksr"   GAr   CreateCommandr   detailed_helprA   r   r   <module>rM      s     4 0 M 8 ( 7 =	  D%%(($*;*;*@*@A"T " B "J & r   