
                            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r SS jr\R                  \R                   " \R"                  R$                  5       " S	 S
\R&                  5      5       5       r\R                  \R                   " \R"                  R*                  5       " S S\5      5       5       r\R                  \R                   " \R"                  R.                  5       " S S\5      5       5       rg)z#Command for updating interconnects.    )base_classes)client)base)flags)labels_utilzThe location for the interconnect. The locations can be listed by using the `{parent_command} locations list` command to find the appropriate location to use when creating an interconnect.c                    [         R                  " 5       U l        U R                  R                  USS9  UR	                  SSS9  [         R
                  " U5        [         R                  " U5        [         R                  " U5        U(       a  [        R                  " U5        U(       a:  [        R                  " [        SS9U l        U R                  R                  U5        gg)	z%Shared arguments for update commands.update)operation_typez--descriptionz6An optional, textual description for the interconnect.)helpF)requiredN)r   InterconnectArgumentINTERCONNECT_ARGAddArgumentadd_argumentAddAdminEnabledForUpdateAddNocContactEmailAddRequestedLinkCountForUpdater   AddUpdateLabelsFlagslocation_flags,InterconnectLocationArgumentForOtherResource_LOCATION_FLAG_MSGLOCATION_ARG)clsparsersupport_labelssupport_effective_locations       +lib/surface/compute/interconnects/update.py_ArgsCommonr       s     335#""6("CC     (6"&&v.$$V,CC	0    (	      c                   J    \ rS rSrSrSrSrSr\S 5       r	S r
S
S jrS rS	rg)UpdateGA7   Update a Compute Engine interconnect.

*{command}* is used to update interconnects. An interconnect represents a
single specific connection between Google and the customer.
NFc                 D    [        U UU R                  U R                  S9  g )N)r   r   )r   _support_labels_support_effective_location)r   r   s     r   ArgsUpdateGA.ArgsD   s"    **#&#B#B	r   c                     g)Nzcompute.interconnects )selfs    r   
CollectionUpdateGA.CollectionM   s    "r   c                 j   [         R                  " U R                  5       5      nU R                  R	                  XR
                  5      n[        R                  " XCR                  S9nS nS nU(       a  [        R                  R                  U5      nUR                  5       (       aq  UR                  5       n	UR                  UR                  R                  R                  R                  U	R                   5      R#                  5       nUb  U	R$                  nS n
U R&                  (       aK  UR)                  S5      (       a5  U R*                  R	                  XR
                  5      nUR-                  5       n
UR/                  UR0                  S UR2                  S UR4                  UR6                  U
UUS9	$ )N)compute_clientlocation)	descriptioninterconnect_typerequested_link_count	link_typeadmin_enablednoc_contact_emailr0   labelslabel_fingerprint)r   ComputeApiHolderReleaseTrackr   ResolveAsResource	resourcesr   Interconnectr   DiffFromUpdateArgsMayHaveUpdatesDescribeApplymessagesLabelsValuer7   	GetOrNonelabelFingerprintr&   IsSpecifiedr   SelfLinkPatchr1   r3   r5   r6   )r+   argsr   holderrefinterconnectr7   r8   labels_diffold_interconnectr0   location_refs               r   _DoRunUpdateGA._DoRunP   sp   **4+<+<+>?F



1
1$8H8H
IC&&s==ILF$$33D9k		#	#	%	%'002""MM""//;;##%%.Y[ 	 .??
H''D,<,<Z,H,H&&88?O?OPl&&(h$$!66((00+  
 
r   c                 6    U R                  XR                  S9  g )N)r   )rQ   r%   )r+   rJ   s     r   RunUpdateGA.Runq   s    KK%9%9K:r   r*   )F)__name__
__module____qualname____firstlineno____doc__r   r&   r%   classmethodr'   r,   rQ   rT   __static_attributes__r*   r   r   r!   r!   7   s<      %/ #B;r   r!   c                        \ rS rSrSrSrSrSrg)
UpdateBetau   r#   FTr*   N)rV   rW   rX   rY   rZ   r&   r%   r\   r*   r   r   r^   r^   u   s    
 !&/r   r^   c                       \ rS rSrSrSrSrg)UpdateAlpha   r#   Tr*   N)rV   rW   rX   rY   rZ   r&   r\   r*   r   r   ra   ra      s    
 !%r   ra   N)FF)rZ   googlecloudsdk.api_lib.computer   ,googlecloudsdk.api_lib.compute.interconnectsr   googlecloudsdk.callioper   0googlecloudsdk.command_lib.compute.interconnectsr   :googlecloudsdk.command_lib.compute.interconnects.locationsr   $googlecloudsdk.command_lib.util.argsr   r   r   UniverseCompatibleReleaseTracksr:   GAUpdateCommandr!   BETAr^   ALPHAra   r*   r   r   <module>ro      s    * 8 ? ( B ^ <E  CH). D%%(()9;t!! 9; * 9;x D%%**+  ,  D%%++,%* % - %r   