
    p                        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  \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 L2 forwarding interconnect attachments.    )base_classes)client)base)flags)labels_utilc                   @    \ rS rSrSrSrSrSrS r\	S 5       r
S rSrg)Update     Update a Compute Engine L2 forwarding interconnect attachment.

*{command}* is used to update interconnect attachments. An interconnect
attachment is what binds the underlying connectivity of an interconnect to a
path into and out of the customer's cloud network.
Nc                    [         R                  " U R                  5       5      nU R                  R	                  UUR
                  [        R                  " UR                  5      S9n[        R                  " X2R                  S9$ )N)scope_lister)compute_client)
r   ComputeApiHolderReleaseTrackINTERCONNECT_ATTACHMENT_ARGResolveAsResource	resourcescompute_flagsGetDefaultScopeListerr   InterconnectAttachment)selfargsholderattachment_refs       Elib/surface/compute/interconnects/attachments/l2_forwarding/update.py_get_attachmentUpdate._get_attachment&   sr    **4+<+<+>?F55GG"88G H IN ((}}6 6    c                 p   [         R                  " 5       U l        U R                  R                  USS9  [         R                  " U5        [         R
                  " U5        [         R                  " USS9  [         R                  " U5        [         R                  " USS9  [         R                  " U5        g )Npatch)operation_typeF)required)
attachment_flagsInterconnectAttachmentArgumentr   AddArgumentAddDescriptionAddEnableAdminAddBandwidthAddMtuAddGeneveVniAddDefaultApplianceIpAddress)clsparsers     r   ArgsUpdate.Args/   s     	779 ###//w/O##F+##F+!!&59F#!!&5911&9r   c                 h   [         R                  " U R                  5       5      nU R                  U5      nS nS n[        R
                  R                  U5      nUR                  5       (       ap  UR                  5       nUR                  R                  R                  R                  nUR                  XR                  S9R                  5       nUb  UR                   nUR#                  UR$                  UR&                  UU[)        USS 5      [)        USS 5      [)        USS 5      [)        USS 5      S9$ )N)labels	bandwidthmtu
geneve_vnidefault_appliance_ip_address)descriptionadmin_enabledr1   label_fingerprintr2   r3   r4   r5   )r   r   r   r   r   DiffFromUpdateArgsMayHaveUpdatesDescriber   messagesr   LabelsValueApplyr1   	GetOrNonelabelFingerprintPatchr6   enable_admingetattr)	r   r   r   interconnect_attachmentr1   r8   labels_diffold_attachment
labels_clss	            r   Run
Update.Run<   s#   **4+<+<+>?F"2248F""11$7K!!##.779n==))@@LLj  
22 ! 44=IK 		*;;"(($$''+$T2D%&4t4%,0$&
 )  r    )__name__
__module____qualname____firstlineno____doc__r   INTERCONNECT_ARG
ROUTER_ARGr   classmethodr.   rI   __static_attributes__rK   r   r   r	   r	      s8     !%*6 
: 
:r   r	   c                   6   ^  \ rS rSrSr\U 4S j5       rSrU =r$ )
UpdateBetaY   r   c                 P   > [         TU ]  U5        [        R                  " U5        g N)superr.   r   AddUpdateLabelsFlagsr,   r-   	__class__s     r   r.   UpdateBeta.Argsc   s    	GL$$V,r   rK   	rL   rM   rN   rO   rP   rS   r.   rT   __classcell__r]   s   @r   rV   rV   Y   s     - -r   rV   c                   6   ^  \ rS rSrSr\U 4S j5       rSrU =r$ )UpdateAlphai   r   c                 $   > [         TU ]  U5        g rY   )rZ   r.   r\   s     r   r.   UpdateAlpha.Argss   s    	GLr   rK   r_   ra   s   @r   rc   rc   i   s      r   rc   N)rP   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   DefaultUniverseOnlyReleaseTracksr   GAUpdateCommandr	   BETArV   ALPHArc   rK   r   r   <module>rs      s    C 7 K ( E b < D%%(();T ; * ;| D%%**+- - , - D%%++,
* 
 - 
r   