
    
                        S r SSKJr  SSKJr  SSKJr  SSKJr  SSKJ	r	  SSKJ
r
  SSKJr  S	r\R                  " \R                  R                  5      \R                    " S
 S\R"                  5      5       5       r\R                  " \R                  R&                  \R                  R(                  5      \R                    " S S\5      5       5       rg)z$Command to list models in Vertex AI.    )client)apis)base)	constants)endpoint_util)flags)region_utilzb
        table(
            name.basename():label=MODEL_ID,
            displayName
        )
    c                   4    \ rS rSrSr\S 5       rS rS rSr	g)ListV1#   zList the models of the given project and region.

## EXAMPLES

List the models of project ``example'' in region ``us-central1'', run:

  $ {command} --project=example --region=us-central1
c                     U R                   R                  [        5        [        R                  " U S[
        R                  S9  g )Nzto list models)prompt_func)display_info	AddFormat_DEFAULT_FORMATr   AddRegionResourceArgr	   PromptForOpRegion)parsers    lib/surface/ai/models/list.pyArgsListV1.Args/   s3    
!!/2	 k.K.KM    c                 ^   [         R                  " [        R                  US9   [        R
                  " [        R                  [        R                  [        R                     5      n[        R                  " UUR                  S9R                  US9sS S S 5        $ ! , (       d  f       g = f)Nversionregion)r   messages
region_ref)r   AiplatformEndpointOverridesr   
GA_VERSIONr   GetClientInstanceAI_PLATFORM_API_NAMEAI_PLATFORM_API_VERSIONr   ModelsClientMESSAGES_MODULEList)selfargsr   r   client_instances        r   _RunListV1._Run5   s    		2	2$$V
5..

(
(

+
+I,@,@
ACo    "22448DJD4O
5 
5 
5s   A0B
B,c                     UR                   R                  R                  5       nUR                  5       S   nU R	                  XU5      $ )NlocationsId)CONCEPTSr   ParseAsDictr+   r(   r)   r   r   s       r   Run
ListV1.Run?   s>    %%++-J /F99Tv..r    N)
__name__
__module____qualname____firstlineno____doc__staticmethodr   r+   r3   __static_attributes__r5   r   r   r   r   #   s(     M M
P/r   r   c                       \ rS rSrSrS rSrg)ListV1Beta1E   zList the models of the given project and region.

## EXAMPLES

List the models of project `example` in region `us-central1`, run:

  $ {command} --project=example --region=us-central1
c                     [         R                  " [        R                  US9   [        R
                  " 5       R                  US9sS S S 5        $ ! , (       d  f       g = f)Nr   r   )r   r    r   BETA_VERSIONr   r%   r'   r2   s       r   r+   ListV1Beta1._RunQ   sE    		2	2&&v
7  "'':'>
7 
7 
7s   "A
Ar5   N)r6   r7   r8   r9   r:   r+   r<   r5   r   r   r>   r>   E   s    ?r   r>   N)r:    googlecloudsdk.api_lib.ai.modelsr   googlecloudsdk.api_lib.utilr   googlecloudsdk.callioper   googlecloudsdk.command_lib.air   r   r   r	   r   ReleaseTracksReleaseTrackGAUniverseCompatibleListCommandr   ALPHABETAr>   r5   r   r   <module>rN      s    + 4 , ( 3 7 / 5 D%%(()/T /  */@ D%%++T->->-C-CD?& ?  E?r   