
    a#                     B    S r SSKJr  SSKJr  SSKJr   " S S\5      rg)zInterconnect 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\	S\	S	\	S
\	S\
S\	S\S\	S\	S\	S\	4S jjrS rS rS rS rS rS rS r    S#S jrS$S jrS$S jr    S%S jrS$S jr   S&S jrS rg)'InterconnectGroup   z&Abstracts Interconnect Group resource.Nc                 4    Xl         X l        X0l        X@l        g N)refproject_compute_client
_resources)selfr   r   compute_client	resourcess        Alib/googlecloudsdk/api_lib/compute/interconnects/groups/client.py__init__InterconnectGroup.__init__   s    HL)O    c                 .    U R                   R                  $ r
   )r   apitools_clientr   s    r   _clientInterconnectGroup._client    s    ///r   c                 .    U R                   R                  $ r
   )r   messagesr   s    r   	_messagesInterconnectGroup._messages$   s    (((r   facilitydescriptionname	link_typerequested_link_countinterconnect_typeadmin_enablednoc_contact_emailcustomer_nameremote_locationrequested_featuresc                 H    U R                   R                  UUUUUUUUU	U
US9$ )z9Make an InterconnectGroupsCreateMembersInterconnectInput.)r   r    r!   linkTyperequestedLinkCountinterconnectTypeadminEnablednocContactEmailcustomerNameremoteLocationrequestedFeatures)r   0InterconnectGroupsCreateMembersInterconnectInput)r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   s               r   4MakeInterconnectGroupsCreateMembersInterconnectInputFInterconnectGroup.MakeInterconnectGroupsCreateMembersInterconnectInput(   sB     >>JJ/*")"&, K  r   c                 .   U Vs/ s H  nU R                   R                  R                  R                  UU R                   R	                  U R
                  R                  SUU R                  R                  S9R                  5       S9S9PM     sn$ s  snf )Nzcompute.interconnects)interconnectr   )r7   )keyvalue)
r   r   InterconnectsValueAdditionalPropertyInterconnectGroupInterconnectr   Creater   r   SelfLink)r   interconnectsr7   s      r   _MakeAdditionalProperties+InterconnectGroup._MakeAdditionalPropertiesE   s     * *L 	((;;NN ..>>!__33+!- HH,, 4  (* ? 	 	O 	
 *  s   B
Bc                 2   U R                   nU R                  R                  SUR                  U R                  UR                  UR                  US9U R                  R                  5       UUR
                  R                  U R                  U5      S9S9S94$ )a  Make a tuple for interconnect group insert request.

Args:
  description: String that represents the description of the Cloud
    Interconnect Group resource.
  topology_capability: String that represents the topology capability of the
    Cloud Interconnect Group resource.
  interconnects: List of strings that represent the names of the Cloud
    Interconnect resources that are members of the Cloud Interconnect Group
    resource.

Returns:
Insert interconnect group tuple that can be used in a request.
InserttopologyCapabilityadditionalProperties)intentr!   r    r?   r   interconnectGroup)r   r   interconnectGroups&ComputeInterconnectGroupsInsertRequestr   r   InterconnectGroupIntentr   Namer:   r@   )r   r    topology_capabilityr?   r   s        r   _MakeCreateRequestTuple)InterconnectGroup._MakeCreateRequestTupleV   s    ( ~~H''77LL&8877': 8  XX]]_'&88KK)-)G)G%* L  9  	8 	
 r   c                 p   U R                   nSUR                  R                  U R                  U5      S90nUR	                  U5        Ub  UR                  US9US'   U R                  R                  SUR                  U R                  U R                  R                  5       UR                  " S0 UD6US94$ )z2Make a tuple for interconnect group patch request.r?   rF   rD   rH   Patch)r   rJ   interconnectGroupResource
updateMask )r   r   r:   r@   updaterM   r   rK   %ComputeInterconnectGroupsPatchRequestr   r   rN   )r   rO   r?   update_maskkwargsr   group_paramss          r   _MakePatchRequestTuple(InterconnectGroup._MakePatchRequestTuple   s     ~~H33FF!%!?!?!N G 
L
 &'??0  @  l8 	''66LL"hhmmo&.&@&@ '' # 	7 	
 r   c                     U R                   R                  SU R                  R                  U R                  R
                  U R                  R                  5       S94$ )NDeleterI   )r   rK   r   &ComputeInterconnectGroupsDeleteRequestr   r   rN   r   s    r   _MakeDeleteRequestTuple)InterconnectGroup._MakeDeleteRequestTuple   sL    ''==HH$$ 	> 	
 r   c                     U R                   R                  SU R                  R                  U R                  R
                  U R                  R                  5       S94$ )NGetrI   )r   rK   r   #ComputeInterconnectGroupsGetRequestr   r   rN   r   s    r   _MakeDescribeRequestTuple+InterconnectGroup._MakeDescribeRequestTuple   sL    ''::HH$$ 	; 	
 r   c                     U R                   R                  SU R                  R                  U R                  R
                  U R                  R                  5       S94$ )NGetOperationalStatusrI   )r   rK   r   4ComputeInterconnectGroupsGetOperationalStatusRequestr   r   rN   r   s    r   %_MakeGetOperationalStatusRequestTuple7InterconnectGroup._MakeGetOperationalStatusRequestTuple   sM    ''KKHH$$ 	L 	
 r   c                     U R                   nU R                  R                  SUR                  U R                  R
                  UR                  UR                  UUUS9S9U R                  R                  5       S94$ )NCreateMembers)intentMismatchBehaviortemplateInterconnectr?   )request)r   &interconnectGroupsCreateMembersRequestrJ   )	r   r   rK   -ComputeInterconnectGroupsCreateMembersRequestr   r   &InterconnectGroupsCreateMembersRequestInterconnectGroupsCreateMembersrN   )r   intent_mismatch_behaviortemplate_interconnectmember_interconnectsr   s        r   _MakeCreateMembersRequestTuple0InterconnectGroup._MakeCreateMembersRequestTuple   s     ~~H''>>HH$$3;3b3b @@+C)>"6 A  4c 4 #hhmmo 	? 
	
 r   c                 |    U R                  UUU5      /nU(       d   U R                  R                  U5      nUS   $ U$ )zCreate an interconnect group.r   )rP   r   MakeRequests)r   r    rO   r?   only_generate_requestrequestsr   s          r   r=   InterconnectGroup.Create   sL     	$$	
H !&&33H=iq\Or   c                 l    U R                  5       /nU(       d  U R                  R                  U5      $ U$ r
   )ra   r   r|   )r   r}   r~   s      r   r_   InterconnectGroup.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   )rf   r   r|   r   r}   r~   r   s       r   DescribeInterconnectGroup.Describe   s;    ..01H &&33H=iq\Or   c                 ~    U R                   " XU40 UD6/nU(       d   U R                  R                  U5      nUS   $ U$ )zYPatch description, topology capability and member interconnects of an interconnect group.r   )r\   r   r|   )r   rO   r?   rY   r}   rZ   r~   r   s           r   rS   InterconnectGroup.Patch   sP     	##	
?E	
H
 !&&33H=iq\Or   c                 v    U R                  5       /nU(       d   U R                  R                  U5      nUS   $ U$ r   )rk   r   r|   r   s       r   ri   &InterconnectGroup.GetOperationalStatus  s;    ::<=H &&33H=iq\Or   c                 j    U R                  UUU5      /nU R                  R                  U5      nUS   $ )z5Create member interconnects in an interconnect group.r   )ry   r   r|   )r   rv   rw   rx   r~   r   s         r   rn   InterconnectGroup.CreateMembers  sD     	++$! 	
H $$11(;IQ<r   )r   r   r   r   )NN)NNNN   NTNNNN)NNrV   F)F)NrV    F)NNrV   )__name__
__module____qualname____firstlineno____doc__r   propertyr   r   strintboolr4   r@   rP   r\   ra   rf   rk   ry   r=   r_   r   rS   ri   rn   __static_attributes__rV   r   r   r   r      s/   .  0 0 ) )
 "## #! $  	
         :"'R82 !( !&  $ 	r   r   N)r   
__future__r   r   r   objectr   rV   r   r   <module>r      s#     '  '@ @r   