
    Y	                        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 index endpoints 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 index endpoints of the given project and region.

  ## EXAMPLES

  Lists the index endpoints 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 index endpoints)prompt_func)r
   AddRegionResourceArgr   GetPromptForRegionFuncr   SUPPORTED_OP_REGIONS)parsers    &lib/surface/ai/index_endpoints/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   IndexEndpointsClientList)selfargsr   r   r   s        r   _RunzListV1._Run2   sk    %%++-J /F		2	276	J((9>> ? ! 
K	J	Js   &A??Bc                 B    | j                  |t        j                        S N)r%   r   
GA_VERSIONr#   r$   s     r   Runz
ListV1.Run9   s    99T9//00r   N)__name__
__module____qualname____doc__staticmethodr   r%   r*    r   r   r   r      s%      !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.RunH   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.index_endpointsr   googlecloudsdk.callioper   googlecloudsdk.command_lib.air   r	   r
   r   ReleaseTracksReleaseTrackGAListCommandr   ALPHABETAr2   r0   r   r   <module>r?      s    . &  ' < ( 3 7 / 5 D%%(()1T 1 *1> D%%++T->->-C-CD3& 3 E3r   