
    `                     0   S r SSKJr  SSKJr  SSKJr  SSKrSSKJr  SSKJ	r	  SSK
Jr  S	S
S.rSrS r\	R                  " \	R                   R"                  \	R                   R$                  5      \	R&                   " S S\	R(                  5      5       5       rg)z:Command to list all enrollments in a project and location.    )absolute_import)division)unicode_literalsN)enrollments)base)flagsz{description}z         To list all enrollments in location `us-central1`, run:

          $ {command} --location=us-central1

        To list all enrollments in all locations, run:

          $ {command} --location=-

        or

          $ {command}
        )DESCRIPTIONEXAMPLESa   table(
    name.scope("enrollments"):label=NAME,
    message_bus.scope("messageBuses"):label=MESSAGE_BUS,
    message_bus.scope("projects").segment(1):label=MESSAGE_BUS_PROJECT,
    destination():label=DESTINATION,
    name.scope("locations").segment(0):label=LOCATION
)
c                     U R                  S5      nUc  gSn[        R                  " X!5      nU(       a   SR                  UR	                  S5      5      $ g)z1Generate a destination string for the enrollment.destinationzUnknown destinationz)^projects/.*/locations/.*/pipelines/(.*)$zPipeline: {}   )getresearchformatgroup)
enrollmentr   pipeline_str_patternmatchs       (lib/surface/eventarc/enrollments/list.py_Destinationr   7   sM    }-+ D
))(
6%
  Q00	    c                   2    \ rS rSrSr\r\S 5       rS r	Sr
g)ListE   zList Eventarc enrollments.c                 0   [         R                  " U SSSS9  [         R                  " U 5        U R                  R	                  [
        5        U R                  R                  [        R                  5        U R                  R                  S[        05        g )NzXThe location for which to list enrollments. This should be one of the supported regions.FT)requiredallow_aggregationr   )r   AddLocationResourceArgAddProjectResourceArgdisplay_info	AddFormat_FORMAT
AddUriFuncr   GetEnrollmentURIAddTransformsr   )parsers    r   Args	List.ArgsL   sz    	  	 
'
!!'*
"";#?#?@
%%|' r   c                     [         R                  " 5       nUR                  R                  R	                  5       nUR                  X1R                  UR                  5      $ )N)r   EnrollmentClientV1CONCEPTSlocationParser   limit	page_size)selfargsclientlocation_refs       r   RunList.Run\   sA    ++-F==))//1L;;|ZZ@@r    N)__name__
__module____qualname____firstlineno____doc___DETAILED_HELPdetailed_helpstaticmethodr(   r5   __static_attributes__r7   r   r   r   r   E   s$     # - Ar   r   )r<   
__future__r   r   r   r   googlecloudsdk.api_lib.eventarcr   googlecloudsdk.callioper   #googlecloudsdk.command_lib.eventarcr   r=   r#   r   ReleaseTracksReleaseTrackBETAGADefaultUniverseOnlyListCommandr   r7   r   r   <module>rK      s    A &  ' 	 7 ( 5 #" D%%**D,=,=,@,@AA4 A  BAr   