
    	                        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l	mZ dd	lmZ dd
lmZ dddZ e
j"                  e
j$                  j&                         G d de
j(                               Zee_        y)z$'notebooks runtimes create' command.    )absolute_import)division)unicode_literals)runtimes)util)base)parser_errors)flags)
propertiesz5
        Request for creating notebook runtimes.
    z
    To create a runtime, run:

      $ {command} example-runtime --runtime-access-type=SINGLE_USER --runtime-owner=example@google.com --machine-type=n1-standard-4 --location=us-central1

    )DESCRIPTIONEXAMPLESc                   &    e Zd ZdZed        Zd Zy)Createz Request for creating an runtime.c                 v    t        j                  | j                               }t        j                  ||       y)z Register flags for this command.N)r   ApiVersionSelectorReleaseTrackr
   AddCreateRuntimeFlags)clsparserapi_versions      (lib/surface/notebooks/runtimes/create.pyArgszCreate.Args/   s-     ))#*:*:*<=K	V4    c                    | j                         }t        j                  |      }t        j                  |      }|j	                  d      sHt
        j                  j                  j                  j                         st        j                  d      |j                  }|j                  t        j                  ||            }t        j                   ||||t        j"                  j$                        S )z9This is what gets called when the user runs this command.locationz
--location)argument)operation_type)r   r   	GetClientGetMessagesIsSpecifiedr   VALUES	notebooksr   IsExplicitlySetr	   RequiredErrorprojects_locations_runtimesr   runtime_utilCreateRuntimeCreateRequest	HandleLROOperationTypeCREATE)selfargsrelease_trackclientmessagesruntime_service	operations          r   Runz
Create.Run5   s    %%'M^^M*F.HZ(''00@@B''>>88O&&//h?AI!!#1188: :r   N)__name__
__module____qualname____doc__classmethodr   r2    r   r   r   r   +   s    (5 5
:r   r   N)r6   
__future__r   r   r    googlecloudsdk.api_lib.notebooksr   r&   r   googlecloudsdk.callioper   r	   $googlecloudsdk.command_lib.notebooksr
   googlecloudsdk.corer   DETAILED_HELPReleaseTracksr   GACreateCommandr   detailed_helpr8   r   r   <module>rC      sz    + &  ' E 1 ( 1 6 *		 D%%(():T : *:8 % r   