ó
    €Ï[  ã                   ó’   • 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
\R                  5      rg)z$Update a rotation schedule on a key.é    )Úabsolute_import)Údivision)Úunicode_literals)Úbase)Ú
exceptions)Úflags)Úresource_argsc                   ó.   • \ rS rSrSr\S 5       rS rSrg)ÚSetRotationScheduleé   a‹  Update the rotation schedule for a key.

Updates the rotation schedule for the given key. The schedule
automatically creates a new primary version for the key
according to the `--next-rotation-time` and `--rotation-period` flags.

The flag `--next-rotation-time` must be in ISO or RFC3339 format,
and `--rotation-period` must be in the form INTEGER[UNIT], where units
can be one of seconds (s), minutes (m), hours (h) or days (d).

Key rotations performed manually via `update-primary-version` and the
version `create` do not affect the stored `--next-rotation-time`.

## EXAMPLES

The following command sets a 30 day rotation period for the key
named `frodo` within the keyring `fellowship` and location `global`
starting at the specified time:

  $ {command} frodo \
      --location=global \
      --keyring=fellowship \
      --rotation-period=30d \
      --next-rotation-time=2017-10-12T12:34:56.1234Z
c                 óŒ   • [         R                  " U SS5        [        R                  " U 5        [        R                  " U 5        g )NTÚkey)r	   ÚAddKmsKeyResourceArgForKMSr   ÚAddRotationPeriodFlagÚAddNextRotationTimeFlag)Úparsers    Ú-lib/surface/kms/keys/set_rotation_schedule.pyÚArgsÚSetRotationSchedule.Args7   s0   € ä×,Ò,¨V°T¸5ÔAÜ	×Ò Ô'Ü	×!Ò! &Õ)ó    c                 ór  • [         R                  " 5       n[         R                  " 5       n[        R                  " U5      nUR                  UR                  5       UR                  5       S9n[        R                  " XR                  5        [        R                  " XR                  5        / nUR                  b  UR                  S5        UR                  b  UR                  S5        U(       d  [        R                  " S5      eSR!                  U5      Ul        UR$                  R'                  U5      $ )N)ÚnameÚ	cryptoKeyÚrotationPeriodÚnextRotationTimezLAt least one of --next-rotation-time or --rotation-period must be specified.Ú,)Úcloudkms_baseÚGetClientInstanceÚGetMessagesModuler   ÚParseCryptoKeyNameÚ7CloudkmsProjectsLocationsKeyRingsCryptoKeysPatchRequestÚRelativeNameÚ	CryptoKeyÚSetNextRotationTimer   ÚSetRotationPeriodÚrotation_periodÚappendÚnext_rotation_timer   ÚArgumentErrorÚjoinÚ
updateMaskÚ&projects_locations_keyRings_cryptoKeysÚPatch)ÚselfÚargsÚclientÚmessagesÚcrypto_key_refÚreqÚfields_to_updates          r   ÚRunÚSetRotationSchedule.Run=   s  € Ü×,Ò,Ó.€FÜ×.Ò.Ó0€Hä×-Ò-¨dÓ3€NØ
×
JÑ
JØ×(Ñ(Ó*Ø×$Ñ$Ó&ð Kð (€Cô 
×Ò˜d§M¡MÔ2Ü	×Ò˜D§-¡-Ô0àÐØ×ÑÑ'Ø×ÑÐ.Ô/Ø×ÑÑ*Ø×ÑÐ0Ô1æÜ×$Ò$ðóð ð —X‘XÐ.Ó/€C„Nà×8Ñ8×>Ñ>¸sÓCÐCr   © N)	Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ústaticmethodr   r5   Ú__static_attributes__r7   r   r   r   r      s!   † ñð4 ñ*ó ð*õ
Dr   r   N)r<   Ú
__future__r   r   r   Úgooglecloudsdk.api_lib.cloudkmsr   r   Úgooglecloudsdk.calliopeÚgooglecloudsdk.command_lib.kmsr   r   r	   ÚUpdateCommandr   r7   r   r   Ú<module>rD      s6   ðñ +å &Ý Ý 'å AÝ (Ý 5Ý 0Ý 8ô9D˜$×,Ñ,õ 9Dr   