
    	                        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  ej                  ej                  j                          G d dej"                               Z ej                  ej                  j&                  ej                  j(                         G d de             Zy)zVertex AI indexes list command.    )absolute_import)division)unicode_literals)client)base)	constants)endpoint_util)flags)region_utilc                   ,    e Zd ZdZed        Zd Zd Zy)ListV1Lists the indexes of the given project and region.

  ## EXAMPLES

  Lists the indexes of project `example` in region `us-central1`, run:

    $ {command} --project=example --region=us-central1
  c                 v    t        j                  | dt        j                  t        j
                               y )Nzto list indexes)prompt_func)r
   AddRegionResourceArgr   GetPromptForRegionFuncr   SUPPORTED_OP_REGIONS)parsers    lib/surface/ai/indexes/list.pyArgszListV1.Args(   s-    	66**
    c                    |j                   j                  j                         }|j                         d   }t	        j
                  ||      5  t        j                  |      j                  |      cd d d        S # 1 sw Y   y xY w)NlocationsId)region)version)
region_ref)	CONCEPTSr   ParseAsDictr	   AiplatformEndpointOverridesr   IndexesClientList)selfargsr   r   r   s        r   _RunzListV1._Run2   sf    %%++-J /F		2	276	J!!'277:7N 
K	J	Js   &A??Bc                 B    | j                  |t        j                        S N)r%   r   
GA_VERSIONr#   r$   s     r   Runz
ListV1.Run8   s    99T9//00r   N)__name__
__module____qualname____doc__staticmethodr   r%   r*    r   r   r   r      s&      O1r   r   c                       e Zd ZdZd Zy)ListV1Beta1r   c                 B    | j                  |t        j                        S r'   )r%   r   BETA_VERSIONr)   s     r   r*   zListV1Beta1.RunG   s    99T91122r   N)r+   r,   r-   r.   r*   r0   r   r   r2   r2   <   s    3r   r2   N)r.   
__future__r   r   r   !googlecloudsdk.api_lib.ai.indexesr   googlecloudsdk.callioper   googlecloudsdk.command_lib.air   r	   r
   r   ReleaseTracksReleaseTrackGAListCommandr   ALPHABETAr2   r0   r   r   <module>r?      s    & &  ' 4 ( 3 7 / 5 D%%(()1T 1 *1< D%%++T->->-C-CD3& 3 E3r   