
    ]	                         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	d
ZdZdZ ej                  ej                  j                         ej"                   G d dej$                                      Zy)z>Command to list all event providers available in Eventarc API.    )absolute_import)division)unicode_literals)	providers)base)flagsz{description}z         To list all providers in location `us-central1`, run:

          $ {command} --location=us-central1

        To list all providers in all locations, run:

          $ {command} --location=-

        or

          $ {command}
        )DESCRIPTIONEXAMPLESz` table(
name.scope("providers"):label=NAME,
name.scope("locations").segment(0):label=LOCATION
)
zname:/providers/c                   *    e Zd ZdZeZed        Zd Zy)Listz+List event providers available in Eventarc.c                    t        j                  | ddd       t        j                  |        t        j                  |        | j                  j                  t               | j                  j                  t        j                         y )Nz.The location in which to list event providers.FT)requiredallow_aggregation)
r   AddLocationResourceArgAddProjectResourceArgAddProviderNameArgdisplay_info	AddFormat_FORMAT
AddUriFuncr   GetProvidersURI)parsers    &lib/surface/eventarc/providers/list.pyArgsz	List.Args=   sh    	  8	 
'	V$
!!'*
""9#<#<=    c                    t        j                  | j                               }|j                  j                  j                          |j                  j                  j                         }|j                  r0|j                         j                  t        |j                  z          |j                  |j                         |j                  |j                        S )zRun the list command.)limit	page_size)r   ProvidersClientReleaseTrackCONCEPTSprojectParselocationnameGetDisplayInfo	AddFilter_FILTERr   RelativeNamer   r   )selfargsclientlocation_refs       r   RunzList.RunJ   s    &&t'8'8':;FMM!==))//1Lyy
%%g		&9:;;!!#4::  Q Qr   N)	__name__
__module____qualname____doc___DETAILED_HELPdetailed_helpstaticmethodr   r.    r   r   r   r   6   s$     4 -
> 
>Qr   r   N)r2   
__future__r   r   r   googlecloudsdk.api_lib.eventarcr   googlecloudsdk.callioper   #googlecloudsdk.command_lib.eventarcr   r3   r   r(   ReleaseTracksr    GADefaultUniverseOnlyListCommandr   r6   r   r   <module>r?      s    E &  ' 5 ( 5 			&  D%%(()Q4 Q  *Qr   