
                             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
\R                  5      rg)z(Google Cloud Private Connections client.    )absolute_import)division)unicode_literals)
list_pager)util)NetworksClient)	arg_utilsc                   h   ^  \ rS rSrSrU 4S jrS r   SS jrSS jrS r	S r
SS	 jrS
 rSrU =r$ )PrivateConnectionsClient   zPrivate Connections client.c                 ~   > [         [        U ]  5         U R                  R                  U l        [        5       U l        g N)superr   __init__client%projects_locations_privateConnectionsservicer   networks_client)self	__class__s    7lib/googlecloudsdk/api_lib/vmware/privateconnections.pyr   !PrivateConnectionsClient.__init__   s-    	
"D24;;DDDL)+D    c                     U R                   R                  UR                  5       S9nU R                  R	                  U5      nU$ N)name)messages9VmwareengineProjectsLocationsPrivateConnectionsGetRequestRelativeNamer   Get)r   resourcerequestresponses       r   r    PrivateConnectionsClient.Get#   sA    mmUU""$ V &G||(HOr   c                    UR                  5       R                  5       nUR                  5       R                  5       R                  5       n	UR                  5       n
U R                  R	                  US9nUb  U R                  U5      Ul        U R                  R                  X5      nUR                  Ul
        [        R                  " SU R                  R                  R                  S S9R                  [        R                  " U5      5      nXl        U R#                  X5      nSR%                  X7S9Ul        U R                  R)                  UUU
S9nU R*                  R-                  U5      $ )N)descriptiontypec                     SU ;  $ )NTYPE_UNSPECIFIED xs    r   <lambda>1PrivateConnectionsClient.Create.<locals>.<lambda>=   s
    !31!<r   arg_namemessage_enuminclude_filterz/projects/{project}/global/networks/{network_id})project
network_id)parentprivateConnectionprivateConnectionId)Parentr   Namer   PrivateConnectionGetRoutingModeroutingModer   GetByIDr   vmwareEngineNetworkr	   ChoiceEnumMapperTypeValueValuesEnumGetEnumForChoiceEnumNameToChoicer'   GetServiceNetworkformatserviceNetwork<VmwareengineProjectsLocationsPrivateConnectionsCreateRequestr   Create)r   r!   vmware_engine_networkservice_projectprivate_connection_typerouting_moder&   service_networkr5   r3   private_connection_idprivate_connectionven	type_enumr"   s                  r   rG   PrivateConnectionsClient.Create)   sV    __++-Foo&&(--/G$MMO88 9 !'+':':<'H$



&
&w
FC-0XX***]]44HH<> ?O>N&&'>??A 
 (,,YHO(Y(`(` )a )=%mmXX,1 Y 3G <<w''r   c                 V   U R                  U5      n/ nUb  X$l        UR                  S5        Ub'  U R                  U5      Ul        UR                  S5        U R
                  R                  UUR                  5       SR                  U5      S9nU R                  R                  U5      $ )Nr&   rK   ,)r6   r   
updateMask)r    r&   appendr;   r<   r   ;VmwareengineProjectsLocationsPrivateConnectionsPatchRequestr   joinr   Patch)r   r!   r&   rK   rN   update_maskr"   s          r   UpdatePrivateConnectionsClient.UpdateI   s    (+K'2$''+':':<'H$(mmWW,""$88K( X *G <<g&&r   c                     U R                   R                  UR                  5       S9nU R                  R	                  U5      $ r   )r   <VmwareengineProjectsLocationsPrivateConnectionsDeleteRequestr   r   Delete)r   r!   r"   s      r   r^   PrivateConnectionsClient.DeleteX   s=    mmXX""$ Y &G<<w''r   c                     UR                  5       nU R                  R                  US9n[        R                  " U R
                  USSS9$ )N)r5   privateConnectionspageSize)fieldbatch_size_attribute)r   r   :VmwareengineProjectsLocationsPrivateConnectionsListRequestr   YieldFromListr   )r   location_resourcelocationr"   s       r   ListPrivateConnectionsClient.List]   sP     --/HmmVV W G##"'	) )r   c                 *   U(       a  U$ XR                   R                  R                  R                  :X  a  gXR                   R                  R                  R                  :X  a  gXR                   R                  R                  R
                  :X  a  gg )Nservicenetworkingzdell-tenant-vpcznetapp-tenant-vpc)r   r:   r@   PRIVATE_SERVICE_ACCESSDELL_POWERSCALENETAPP_CLOUD_VOLUMES)r   rP   rL   s      r   rC   *PrivateConnectionsClient.GetServiceNetworkg   sn    MM33GG^^^ MM33GGWWWMM33GG\\\  ]r   c                     [         R                  " SU R                  R                  R                  S S9R                  [         R                  " U5      5      nU$ )NrK   c                     SU ;  $ )NROUTING_MODE_UNSPECIFIEDr*   r+   s    r   r-   9PrivateConnectionsClient.GetRoutingMode.<locals>.<lambda>u   s
    !;1!Dr   r/   )r	   r?   r   r:   RoutingModeValueValuesEnumrA   rB   )r   rK   routing_mode_enums      r   r;   'PrivateConnectionsClient.GetRoutingModeq   sN    !22]]44OOD y11,?@	 
 r   )r   r   )NNN)NNr   )__name__
__module____qualname____firstlineno____doc__r   r    rG   rZ   r^   ri   rC   r;   __static_attributes____classcell__)r   s   @r   r   r      s?    #,
 !(@'(
)! r   r   N)r|   
__future__r   r   r   apitools.base.pyr   googlecloudsdk.api_lib.vmwarer   &googlecloudsdk.api_lib.vmware.networksr   $googlecloudsdk.command_lib.util.apisr	   VmwareClientBaser   r*   r   r   <module>r      s3    / &  ' ' . A :\t44 \r   