
    b                        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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$                  R0                  5      \
R(                   " S S\5      5       5       rg)z$Command to list models in Vertex AI.    )absolute_import)division)unicode_literals)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.Args2   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._Run8   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.RunB   s>    %%++-J /F99Tv..r    N)
__name__
__module____qualname____firstlineno____doc__staticmethodr   r.   r6   __static_attributes__r8   r   r   r   r   &   s(     M M
P/r   r   c                       \ rS rSrSrS rSrg)ListV1Beta1H   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*   r5   s       r   r.   ListV1Beta1._RunT   sE    		2	2&&v
7  "'':'>
7 
7 
7s   "A
Ar8   N)r9   r:   r;   r<   r=   r.   r?   r8   r   r   rA   rA   H   s    ?r   rA   N)r=   
__future__r   r   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BETArA   r8   r   r   <module>rR      s    + &  ' 3 , ( 3 7 / 5 D%%(()/T /  */@ D%%++T->->-C-CD?& ?  E?r   