
    ~                     T   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dZdZ ej"                  ej$                  j&                  ej$                  j(                  ej$                  j*                         G d dej,                               Zee_        y)z'ids endpoints list' command.    )absolute_import)division)unicode_literals)base)
properties)ids_api)flags)common_argsz:
          List Cloud IDS endpoints in a project.
        z
          $ {command} --project=my-project

          The project is automatically read from the core/project property if it is defined.
    )DESCRIPTIONEXAMPLESztable(
    name.scope("endpoints"):label=ID,
    name.scope("locations").segment(0):label=LOCATION,
    severity,
    state,
    network,
    trafficLogs
)
c                   &    e Zd ZdZed        Zd Zy)ListzList Cloud IDS endpoints.c                     |j                   j                  t               |j                   j                  t	        j
                  | j                                      t        j                         j                  |       y )N)
display_info	AddFormat_FORMAT
AddUriFuncr	   MakeGetUriFuncReleaseTrackr
   ProjectArgumentAddToParser)clsparsers     !lib/surface/ids/endpoints/list.pyArgsz	List.Args9   sU    
!!'*
""5#7#78H8H8J#KL!--f5    c                 8   |j                   xs2 t        j                  j                  j                   j	                         }dj                  |      }t        j                  | j                               }|j                  ||j                  |j                        S )Nzprojects/{}/locations/-)projectr   VALUEScore	GetOrFailformatr   Clientr   ListEndpointslimit	page_size)selfargsr   parentclients        r   RunzList.Run?   so    llHj//44<<FFHG&--g6F^^D--/0F

DNNCCr   N)__name__
__module____qualname____doc__classmethodr   r+    r   r   r   r   4   s     "6 6
Dr   r   N)r/   
__future__r   r   r   googlecloudsdk.callioper   googlecloudsdk.corer   googlecloudsdk.api_lib.idsr   googlecloudsdk.command_lib.idsr	   $googlecloudsdk.command_lib.util.argsr
   DETAILED_HELPr   ReleaseTracksr   ALPHABETAGAListCommandr   detailed_helpr1   r   r   <module>r?      s    $ &  ' ( * . 0 <			 D%%++T->->-C-C%%((*D4 D*D" # r   