ó
    €Ïæ  ã                   ó†   • 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	\R                  5      rg
)z!Set the primary version of a key.é    )Úabsolute_import)Údivision)Úunicode_literals)Úbase)Úflags)Úresource_argsc                   ó.   • \ rS rSrSr\S 5       rS rSrg)ÚSetPrimaryVersioné   aˆ  Set the primary version of a key.

Sets the specified version as the primary version of the given key.
The version is specified by its version number assigned on creation.

## EXAMPLES

The following command sets version 9 as the primary version of the
key `samwise` within keyring `fellowship` and location `global`:

  $ {command} samwise --version=9 --keyring=fellowship --location=global
c                 ó`   • [         R                  " U SS5        [        R                  " U SSS9  g )NTÚkeyzto make primary)Úrequired)r   ÚAddKmsKeyResourceArgForKMSr   ÚAddCryptoKeyVersionFlag)Úparsers    Ú+lib/surface/kms/keys/set_primary_version.pyÚArgsÚSetPrimaryVersion.Args)   s'   € ä×,Ò,¨V°T¸5ÔAÜ	×!Ò! &Ð*;ÀdÓKó    c                 óN  • [         R                  " 5       n[         R                  " 5       n[        R                  " U5      n[        R
                  " U5      nUR                  UR                  5       UR                  UR                  S9S9nUR                  R                  U5      $ )N)ÚcryptoKeyVersionId)ÚnameÚ$updateCryptoKeyPrimaryVersionRequest)Úcloudkms_baseÚGetClientInstanceÚGetMessagesModuler   ÚParseCryptoKeyVersionNameÚParseCryptoKeyNameÚFCloudkmsProjectsLocationsKeyRingsCryptoKeysUpdatePrimaryVersionRequestÚRelativeNameÚ$UpdateCryptoKeyPrimaryVersionRequestÚcryptoKeyVersionsIdÚ&projects_locations_keyRings_cryptoKeysÚUpdatePrimaryVersion)ÚselfÚargsÚclientÚmessagesÚversion_refÚkey_refÚreqs          r   ÚRunÚSetPrimaryVersion.Run.   sœ   € ä×,Ò,Ó.€FÜ×.Ò.Ó0€Hä×1Ò1°$Ó7€KÜ×&Ò& tÓ,€Gà
×
YÑ
YØ×!Ñ!Ó#à×9Ñ9Ø#.×#BÑ#Bð :ð Dð Zð F€Cð ×8Ñ8×MÑMØóð r   © N)	Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ústaticmethodr   r,   Ú__static_attributes__r.   r   r   r
   r
      s"   † ñð ñLó ðLõr   r
   N)r3   Ú
__future__r   r   r   Úgooglecloudsdk.api_lib.cloudkmsr   r   Úgooglecloudsdk.calliopeÚgooglecloudsdk.command_lib.kmsr   r   ÚCommandr
   r.   r   r   Ú<module>r;      s/   ðñ (å &Ý Ý 'å AÝ (Ý 0Ý 8ô"˜Ÿ™õ "r   