
    
                     ,   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)z4List command for Colab Enterprise Runtime Templates.    )
list_pager)runtime_templates)util)base)endpoint_util)flagsz`
        List your project's Colab Enterprise notebook runtime templates in a given region.
    zt
        To list your runtime templates in region 'us-central1', run:

        $ {command} --region=us-central1
    )DESCRIPTIONEXAMPLESc                   &    e Zd ZdZed        Zd Zy)ListzList your runtime templates.c                 d    t        j                  |        | j                  j                  d       y)z Register flags for this command.z
        table(name.segment(-1):label=ID,
        displayName.segment(-1),
        name.segment(-3):label=REGION,
        machineSpec.machineType.segment(-1))
    N)r   AddListRuntimeTemplatesFlagsdisplay_info	AddFormat)parsers    +lib/surface/colab/runtime_templates/list.pyArgsz	List.Args+   s+     
&&v.
!! # 	    c           	         | j                         }t        j                  | j                               }|j                  j                  j                         }|j                         d   }t        j                  d|      5  t        j                  |      }|j                  }t        j                  |t        j                  ||      d|j                  d|j                         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notebookRuntimeTemplatespageSize)servicerequestfieldlimitbatch_size_attribute
batch_sizeN)ReleaseTrackr   GetMessagesCONCEPTSr   ParseAsDictr   AiplatformEndpointOverrides	GetClient+projects_locations_notebookRuntimeTemplatesr   YieldFromListruntime_templates_util CreateRuntimeTemplateListRequestr   	page_size)selfargsrelease_trackmessages
region_refr   
api_clientruntime_templates_services           r   RunzList.Run6   s    %%'M 1 1 34H%%++-J /F		2	2v
 >>-0j

@
@   %%+(IIH +

)^^	
 
 
s   A$C00C9N)__name__
__module____qualname____doc__staticmethodr   r5    r   r   r   r   &   s     %	 	r   r   N)r9   apitools.base.pyr   'googlecloudsdk.api_lib.colab_enterpriser   r+   r   googlecloudsdk.callioper   googlecloudsdk.command_lib.air   +googlecloudsdk.command_lib.colab_enterpriser   _DETAILED_HELPDefaultUniverseOnlyReleaseTracksr"   GAr   ListCommandr   detailed_helpr;   r   r   <module>rG      s     ; ' _ 8 ( 7 =		 D%%(($*;*;*@*@A%4 % B %N $ r   