
    m                        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)z8Command for updating dedicated 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 dedicated 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       Alib/surface/compute/interconnects/attachments/dedicated/update.py_get_attachmentUpdate._get_attachment&   sr    **4+<+<+>?F55GG"88G H IN ((}}6 6    c                    [         R                  " 5       U l        U R                  R                  USS9  [         R                  " U5        [         R
                  " USS9  [         R                  " USU R                  5       S9  [         R                  " U5        [         R                  " U5        [         R                  " U5        [         R                  " U5        [         R                  " U5        g )Npatch)operation_typeTupdateF)requiredrelease_track)attachment_flagsInterconnectAttachmentArgumentr   AddArgumentAddDescriptionAddAdminEnabledAddBandwidthr   AddMtuAddStackTypeAddCandidateIpv6SubnetsAddCloudRouterIpv6InterfaceId AddCustomerRouterIpv6InterfaceId)clsparsers     r   ArgsUpdate.Args/   s     	779 ###//w/O##F+$$VD9!!c.>.>.@ F#!!&),,V4226:55f=r   c                 ,   U R                  U5      n[        R                  " U5      nUR                  UR                  U[        USS 5      [        USS 5      [        USS 5      [        USS 5      [        USS 5      [        USS 5      [        USS 5      S9	$ )	N	bandwidthmtu
stack_typecandidate_ipv6_subnetscloud_router_ipv6_interface_id!customer_router_ipv6_interface_idenable_multicast)	descriptionadmin_enabledr6   r7   r8   r9   r:   r;   multicast_enabled)r   r&   GetAdminEnabledFlagPatchr=   getattr)r   r   interconnect_attachmentr>   s       r   Run
Update.Run@   s    "2248$88>M"(($$#$T2D%&4t4&t-EtL'.2D(
 +25t+
 "$(:DA )  r    )__name__
__module____qualname____firstlineno____doc__r   INTERCONNECT_ARG
ROUTER_ARGr   classmethodr3   rD   __static_attributes__rF   r   r   r	   r	      s8     !%*6 > > r   r	   c                   <   ^  \ rS rSrSr\U 4S j5       rS rSrU =r	$ )
UpdateBetaT   r   c                    > [         TU ]  U5        [        R                  " U5        [        R
                  " U5        [        R                  " U5        g )N)superr3   r   AddUpdateLabelsFlagsr&   "AddCandidateCloudRouterIpv6Address%AddCandidateCustomerRouterIpv6Addressr1   r2   	__class__s     r   r3   UpdateBeta.Args^   s9    	GL$$V,77?::6Br   c                 L   [         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["        R$                  " U5      n	UR'                  UR(                  U	UU[+        USS 5      [+        USS 5      [+        USS 5      [+        USS 5      [+        USS 5      [+        USS 5      [+        USS 5      [+        US	S 5      [+        US
S 5      U R                  5       [,        R                  R.                  :H  S9$ )N)labelsr6   r7   r8   r9   r:   r;   r<   #candidate_cloud_router_ipv6_address&candidate_customer_router_ipv6_address)r=   r>   r\   label_fingerprintr6   r7   r8   r9   r:   r;   r?   r]   r^   supports_400g)r   r   r   r   r   DiffFromUpdateArgsMayHaveUpdatesDescriber   messagesr   LabelsValueApplyr\   	GetOrNonelabelFingerprintr&   r@   rA   r=   rB   r   ALPHA)
r   r   r   rC   r\   r_   labels_diffold_attachment
labels_clsr>   s
             r   rD   UpdateBeta.Rune   s   **4+<+<+>?F"2248F""11$7K!!##.779n==))@@LLj  
22 ! 44=IK 		*;;$88>M"(($$#+$T2D%&4t4&t-EtL'.2D(
 +25t+
 "$(:DA,37-
 07:D0
 '')T->->-D-DD- )  r   rF   )
rG   rH   rI   rJ   rK   rN   r3   rD   rO   __classcell__rY   s   @r   rQ   rQ   T   s(     C C' 'r   rQ   c                   6   ^  \ rS rSrSr\U 4S j5       rSrU =r$ )UpdateAlpha   r   c                 N   > [         TU ]  U5        [        R                  " USS9  g )NTr"   )rT   r3   r&   AddEnableMulticastrX   s     r   r3   UpdateAlpha.Args   s    	GL''t<r   rF   )	rG   rH   rI   rJ   rK   rN   r3   rO   ro   rp   s   @r   rr   rr      s     = =r   rr   N)rK   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	   BETArQ   rj   rr   rF   r   r   <module>r      s    ? 7 K ( E b < D%%(()6T 6 * 6r D%%**+6 6 , 6r D%%++,=* = - =r   