
    	                     "   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 ej                  ej                  j                  ej                  j                         ej"                   G d dej$                                      Zy)zACommand to list all Google API sources in a project and location.    )absolute_import)division)unicode_literals)google_api_sources)base)flagsz{description}a          To list all Google API sources in location ``us-central1'', run:

          $ {command} --location=us-central1

        To list all Google API sources in all locations, run:

          $ {command} --location=-

        or

          $ {command}
        )DESCRIPTIONEXAMPLESa#  table(
    name.scope("googleApiSources"):label=NAME,
    destination.scope("messageBuses"):label=DESTINATION,
    destination.scope("projects").segment(1):label=DESTINATION_PROJECT,
    name.scope("locations").segment(0):label=LOCATION,
    loggingConfig.logSeverity:label=LOGGING_CONFIG
)
c                   *    e Zd ZdZeZed        Zd Zy)Listz!List Eventarc Google API sources.c                     t        j                  | ddd       t        j                  |        | j                  j	                  t
               | j                  j                  t        j                         y )Nz_The location for which to list Google API sources. This should be one of the supported regions.FT)requiredallow_aggregation)	r   AddLocationResourceArgAddProjectResourceArgdisplay_info	AddFormat_FORMAT
AddUriFuncr   GetGoogleAPISourceURI)parsers    /lib/surface/eventarc/google_api_sources/list.pyArgsz	List.Args<   s]    	  	% 
'
!!'*
""#5#K#KL    c                     t        j                         }|j                  j                  j	                         }|j                  ||j                  |j                        S )N)r   GoogleApiSourceClientV1CONCEPTSlocationParser   limit	page_size)selfargsclientlocation_refs       r   RunzList.RunI   sC    779F==))//1L;;|TZZ@@r   N)	__name__
__module____qualname____doc___DETAILED_HELPdetailed_helpstaticmethodr   r&    r   r   r   r   5   s&     * -
M 
MAr   r   N)r*   
__future__r   r   r   googlecloudsdk.api_lib.eventarcr   googlecloudsdk.callioper   #googlecloudsdk.command_lib.eventarcr   r+   r   ReleaseTracksReleaseTrackBETAGADefaultUniverseOnlyListCommandr   r.   r   r   <module>r9      s    H &  ' > ( 5 #" D%%**D,=,=,@,@AA4 A  BAr   