
    +	                     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5      rg)	z)Cloud Datastream private connections API.    )absolute_import)division)unicode_literals)utilc                   2    \ rS rSrSrSS jrS rS	S jrSrg)
RoutesClient   z9Client for private connections routes service in the API.Nc                     U=(       d    [         R                  " 5       U l        U=(       d    [         R                  " 5       U l        U R                  R
                  U l        [         R                  " 5       U l        g N)	r   GetClientInstance_clientGetMessagesModule	_messages,projects_locations_privateConnections_routes_serviceGetResourceParser_resource_parser)selfclientmessagess      /lib/googlecloudsdk/api_lib/datastream/routes.py__init__RoutesClient.__init__   sN    5T335DL9!7!7!9DNLLMMDM 224D    c                 |    U R                   R                  U0 UR                  UR                  UR                  S9nU$ )zReturns a route object.)namelabelsdisplayNamedestinationAddressdestinationPort)r   Routedisplay_namedestination_addressdestination_port)r   route_idargs	route_objs       r   	_GetRouteRoutesClient._GetRoute!   sB    $$bd.?.?33-- % /I r   c                     U R                  X#5      n[        R                  " 5       nU R                  R                  nU" UUR
                  UUS9nU R                  R                  U5      $ )ae  Creates a route.

Args:
  parent_ref: a Resource reference to a parent datastream.projects.
  locations.privateConnections resource for this route.
  route_id: str, the name of the resource to create.
  args: argparse.Namespace, The arguments that this command was invoked
    with.

Returns:
  Operation: the operation for creating the private connection.
)routerouteIdparent	requestId)r(   r   GenerateRequestIdr   @DatastreamProjectsLocationsPrivateConnectionsRoutesCreateRequestr   r   Create)r   
parent_refr%   r&   r+   
request_idcreate_req_type
create_reqs           r   r1   RoutesClient.Create)   s`     NN8*E'')JnneeO 

	J ==
++r   )r   r   r   r   )NNr   )	__name__
__module____qualname____firstlineno____doc__r   r(   r1   __static_attributes__ r   r   r   r      s    A5,r   r   N)r;   
__future__r   r   r   !googlecloudsdk.api_lib.datastreamr   r   r=   r   r   <module>r@      s     0 &  ' 2), ),r   