
                         D   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
  SSKJr  S	S
S.r\
R                  " \
R                  R                   \
R                  R"                  \
R                  R$                  5       " S S\
R&                  5      5       r\\l        g)z>Command for updating the MACsec configuration of interconnect.    )absolute_import)division)unicode_literals)base_classes)client)base)flagsz        *{command}* is used to add a pre-shared key to MACsec configuration of
        interconnect.

        For an example, refer to the *EXAMPLES* section below.
        z        To add a pre-shared key to MACsec configuration, run:

          $ {command} example-interconnect --key-name=default-key --start-time=2021-02-01T12:12:12Z
        )DESCRIPTIONEXAMPLESc                   8    \ rS rSrSrSr\S 5       rS rS r	Sr
g)AddKey-   zAdd pre-shared key to a Compute Engine interconnect MACsec configuration.

*{command}* is used to add pre-shared key to MACsec configuration of
interconnect.
Nc                     [         R                  " 5       U l        U R                  R                  USS9  [         R                  " U5        [         R
                  " U5        g )Nupdate)operation_type)r	   InterconnectArgumentINTERCONNECT_ARGAddArgument*AddMacsecPreSharedKeyNameForAddOrUpdateKey/AddMacsecPreSharedKeyStartTimeForAddOrUpdateKey)clsparsers     3lib/surface/compute/interconnects/macsec/add_key.pyArgsAddKey.Args9   sH     557C$$VH$E	44V<	99&A    c                     g)Nzcompute.interconnects )selfs    r   
CollectionAddKey.CollectionA   s    "r   c                 r  ^ [         R                  " U R                  5       5      nU R                  R	                  TUR
                  5      n[        R                  " X2R                  S9nUR                  5       R                  nUc$  UR                  R                  R                  5       n[        U4S jUR                   5       5      (       aQ  UR                  R                  UR                  R                  R                  TR                   TR"                  S95        UR%                  S S S S S S S S S S US9$ )N)compute_clientc              3   T   >#    U  H  oR                   TR                  :g  v   M     g 7f)N)namekey_name).0keyargss     r   	<genexpr>AddKey.Run.<locals>.<genexpr>M   s     
E0D88t}}$0Ds   %()r%   	startTime)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Describer7   messagesInterconnectMacsecallpreSharedKeysappendInterconnectMacsecPreSharedKeyr&   
start_timePatch)r   r)   holderrefinterconnectr7   s    `    r   Run
AddKey.RunD   s   **4+<+<+>?F



1
1$8H8H
IC&&s==IL""$++F~}}%%88:f

E0D0D
EEE!!
--
 
 
?
?==DOO @ => !   r   r   )__name__
__module____qualname____firstlineno____doc__r   classmethodr   r    rI   __static_attributes__r   r   r   r   r   -   s-     B B#r   r   N)rO   
__future__r   r   r   googlecloudsdk.api_lib.computer   ,googlecloudsdk.api_lib.compute.interconnectsr   googlecloudsdk.callioper   0googlecloudsdk.command_lib.compute.interconnectsr	   DETAILED_HELPReleaseTracksr9   ALPHABETAGAUpdateCommandr   detailed_helpr   r   r   <module>r^      s    E &  ' 7 ? ( B		& T..33T5F5F5I5I-T --` % r   