
                         6   S r SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSK	J
r
  SSKJr  SS	KJr  S
SS.r\R                   " \R"                  R$                  \R"                  R&                  5      \R(                   " S S\R*                  5      5       5       rg)z Command to create an enrollment.    )absolute_import)division)unicode_literals)enrollments)base)flags)labels_util)logz{description}a           To create a new enrollment `my-enrollment` in location `us-central1` for message-bus `my-message-bus` with cel matching expression `message.type == "google.cloud.pubsub.topic.v1.messagePublished"` and destination pipeline `my-pipeline`, run:

          $ {command} my-enrollment --location=us-central1 --message-bus=my-message-bus --cel-match="message.type == 'google.cloud.pubsub.topic.v1.messagePublished'" --destination-pipeline=my-pipeline
        )DESCRIPTIONEXAMPLESc                   2    \ rS rSrSr\r\S 5       rS r	Sr
g)Create%   zCreate an Eventarc enrollment.c                     [         R                  " U5        [         R                  " USS9  [        R                  " U5        [
        R                  R                  U5        g )NT)required)r   AddCreateEnrollmentResourceArgsAddCelMatchArgr	   AddCreateLabelsFlagsr   
ASYNC_FLAGAddToParser)clsparsers     *lib/surface/eventarc/enrollments/create.pyArgsCreate.Args,   s@    	))&1	$/$$V,OO'    c                 t   [         R                  " 5       nUR                  R                  R	                  5       n[
        R                  " SR                  UR                  UR                  UR                  5      5        UR                  UUR                  UUR                  UR                  R                  R	                  5       UR                  R                  R	                  5       [         R"                  " XR%                  5       5      5      5      nUR&                  (       a  U$ UR)                  USU5      $ )zRun the create command.z4Creating enrollment {} for project {} in location {}Creating)r   EnrollmentClientV1CONCEPTS
enrollmentParser
   debugformatenrollmentsId
projectsIdlocationsIdr   BuildEnrollment	cel_matchmessage_busdestination_pipeliner	   ParseCreateArgsLabelsValueClassasync_WaitFor)selfargsclientenrollment_ref	operations        r   Run
Create.Run3   s    ++-F]]--335NII>EE((%%&&	
 NNMM%%++-MM..446''.E.E.GH	
	I {{>>)Z@@r    N)__name__
__module____qualname____firstlineno____doc___DETAILED_HELPdetailed_helpclassmethodr   r5   __static_attributes__r7   r   r   r   r   %   s$     ' -( (Ar   r   N)r<   
__future__r   r   r   googlecloudsdk.api_lib.eventarcr   googlecloudsdk.callioper   #googlecloudsdk.command_lib.eventarcr   $googlecloudsdk.command_lib.util.argsr	   googlecloudsdk.corer
   r=   ReleaseTracksReleaseTrackBETAGADefaultUniverseOnlyCreateCommandr   r7   r   r   <module>rM      s    ' &  ' 7 ( 5 < # # D%%**D,=,=,@,@A%AT %A  B%Ar   