# encoding: utf-8
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.

module Azure::RecoveryServicesBackup::Mgmt::V2019_06_15
  module Models
    #
    # BEK is bitlocker key.
    # KEK is encryption key for BEK
    # If the VM was encrypted then we will store following details :
    # 1. Secret(BEK) - Url + Backup Data + vaultId.
    # 2. Key(KEK) - Url + Backup Data + vaultId.
    # 3. EncryptionMechanism
    # BEK and KEK can potentially have different vault ids.
    #
    class KeyAndSecretDetails

      include MsRestAzure

      # @return [KEKDetails] KEK is encryption key for BEK.
      attr_accessor :kek_details

      # @return [BEKDetails] BEK is bitlocker encryption key.
      attr_accessor :bek_details

      # @return [String] Encryption mechanism: None/ SinglePass/ DoublePass
      attr_accessor :encryption_mechanism


      #
      # Mapper for KeyAndSecretDetails class as Ruby Hash.
      # This will be used for serialization/deserialization.
      #
      def self.mapper()
        {
          client_side_validation: true,
          required: false,
          serialized_name: 'KeyAndSecretDetails',
          type: {
            name: 'Composite',
            class_name: 'KeyAndSecretDetails',
            model_properties: {
              kek_details: {
                client_side_validation: true,
                required: false,
                serialized_name: 'kekDetails',
                type: {
                  name: 'Composite',
                  class_name: 'KEKDetails'
                }
              },
              bek_details: {
                client_side_validation: true,
                required: false,
                serialized_name: 'bekDetails',
                type: {
                  name: 'Composite',
                  class_name: 'BEKDetails'
                }
              },
              encryption_mechanism: {
                client_side_validation: true,
                required: false,
                serialized_name: 'encryptionMechanism',
                type: {
                  name: 'String'
                }
              }
            }
          }
        }
      end
    end
  end
end
