
    
                     \   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(                  ej*                  j,                  ej*                  j.                         G d dej0                                      Zee_        y)z#'workbench instances list' command.    )absolute_import)division)unicode_literals)
list_pager)	instances)util)base)parser_errors)flags)
propertiesz(
        Lists workbench 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Lists workbench 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)parsers    'lib/surface/workbench/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__staticmethodr   r4    r   r   r   r   +   s     #' ')r   r   N)r8   
__future__r   r   r   apitools.base.pyr    googlecloudsdk.api_lib.workbenchr   r   r   googlecloudsdk.callioper	   r
   $googlecloudsdk.command_lib.workbenchr   googlecloudsdk.corer   DETAILED_HELPDefaultUniverseOnlyReleaseTracksr#   GABETAListCommandr   detailed_helpr:   r   r   <module>rH      s    * &  ' ' G 1 ( 1 6 *		 D%%(($*;*;*@*@A )4  ) B  )F # r   