
                            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KJr  S
rSr\	R"                  " \	R$                  R&                  5       " S S\	R(                  5      5       r\	R,                  " SSS9\	R"                  " \	R$                  R.                  5       " S S\5      5       5       rg)z%Command to create a datastream route.    )absolute_import)division)unicode_literals)routes)util)base)flags)resource_argsz,Create a Datastream private connection routez    To create a route called 'my-route', run:

        $ {command} my-route --location=us-central1 --private-connection=private-connection --display-name=my-display-name --destination-address=addr.path.to.somewhere --destination-port=33665


   c                   8    \ rS rSrSr\\S.r\S 5       r	S r
Srg)Create'   -Create a Datastream private connection route.)DESCRIPTIONEXAMPLESc                     [         R                  " U S5        [        R                  " U 5        [        R                  " U 5        [        R
                  " U 5        [        R                  " U 5        g)zArgs is called by calliope to gather arguments for this command.

Args:
  parser: An argparse parser that you can use to add arguments that go on
    the command line after this command. Positional arguments are allowed.
z	to createN)r
   AddRouteResourceArgroutes_flagsAddDisplayNameFlagAddDestinationAddressFlagAddDestinationPortFlagr	   AddLabelsCreateFlags)parsers    'lib/surface/datastream/routes/create.pyArgsCreate.Args,   sL     %%fk:##F+**62''/	v&    c                 *   UR                   R                  R                  5       nUR                  5       R	                  5       n[
        R                  " 5       nUR                  X2R                  U5      n[        R                  " 5       n[        R                  " 5       n[        R                  " 5       nUR                  SUR                  UR                  UR                  S9n	UR                   R#                  UR%                  U	R&                  S95      $ )zCreate a Datastream route.

Args:
  args: argparse.Namespace, The arguments that this command was invoked
    with.

Returns:
  A dict object representing the operations resource describing the create
  operation if the create was successful.
z(datastream.projects.locations.operations)operationsId
projectsIdlocationsId)name)CONCEPTSrouteParseParentRelativeNamer   RoutesClientr   routesIdr   GetClientInstanceGetMessagesModuleGetResourceParserr!   r   r    projects_locations_operationsGet/DatastreamProjectsLocationsOperationsGetRequestr   )
selfargs	route_ref
parent_refroutes_clientresult_operationclientmessagesresource_parseroperation_refs
             r   Run
Create.Run<   s     ##))+I!!#002J'')M$++&&. ##%F%%'H,,.O#**2%**''))	 + +M //33@@++ 	A 	-. .r    N)__name__
__module____qualname____firstlineno____doc__r   r   detailed_helpstaticmethodr   r9   __static_attributes__r;   r   r   r   r   '   s&    5"-8D-' '.r   r   FzcDatastream beta version is deprecated. Please use`gcloud datastream routes create` command instead.)
is_removedwarningc                       \ rS rSrSrSrg)
CreateBeta]   r   r;   N)r<   r=   r>   r?   r@   rC   r;   r   r   rG   rG   ]   s     6r   rG   N)r@   
__future__r   r   r   !googlecloudsdk.api_lib.datastreamr   r   googlecloudsdk.callioper   %googlecloudsdk.command_lib.datastreamr	   r
   ,googlecloudsdk.command_lib.datastream.routesr   r   r   ReleaseTracksReleaseTrackGACommandr   	DeprecateBETArG   r;   r   r   <module>rT      s    , &  ' 4 2 ( 7 ? N > D%%(()2.T\\ 2. *2.j :
 D%%**+6 6 ,6r   