
    l                     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
  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)zBCommand for updating the MACsec key configuration of interconnect.    )absolute_import)division)unicode_literals)base_classes)client)base)
exceptions)flagsz        *{command}* is used to update a pre-shared key in MACsec configuration
        of interconnect.

        For an example, refer to the *EXAMPLES* section below.
        z        To update a pre-shared key in 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)	UpdateKey,   zUpdate pre-shared key in a Compute Engine interconnect MACsec configuration.

*{command}* is used to update pre-shared key in 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     6lib/surface/compute/interconnects/macsec/update_key.pyArgsUpdateKey.Args8   sH     557C$$VH$E	44V<	99&A    c                     g)Nzcompute.interconnects )selfs    r   
CollectionUpdateKey.Collection@   s    "r   c                   ^ [         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c4  [        R                  " SSR                  UR                  5       5      5      e [        U4S jUR                   5       5      nTR$                  Ul        UR)                  S S S S S S S S S S US9$ ! [          a1    [        R                  " SSR                  TR"                  5      5      ef = f)N)compute_clientzkey-namez.Interconnect '{}' does not have MACsec config.c              3   ^   >#    U  H"  oR                   TR                  :X  d  M  Uv   M$     g 7f)N)namekey_name).0keyargss     r   	<genexpr> UpdateKey.Run.<locals>.<genexpr>P   s$      -#T]]1J##-s   -	-zKey '{}' was not found.)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   r	   BadArgumentExceptionformatNamenextpreSharedKeysStopIterationr'   
start_time	startTimePatch)r    r*   holderrefinterconnectr7   preshared_keys    `     r   RunUpdateKey.RunC   s3   **4+<+<+>?F



1
1$8H8H
IC&&s==IL""$++F~++

:
A
A#((*
M 
 -- m #ooM!     ++
/66t}}E s   <D ;E r   )__name__
__module____qualname____firstlineno____doc__r   classmethodr   r!   rK   __static_attributes__r   r   r   r   r   ,   s-     B B##r   r   N)rQ   
__future__r   r   r   googlecloudsdk.api_lib.computer   ,googlecloudsdk.api_lib.compute.interconnectsr   googlecloudsdk.callioper   r	   0googlecloudsdk.command_lib.compute.interconnectsr
   DETAILED_HELPReleaseTracksr9   ALPHABETAGAUpdateCommandr   detailed_helpr   r   r   <module>r`      s    I &  ' 7 ? ( . B" T..33T5F5F5I5I7"" 77t (	 r   