Ë
    €Ïæ  ã                   ó†   — 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  G d„ d	ej                  «      Zy
)z!Set the primary version of a key.é    )Úabsolute_import)Údivision)Úunicode_literals)Úbase)Úflags)Úresource_argsc                   ó&   — e Zd ZdZed„ «       Zd„ Zy)ÚSetPrimaryVersiona–  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                 ób   — t        j                  | dd«       t        j                  | dd¬«       y )NTÚkeyzto make primary)Úrequired)r   ÚAddKmsKeyResourceArgForKMSr   ÚAddCryptoKeyVersionFlag)Úparsers    ú+lib/surface/kms/keys/set_primary_version.pyÚArgszSetPrimaryVersion.Args)   s'   € ä×,Ñ,¨V°T¸5ÔAÜ	×!Ñ! &Ð*;ÀdÖKó    c                 óR  — t        j                  «       }t        j                  «       }t        j                  |«      }t        j
                  |«      }|j                  |j                  «       |j                  |j                  ¬«      ¬«      }|j                  j                  |«      S )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   ÚRunz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__Ú__doc__Ústaticmethodr   r*   © r   r   r
   r
      s"   „ ñð ñLó ðLór   r
   N)r.   Ú
__future__r   r   r   Úgooglecloudsdk.api_lib.cloudkmsr   r   Úgooglecloudsdk.calliopeÚgooglecloudsdk.command_lib.kmsr   r   ÚCommandr
   r0   r   r   Ú<module>r6      s/   ðñ (å &Ý Ý 'å AÝ (Ý 0Ý 8ô"˜Ÿ™õ "r   