
    @                        d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddl	m
Z
 ddlmZ dd	lmZ dd
Ze
j                    e
j"                  e
j$                  j&                         G d de
j(                                      Ze
j                    e
j"                  e
j$                  j,                  e
j$                  j.                         G d de                    Zy)z#Command for updating interconnects.    )absolute_import)division)unicode_literals)base_classes)client)base)flags)labels_utilc                 D   t        j                         | _        | j                  j                  |d       |j	                  dd       t        j
                  |       t        j                  |       t        j                  |       |rt        j                  |       yy)z%Shared arguments for update commands.update)operation_typez--descriptionz6An optional, textual description for the interconnect.)helpN)
r	   InterconnectArgumentINTERCONNECT_ARGAddArgumentadd_argumentAddAdminEnabledForUpdateAddNocContactEmailAddRequestedLinkCountForUpdater
   AddUpdateLabelsFlags)clsparsersupport_labelss      +lib/surface/compute/interconnects/update.py_ArgsCommonr      s    335#""6("CC  E   (6"&&v.$$V,     c                   8    e Zd ZdZdZed        Zd ZddZd Z	y)UpdateUpdate a Compute Engine interconnect.

  *{command}* is used to update interconnects. An interconnect represents a
  single specific connection between Google and the customer.
  Nc                     t        | |       y Nr   r   r   s     r   ArgszUpdate.Args6   s    Vr   c                      y)Nzcompute.interconnects )selfs    r   
CollectionzUpdate.Collection:   s    "r   c                    t        j                  | j                               }| j                  j	                  ||j
                        }t        j                  ||j                        }d }d }|rt        j                  j                  |      }|j                         rp|j                         }	|j                  |j                  j                  j                  j                  |	j                         j#                         }||	j$                  }|j'                  |j(                  d |j*                  d |j,                  |j.                  d ||	      S )N)compute_client)	descriptioninterconnect_typerequested_link_count	link_typeadmin_enablednoc_contact_emaillocationlabelslabel_fingerprint)r   ComputeApiHolderReleaseTrackr   ResolveAsResource	resourcesr   Interconnectr
   DiffFromUpdateArgsMayHaveUpdatesDescribeApplymessagesLabelsValuer2   	GetOrNonelabelFingerprintPatchr+   r-   r/   r0   )
r'   argsr   holderrefinterconnectr2   r3   labels_diffold_interconnects
             r   _DoRunzUpdate._DoRun=   s)   **4+<+<+>?F



1
1$8H8H
IC&&s6==ILF$$33D9k		#	#	%'002""MM""//;;##%%.Y[ 	 .??
$$!66((00+  
 
r   c                 &    | j                  |       y r!   rI   r'   rC   s     r   Runz
Update.RunZ   s    KKr   F)
__name__
__module____qualname____doc__r   classmethodr$   r(   rI   rM   r&   r   r   r   r   ,   s0    
  #:r   r   c                   &    e Zd ZdZed        Zd Zy)UpdateLabelsr   c                      t        | |d       y NT)r   r"   r#   s     r   r$   zUpdateLabels.Argsg   s    VD1r   c                 *    | j                  |d       y rW   rK   rL   s     r   rM   zUpdateLabels.Runk   s    KKTK*r   N)rO   rP   rQ   rR   rS   r$   rM   r&   r   r   rU   rU   ^   s      2 2+r   rU   NrN   )rR   
__future__r   r   r   googlecloudsdk.api_lib.computer   ,googlecloudsdk.api_lib.compute.interconnectsr   googlecloudsdk.callioper   0googlecloudsdk.command_lib.compute.interconnectsr	   $googlecloudsdk.command_lib.util.argsr
   r   UniverseCompatibleReleaseTracksr5   GAUpdateCommandr   ALPHABETArU   r&   r   r   <module>re      s    * '  ' 7 ? ( B <- D%%(()-T - * -` D%%++T->->-C-CD+6 + E +r   