
                         j   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  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)z2`gcloud service-directory endpoints list` command.    )absolute_import)division)unicode_literals)	endpoints)common_args)base)resource_argsc                   4    e Zd ZdZddiZed        Zd Zd Zy)ListLists endpoints.EXAMPLESz          To list Service Directory endpoints, run:

            $ {command} --service=my-service --namespace=my-namespace --location=us-east1
          c                     t        j                  | dd       t        j                  j	                  |        t        j
                  j	                  |        y )Nzto listF)
positional)r	   AddServiceResourceArgr   
LIMIT_FLAGRemoveFromParserURI_FLAG)parsers    /lib/surface/service_directory/endpoints/list.pyArgsz	List.Args(   s8    ''	eLOO$$V,MM""6*    c                    t        j                  | j                               }|j                  j                  j                         }t        j                  |j                        }|j                  ||j                  ||j                        S N)r   EndpointsClientGetReleaseTrackCONCEPTSserviceParser   ParseSortByArgsort_byr   filter	page_size)selfargsclientservice_reforder_bys        r   RunzList.Run.   sd    &&t';';'=>F--''--/K))$,,7H;;{DKK4>>JJr   c                 6    t         j                  j                  S r   )r   ReleaseTrackGAr#   s    r   r   zList.GetReleaseTrack5   s    r   N)	__name__
__module____qualname____doc__detailed_helpstaticmethodr   r(   r    r   r   r   r      s5     - + +
K r   r   c                       e Zd ZdZd Zy)ListBetar   c                 6    t         j                  j                  S r   )r   r*   BETAr,   s    r   r   zListBeta.GetReleaseTrack=   s    !!!r   N)r-   r.   r/   r0   r   r3   r   r   r5   r5   9   s
    "r   r5   N)r0   
__future__r   r   r   (googlecloudsdk.api_lib.service_directoryr   googlecloudsdk.api_lib.utilr   googlecloudsdk.callioper   ,googlecloudsdk.command_lib.service_directoryr	   ReleaseTracksr*   r+   ListCommandr   ALPHAr7   r5   r3   r   r   <module>r@      s    9 &  ' > 3 ( F D%%(() 4   * : D%%++T->->-C-CD"t " E"r   