
                         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 a Google API source.    )absolute_import)division)unicode_literals)google_api_sources)base)flags)labels_util)logz{description}a           To create a new Google API source `my-google-api-source` in location `us-central1` with a destination message bus `my-message-bus`, run:

          $ {command} my-google-api-source --location=us-central1 --destination-message-bus=my-message-bus
        )DESCRIPTIONEXAMPLESc                   2    \ rS rSrSr\r\S 5       rS r	Sr
g)Create%   z%Create an Eventarc Google API source.c                    [         R                  " U5        [         R                  " US5        [         R                  " USS9  [         R                  " USSS9  [
        R                  " U5        [        R                  R                  U5        g )Nz-The logging config for the Google API source.F)
with_clear)r   hidden)
r   $AddCreateGoogleApiSourceResourceArgsAddLoggingConfigArgAddWideScopeSubscriptionArgAddCryptoKeyArgr	   AddCreateLabelsFlagsr   
ASYNC_FLAGAddToParser)clsparsers     1lib/surface/eventarc/google_api_sources/create.pyArgsCreate.Args,   sh    	..v6	? 
%%f?	&U5A$$V,OO'    c                    [         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                  R                  R	                  5       UR                  UR                  [         R"                  " XR%                  5       5      UR'                  S5      (       a  UR(                  OSUR*                  5      5      nUR,                  (       a  U$ UR/                  USU5      $ )zRun the create command.z;Creating Google API source {} for project {} in location {}organization_subscriptionNCreating)r   GoogleApiSourceClientV1CONCEPTSgoogle_api_sourceParser
   debugformatgoogleApiSourcesId
projectsIdlocationsIdr   BuildGoogleApiSourcedestination_message_buslogging_config
crypto_keyr	   ParseCreateArgsLabelsValueClassIsSpecifiedr!   project_subscriptionsasync_WaitFor)selfargsclientgoogle_api_source_ref	operations        r   Run
Create.Run7   s   779F MM;;AACIIELL!44!,,!--	
 ##!MM11779OO''.E.E.GH ;<< **&&
	
I {{>>)Z1FGGr    N)__name__
__module____qualname____firstlineno____doc___DETAILED_HELPdetailed_helpclassmethodr   r;   __static_attributes__r=   r   r   r   r   %   s$     . -( (Hr   r   N)rB   
__future__r   r   r   googlecloudsdk.api_lib.eventarcr   googlecloudsdk.callioper   #googlecloudsdk.command_lib.eventarcr   $googlecloudsdk.command_lib.util.argsr	   googlecloudsdk.corer
   rC   ReleaseTracksReleaseTrackBETAGADefaultUniverseOnlyCreateCommandr   r=   r   r   <module>rS      s    - &  ' > ( 5 < # # D%%**D,=,=,@,@A-HT -H  B-Hr   