
    ]                        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 model versions in Vertex AI.    )absolute_import)division)unicode_literals)client)apis)base)	constants)endpoint_util)flags)region_utilzy
        table(
            name.basename():label=MODEL_ID,
            versionId,
            displayName
        )
    c                   4    \ rS rSrSr\S 5       rS rS rSr	g)ListVersionV1'   List the model versions of the given region and model.

## EXAMPLES

List the model version of a model `123` of project `example` in region
`us-central1`, run:

  $ {command} 123 --project=example --region=us-central1
c                     U R                   R                  [        5        [        R                  " U S[
        R                  5        g)zSee base class.zto list versionsN)display_info	AddFormat_DEFAULT_FORMATr   AddModelResourceArgr   PromptForOpRegion)parsers    %lib/surface/ai/models/list_version.pyArgsListVersionV1.Args4   s4     !!/2	f&8);;=    c                 b   [         R                  " [        R                  US9   [        R
                  " [        R                  [        R                  [        R                     5      n[        R                  " UUR                  S9R                  U5      sSSS5        $ ! , (       d  f       g= f)a5  Runs command with model client.

Concrete gCloud SDK command subclasses are required to override this.

Args:
  args: Command arguments.
  model_ref: The model resource reference.
  region: The region of the model resource reference.

Returns:
  The response from running the given command with model client.
versionregion)r   messagesN)r
   AiplatformEndpointOverridesr	   
GA_VERSIONr   GetClientInstanceAI_PLATFORM_API_NAMEAI_PLATFORM_API_VERSIONr   ModelsClientMESSAGES_MODULEListVersion)selfargs	model_refr   client_instances        r   _RunListVersionV1._Run;   s     
	2	2$$V
5..

(
(

+
+I,@,@
ACo    "2244?K5
5 
5 
5s   A2B  
B.c                     UR                   R                  R                  5       nUR                  5       S   nU R	                  XU5      $ )NlocationsId)CONCEPTSmodelParseAsDictr-   r)   r*   r+   r   s       r   RunListVersionV1.RunR   s>    ##))+I.F99Tf--r    N)
__name__
__module____qualname____firstlineno____doc__staticmethodr   r-   r6   __static_attributes__r8   r   r   r   r   '   s%     = =..r   r   c                       \ rS rSrSrS rSrg)ListVersionV1Beta1X   r   c                     [         R                  " [        R                  US9   [        R
                  " 5       R                  U5      sS S S 5        $ ! , (       d  f       g = f)Nr   )r
   r!   r	   BETA_VERSIONr   r&   r(   r5   s       r   r-   ListVersionV1Beta1._Rune   sB    		2	2&&v
7  "..y9
7 
7 
7s   $A
A r8   N)r9   r:   r;   r<   r=   r-   r?   r8   r   r   rA   rA   X   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 , ( 3 7 / 5 D%%((),.D$$ ,.  *,.^ D%%++T->->-C-CD: :  E:r   