
    
                        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lmZ dddZ ej&                  ej(                  j*                         G d dej,                               Zee_        y)z"'notebooks runtimes list' command.    )absolute_import)division)unicode_literals)
list_pager)runtimes)util)base)parser_errors)flags)
propertiesz+
        Request for listing runtimes.
    ze
    To list runtimes in a particular location, run:

        $ {command} --location=us-central1
    )DESCRIPTIONEXAMPLESc                   &    e Zd ZdZed        Zd Zy)ListzRequest for listing runtimes.c                     t        j                  | j                               }|j                  j	                  d       |j                  j                  t        j                         t        j                  ||       y)z Register flags for this command.z
        table(name.segment(-1),
        name.segment(-3):label=LOCATION,
        name.segment(-5):label=PROJECT,
        state,
        machineType.segment(-1),
        network.segment(-1),
        subnet.segment(-1))
    N)
r   ApiVersionSelectorReleaseTrackdisplay_info	AddFormat
AddUriFuncruntime_utilGetRuntimeURIr   AddListRuntimeFlags)clsparserapi_versions      &lib/surface/notebooks/runtimes/list.pyArgsz	List.Args/   sb     ))#*:*:*<=K
!! # 	 ""<#=#=>	k62    c                    | j                         }t        j                  |      }t        j                  |      }|j	                  d      sHt
        j                  j                  j                  j                         st        j                  d      |j                  }t        j                  |t        j                   ||      d|j"                  d      S )z9This is what gets called when the user runs this command.locationz
--location)argumentr   pageSize)fieldlimitbatch_size_attribute)r   r   	GetClientGetMessagesIsSpecifiedr   VALUES	notebooksr!   IsExplicitlySetr
   RequiredErrorprojects_locations_runtimesr   YieldFromListr   CreateRuntimeListRequestr%   )selfargsrelease_trackclientmessagesruntime_services         r   RunzList.Run?   s    %%'M^^M*F.HZ(''00@@B''>>88O##--dH=jj') )r   N)__name__
__module____qualname____doc__classmethodr   r7    r   r   r   r   +   s    %3 3)r   r   N)r;   
__future__r   r   r   apitools.base.pyr    googlecloudsdk.api_lib.notebooksr   r   r   googlecloudsdk.callioper	   r
   $googlecloudsdk.command_lib.notebooksr   googlecloudsdk.corer   DETAILED_HELPReleaseTracksr   GAListCommandr   detailed_helpr=   r   r   <module>rI      s~    ) &  ' ' E 1 ( 1 6 *		 D%%(()!)4 !) *!)H # r   