
                         L   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
S.r\R                  " SSSSS9r\R                  " SSSSS9r\R"                  " \R$                  R&                  5      \R(                   " S S\R*                  5      5       5       rg)z'Command to create a channel connection.    )absolute_import)division)unicode_literals)channel_connections)base)flags)logz{description}a          To create a new channel connection ``my-channel-connection'' for channel ``my-channel'' with activation token ``channel-activation-token'', run:

          $ {command} my-channel-connection --channel=my-channel --activation-token=channel-activation-token
        )DESCRIPTIONEXAMPLESz--activation-tokenactivation_tokenz+Activation token for the specified channel.T)desthelprequiredz	--channelchannelzSubscriber channel for which to create the channel connection. This argument should be the full channel name, including project, location and the channel id. c                   2    \ rS rSrSr\r\S 5       rS r	Sr
g)Create2   z&Create an Eventarc channel connection.c                     [         R                  " US5        [        R                  U5        [        R                  U5        [         R
                  " USS9  [        R                  R                  U5        g )NzChannel connection to create.z*Labels to apply to the channel connection.)	help_text)r   AddChannelConnectionResourceArgCHANNEL_FLAGAddToParserACTIVATION_TOKEN_FLAGAddLabelsArgr   
ASYNC_FLAG)clsparsers     2lib/surface/eventarc/channel_connections/create.pyArgsCreate.Args9   sZ    	))&*IKV$%%f-	F 	OO'    c           
      <   [         R                  " 5       nUR                  R                  R	                  5       nUR                  5       R                  5       R                  5       nUR                  5       R                  5       n[        R                  " SR                  UR                  5       XE5      5        UR                  UUR                  UUR                  UR                  UR                  S95      nUR                  (       a  U$ UR!                  USU5      $ )zRun the create command.z1Creating channel {} for project {} in location {})r   r   labelsCreating)r   ChannelConnectionClientV1CONCEPTSchannel_connectionParseParentNamer	   debugformatr   BuildChannelConnectionr   r   r#   async_WaitFor)selfargsclientchannel_connection_refproject_namelocation_name	operations          r   Run
Create.RunD   s     ::<F!]]==CCE)00299;@@BL*11388:MIIAHH##%|D E%%"LL!22;;	 	& 	
I {{>>)Z1GHHr!    N)__name__
__module____qualname____firstlineno____doc___DETAILED_HELPdetailed_helpclassmethodr   r7   __static_attributes__r9   r!   r   r   r   2   s$     / -( (Ir!   r   N)r>   
__future__r   r   r   googlecloudsdk.api_lib.eventarcr   googlecloudsdk.callioper   #googlecloudsdk.command_lib.eventarcr   googlecloudsdk.corer	   r?   Argumentr   r   ReleaseTracksReleaseTrackGADefaultUniverseOnlyCreateCommandr   r9   r!   r   <module>rN      s    . &  ' ? ( 5 # 				 		:	  }}	 
n	 D%%(()%IT %I  *%Ir!   