
                         P    S 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S r	S	 r
g
)z2Utils for Distributed Cloud Edge Network commands.    )absolute_import)division)unicode_literals)	resourcesc                     SUR                   ;   a  U$ [        R                  R                  SU R                  U R
                  U R                  UR                   S9nUR                  5       UR                  l         U$ )zSets the subnet.network field with a relative resource path.

Args:
  ref: reference to the subnet object.
  args: command line arguments.
  request: API request to be issued

Returns:
  modified request
	projects/-edgenetwork.projects.locations.zones.networks
projectsIdlocationsIdzonesId
networksId)	networkr   REGISTRYCreater   r   r   RelativeNamesubnetrefargsrequestr   s       Alib/googlecloudsdk/command_lib/edge_cloud/networking/resources.pySetResourcesPathForSubnetr      k     DLL N%%5//kk & ' #//1'..	.    c                     SUR                   ;   a  U$ [        R                  R                  SU R                  U R
                  U R                  UR                   S9nUR                  5       UR                  l         U$ )zSets the router.network field with a relative resource path.

Args:
  ref: reference to the router object.
  args: command line arguments.
  request: API request to be issued

Returns:
  modified request
r   r	   r
   )	r   r   r   r   r   r   r   r   routerr   s       r   SetResourcesPathForRouterr   1   r   r   c                     SUR                   ;   a  U$ [        R                  R                  SU R                  U R
                  U R                  UR                   S9nUR                  5       UR                  l         U$ )zSets the route.network field with a relative resource path.

Args:
  ref: reference to the route object.
  args: command line arguments.
  request: API request to be issued

Returns:
  modified request
r   r	   r
   )	r   r   r   r   r   r   r   r   router   s       r   SetResourcesPathForRouter!   K   sk     DLL N%%5//kk & ' "..0'--	.r   c                    SUR                   ;  ah  [        R                  R                  SU R                  U R
                  U R                  UR                   S9nUR                  5       UR                  l         UR                  (       ax  SUR                  ;  ah  [        R                  R                  SU R                  U R
                  U R                  UR                  S9nUR                  5       UR                  l	        U$ )a  Sets the interconnectAttachment.router and interconnectAttachment.interconnect field with a relative resource path.

Args:
  ref: reference to the interconnectAttachment object.
  args: command line arguments.
  request: API request to be issued

Returns:
  modified request
r   z2edgenetwork.projects.locations.zones.interconnects)r   r   r   interconnectsIdr	   r
   )
interconnectr   r   r   r   r   r   r   interconnectAttachmentr   )r   r   r   r$   r   s        r   SetResourcesPathForAttachmentr&   e   s     )))%%,,<>>OO)) - +L 3?2K2K2MG""/	\\k5  ''7>>OO<< ( !G .5-A-A-CG""*	.r   N)__doc__
__future__r   r   r   googlecloudsdk.corer   r   r   r!   r&    r   r   <module>r+      s*    9 &  ' )444r   