
    "                     B    S r SSKJr  SSKJr  SSKJr   " S S\5      rg)zWire Group.    )absolute_import)division)unicode_literalsc                       \ rS rSrSr  SS jr\S 5       r\S 5       r         SS jr	           SS jr
S	 rS
 r          SS jrSS jrSS jrSS jrSrg)	WireGroup   zAbstracts Wire Group resource.Nc                 @    Xl         X l        X0l        X@l        XPl        g N)refprojectcross_site_network_compute_client
_resources)selfr   r   r   compute_client	resourcess         Flib/googlecloudsdk/api_lib/compute/interconnects/wire_groups/client.py__init__WireGroup.__init__   s     HL0)O    c                 .    U R                   R                  $ r
   )r   apitools_clientr   s    r   _clientWireGroup._client(   s    ///r   c                 .    U R                   R                  $ r
   )r   messagesr   s    r   	_messagesWireGroup._messages,   s    (((r   c
           
         U R                   n
U
R                  U R                  R                  5       UU
R	                  UU(       a  U
R                  R                  U5      OSS9US9nU(       a-  U
R                  U
R                  R                  U5      S9Ul        U(       a  XKR                  l
        U(       a*  U
R                  R                  U5      UR                  l        U(       a*  U
R                  R                  U5      UR                  l        U R                  R                   SU
R#                  U R$                  U R&                  UU	S94$ )a  Make a tuple for wire group insert request.

Args:
  description: String that represents the description of the Cloud
    Wire Group resource.
  wire_group_type: type of the wire group.
  bandwidth_unmetered: amount of unmetered bandwidth for the wire group.
  bandwidth_metered: amount of metered bandwidth for the wire group.
  fault_response: fault response for the wire group.
  admin_enabled: set admin_enabled on the wire group.
  network_service_class: the network service class of the wire group.
  bandwidth_allocation: the bandwidth allocation for the wire group.
  validate_only: only validates the configuration, but doesn't create it.

Returns:
Insert wire group tuple that can be used in a request.
NbandwidthUnmeteredfaultResponse)namedescriptionwirePropertiesadminEnabledtypeInsert)r   crossSiteNetwork	wireGroupvalidateOnly)r   r   r   NameWirePropertiesFaultResponseValueValuesEnumWireGroupPropertiesTypeValueValuesEnumwireGroupPropertiesr&   bandwidthMetered"NetworkServiceClassValueValuesEnumnetworkServiceClass"BandwidthAllocationValueValuesEnumbandwidthAllocationr   
wireGroupsComputeWireGroupsInsertRequestr   r   )r   r%   wire_group_typebandwidth_unmeteredbandwidth_meteredfault_responseadmin_enablednetwork_service_classbandwidth_allocationvalidate_onlyr   
wire_groups               r   _MakeCreateRequestTuple!WireGroup._MakeCreateRequestTuple0   sK   : ~~H##XX]]_..2   #11NN%)	 / 
 # $ 
J '/'C'C++?? (D (j$ 3D0

!
!
D
D# 3
 

!
!
D
D" 3 	//LL!44 &	 	0 	
	 	r   c                 6   U R                   nUc  / nUb  UR                  S5        Ub  UR                  S5        Ub  UR                  S5        Ub  UR                  S5        Ub  UR                  S5        Ub  UR                  S5        Ub  UR                  S5        Ub  UR                  S	5        U	b  UR                  S
5        UR                  UUR                  UU(       a  UR                  R	                  U5      OSS9UU	S9nU(       a-  UR                  UR
                  R                  U5      S9Ul        U(       a  XMR                  l	        U(       a*  UR                  R                  U5      UR                  l        U(       a*  UR                  R                  U5      UR                  l        U R                  R                  SUR!                  U R"                  U R$                  U R&                  R)                  5       UU
SR+                  U5      S94$ )z*Make a tuple for wire group patch request.Nr%   zwireGroupProperties.typez!wireProperties.bandwidthUnmeteredzwireProperties.bandwidthMeteredz"wireProperties.networkServiceClassz"wireProperties.bandwidthAllocationzwireProperties.faultResponser'   	endpointsr!   )r%   r&   r'   rG   r(   Patch,)r   r+   r,   wireGroupResourcer-   
updateMask)r   appendr   r/   r0   r1   r2   r3   r&   r4   r5   r6   r7   r8   r   r9   ComputeWireGroupsPatchRequestr   r   r   r.   join)r   r%   r;   r<   r=   r>   r?   r@   rA   rG   rB   update_maskr   rC   s                 r   _MakePatchRequestTuple WireGroup._MakePatchRequestTuple|   s    ~~Hk'"34&<=$:;(=>'=>!78 (%##..2   #11NN%)	 / 
 # $ 
J '/'C'C++?? (D (j$ 3D0

!
!
D
D# 3
 

!
!
D
D" 3 	..LL!44hhmmo(&xx, 	/ 	
 r   c                     U R                   R                  SU R                  R                  U R                  U R
                  U R                  R                  5       S94$ )NDeleter   r+   r,   )r   r9   r   ComputeWireGroupsDeleteRequestr   r   r   r.   r   s    r   _MakeDeleteRequestTuple!WireGroup._MakeDeleteRequestTuple   sP    55LL!44hhmmo 	6 	
 r   c                     U R                   R                  SU R                  R                  U R                  R
                  U R                  U R                  R                  5       S94$ )NGetrT   )r   r9   r   ComputeWireGroupsGetRequestr   r   r   r.   r   s    r   _MakeDescribeRequestTuple#WireGroup._MakeDescribeRequestTuple   sV    22HH$$!44hhmmo 	3 	
 r   c                     U R                  UUUUUUUUU	5	      /nU
(       d   U R                  R                  U5      nUS   $ U$ )zCreate a wire group.r   )rD   r   MakeRequests)r   r%   r;   r<   r=   r>   r?   r@   rA   rB   only_generate_requestrequestsr   s                r   CreateWireGroup.Create   s^     	$$! 
	
H !&&33H=iq\Or   c                 z    U R                   " S0 UD6/nU(       d   U R                  R                  U5      nUS   $ U$ )z"Patch description of a wire group.r    )rP   r   r^   )r   r_   kwargsr`   r   s        r   rH   WireGroup.Patch  s@    ++5f56H &&33H=iq\Or   c                 l    U R                  5       /nU(       d  U R                  R                  U5      $ U$ r
   )rV   r   r^   )r   r_   r`   s      r   rS   WireGroup.Delete  s2    ,,./H !!..x88Or   c                 v    U R                  5       /nU(       d   U R                  R                  U5      nUS   $ U$ )Nr   )r[   r   r^   )r   r_   r`   r   s       r   DescribeWireGroup.Describe  s;    ..01H &&33H=iq\Or   )r   r   r   r   r   )NN)	NNNNNNNNN)NNNNNNNNNNN)
 NNNNNNNNF)F)__name__
__module____qualname____firstlineno____doc__r   propertyr   r   rD   rP   rV   r[   ra   rH   rS   rj   __static_attributes__rd   r   r   r   r      s    &   0 0 ) )
  J\  Tl		  !@r   r   N)rq   
__future__r   r   r   objectr   rd   r   r   <module>rv      s#     '  'D Dr   