
    
                     h   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*                  ej(                  j,                  ej(                  j.                         G d dej0                               Zee_        y)z#'notebooks instances list' command.    )absolute_import)division)unicode_literals)
list_pager)	instances)util)base)parser_errors)flags)
propertiesz,
        Request for listing instances.
    zh
    To list instances in a particular location, run:

        $ {command} --location=us-central1-a
    )DESCRIPTIONEXAMPLESc                   &    e Zd ZdZed        Zd Zy)ListzRequest for listing instances.c                     |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)display_info	AddFormat
AddUriFuncinstance_utilGetInstanceURIr   AddListInstanceFlags)clsparsers     'lib/surface/notebooks/instances/list.pyArgsz	List.Args0   sG     !! # 	 ""=#?#?@	v&    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)ReleaseTrackr   	GetClientGetMessagesIsSpecifiedr   VALUES	notebooksr   IsExplicitlySetr
   RequiredErrorprojects_locations_instancesr   YieldFromListr   CreateInstanceListRequestr"   )selfargsrelease_trackclientmessagesinstance_services         r   RunzList.Run?   s    %%'M^^M*F.HZ(''00@@B''>>::##//h?jj') )r   N)__name__
__module____qualname____doc__classmethodr   r5    r   r   r   r   +   s     '' ')r   r   N)r9   
__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$   ALPHABETAGAListCommandr   detailed_helpr;   r   r   <module>rI      s    * &  ' ' G 1 ( 1 6 *		 D%%++T->->-C-C%%((* )4  )* )F # r   