
                         D   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
dZ e
j                  e
j                  j                   e
j                  j"                  e
j                  j$                         G d de
j&                               Zee_        y)z>Command for updating the MACsec configuration of interconnect.    )absolute_import)division)unicode_literals)base_classes)client)base)flagsz        *{command}* is used to update MACsec configuration of interconnect. An
        interconnect represents a single specific connection between Google and
        the customer.

        For an example, refer to the *EXAMPLES* section below.
        zp        To enable MACsec on an interconnect, run:

          $ {command} example-interconnect --enabled
        )DESCRIPTIONEXAMPLESc                   0    e Zd ZdZdZed        Zd Zd Zy)UpdatezUpdate a Compute Engine interconnect MACsec configuration.

  *{command}* is used to update MACsec configuration of interconnect. An
  interconnect represents a single specific connection between Google and the
  customer.
  Nc                     t        j                         | _        | j                  j                  |d       t        j                  |       t        j
                  |       y )Nupdate)operation_type)r	   InterconnectArgumentINTERCONNECT_ARGAddArgumentAddMacsecEnabledForUpdateAddFailOpenForUpdate)clsparsers     2lib/surface/compute/interconnects/macsec/update.pyArgszUpdate.Args;   sH     557C$$VH$E	##F+	v&    c                      y)Nzcompute.interconnects )selfs    r   
CollectionzUpdate.CollectionC   s    "r   c                    t        j                  | j                               }| j                  j	                  ||j
                        }t        j                  ||j                        }d }|j                  +|j                         j                  }|j                  |_        |j                  d d d d d d d d d |j                  |      S )N)compute_client)descriptioninterconnect_typerequested_link_count	link_typeadmin_enablednoc_contact_emaillocationlabelslabel_fingerprintmacsec_enabledmacsec)r   ComputeApiHolderReleaseTrackr   ResolveAsResource	resourcesr   Interconnect	fail_openDescriber+   failOpenPatchenabled)r   argsholderrefinterconnectr+   s         r   Runz
Update.RunF   s    **4+<+<+>?F



1
1$8H8H
IC&&s6==ILF~~!$$&--ffo!||   r   )	__name__
__module____qualname____doc__r   classmethodr   r   r:   r   r   r   r   r   .   s+     ' '#r   r   N)r>   
__future__r   r   r   googlecloudsdk.api_lib.computer   ,googlecloudsdk.api_lib.compute.interconnectsr   googlecloudsdk.callioper   0googlecloudsdk.command_lib.compute.interconnectsr	   DETAILED_HELPReleaseTracksr-   ALPHABETAGAUpdateCommandr   detailed_helpr   r   r   <module>rL      s    E &  ' 7 ? ( B		( T..33T5F5F5I5I*T **Z % r   