
                         z    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
  G d dej                        Zy	)
zDestroy a version.    )absolute_import)division)unicode_literals)base)flagsc                   &    e Zd ZdZed        Zd Zy)Destroya)  Schedule a version to be destroyed.

  Schedules the given version for destruction in 24 hours.

  After that time period passes it is automatically destroyed. Once
  destroyed, the key material is removed but the version number can
  not be reused.

  Only versions which are Enabled or Disabled can be Scheduled
  for destruction.

  ## EXAMPLES

  The following command schedules version 9 of key `frodo` within
  keyring `fellowship` and location `us-east1` for destruction:

    $ {command} 9 --location=us-east1 --keyring=fellowship --key=frodo
  c                 0    t        j                  | d       y )Nz
to destroy)r   AddKeyVersionResourceArgument)parsers    (lib/surface/kms/keys/versions/destroy.pyArgszDestroy.Args.   s    	''=    c                     t        j                         }t        j                         }t        j                  |      }|j                  |j                               }|j                  }|j                  |      S )N)name)	cloudkms_baseGetClientInstanceGetMessagesModuler   ParseCryptoKeyVersionNameJCloudkmsProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsDestroyRequestRelativeName8projects_locations_keyRings_cryptoKeys_cryptoKeyVersionsr	   )selfargsclientmessagesversion_refreqckvs          r   RunzDestroy.Run2   sl    ,,.F..0H11$7K

]
]%%' ^ )C 
I
IC;;sr   N)__name__
__module____qualname____doc__staticmethodr   r     r   r   r	   r	      s     & > >
r   r	   N)r$   
__future__r   r   r   googlecloudsdk.api_lib.cloudkmsr   r   googlecloudsdk.calliopegooglecloudsdk.command_lib.kmsr   UpdateCommandr	   r&   r   r   <module>r,      s.     &  ' A ( 0"d   "r   