
                            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 ej                   ej                  ej                   j"                         G d dej$                                      Zej                   ej                  ej                   j(                         G d	 d
e                    Zej                   ej                  ej                   j,                         G d de                    Zy)z#Command for updating interconnects.    )base_classes)client)base)flags)labels_utilc                   *    e Zd ZdZdZed        Zd Zy)Update  Update a Compute Engine partner interconnect attachment.

  *{command}* is used to update partner interconnect attachments. A partner
  interconnect attachment binds the underlying connectivity of a provider's
  Interconnect to a path into and out of the customer's cloud network.
  Fc                    t        j                         | _        | j                  j                  |d       t        j                  |       t        j
                  |d       t        j                  |       t        j                  |       y )Npatch)operation_typeT)update)attachment_flagsInterconnectAttachmentArgumentINTERCONNECT_ATTACHMENT_ARGAddArgumentAddDescriptionAddAdminEnabledAddMtuAddStackType)clsparsers     ?lib/surface/compute/interconnects/attachments/partner/update.pyArgszUpdate.Args$   sk     	779 ###//w/O##F+$$VD9F#!!&)    c                 @   t        j                  | j                               }| j                  j	                  ||j
                  t        j                  |j                              }t        j                  ||j                        }t        j                  |      }d }d }| j                  rt        j                  j                  |      }|j!                         rs|j#                         }	|j                  j$                  j                  j&                  }
|j)                  |
|	j*                        j-                         }||	j.                  }|j1                  |j2                  |||t5        |dd       t5        |dd       t5        |dd       t5        |dd             S )	N)scope_lister)compute_client)labelsmtu
stack_type#candidate_cloud_router_ipv6_address&candidate_customer_router_ipv6_address)descriptionadmin_enabledr   label_fingerprintr    r!   r"   r#   )r   ComputeApiHolderReleaseTrackr   ResolveAsResource	resourcescompute_flagsGetDefaultScopeListerr   InterconnectAttachmentr   GetAdminEnabledFlag_support_labelr   DiffFromUpdateArgsMayHaveUpdatesDescribemessagesLabelsValueApplyr   	GetOrNonelabelFingerprintPatchr$   getattr)selfargsholderattachment_refinterconnect_attachmentr%   r   r&   labels_diffold_attachment
labels_clss              r   Runz
Update.Run.   s   **4+<+<+>?F55GG"88G H IN
 %;;v}}6$88>MF$$33D9k		#	#	%099;]]++BBNN
""~44 # 

)+ 	 ,==
"(($$#+D%&4t4,37-
 07:D0
 )  r   N)__name__
__module____qualname____doc__r/   classmethodr   rC    r   r   r	   r	      s%     .* *%r   r	   c                   0     e Zd ZdZdZe fd       Z xZS )
UpdateBetar
   Tc                     t         t        |   |       t        j                  |       t        j                  |       t        j                  |       y N)superrK   r   r   AddUpdateLabelsFlagsr   "AddCandidateCloudRouterIpv6Address%AddCandidateCustomerRouterIpv6Addressr   r   	__class__s     r   r   zUpdateBeta.Argsb   s<    	*c'$$V,77?::6Br   rD   rE   rF   rG   r/   rH   r   __classcell__rS   s   @r   rK   rK   V   s#     .C Cr   rK   c                   0     e Zd ZdZdZe fd       Z xZS )UpdateAlphar
   Tc                 ,    t         t        |   |       y rM   )rN   rX   r   rR   s     r   r   zUpdateAlpha.Argsv   s    	+s (r   rT   rV   s   @r   rX   rX   j   s!     .) )r   rX   N)rG   googlecloudsdk.api_lib.computer   8googlecloudsdk.api_lib.compute.interconnects.attachmentsr   googlecloudsdk.callioper   "googlecloudsdk.command_lib.computer   r+   <googlecloudsdk.command_lib.compute.interconnects.attachmentsr   $googlecloudsdk.command_lib.util.argsr   UniverseCompatibleReleaseTracksr(   GAUpdateCommandr	   BETArK   ALPHArX   rI   r   r   <module>rf      s    * 7 K ( E b < D%%(()8T 8 * 8v D%%**+C C , C$ D%%++,)* ) - )r   