/*
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Licensed under the MIT License. See License.txt in the project root for
 * license information.
 *
 * Code generated by Microsoft (R) AutoRest Code Generator.
 * Changes may cause incorrect behavior and will be lost if the code is
 * regenerated.
 */

'use strict';

/**
 * BEK is bitlocker key.
 * KEK is encryption key for BEK
 * If the VM was encrypted then we will store follwing details :
 * 1. Secret(BEK) - Url + Backup Data + vaultId.
 * 2. Key(KEK) - Url + Backup Data + vaultId.
 * 3. EncryptionMechanism
 * BEK and KEK can potentiallty have different vault ids.
 *
 */
class KeyAndSecretDetails {
  /**
   * Create a KeyAndSecretDetails.
   * @member {object} [kekDetails] KEK is encryption key for BEK.
   * @member {string} [kekDetails.keyUrl] Key is KEK.
   * @member {string} [kekDetails.keyVaultId] Key Vault ID where this Key is
   * stored.
   * @member {string} [kekDetails.keyBackupData] KEK data.
   * @member {object} [bekDetails] BEK is bitlocker encrpytion key.
   * @member {string} [bekDetails.secretUrl] Secret is BEK.
   * @member {string} [bekDetails.secretVaultId] ID of the Key Vault where this
   * Secret is stored.
   * @member {string} [bekDetails.secretData] BEK data.
   * @member {string} [encryptionMechanism] Encryption mechanism: None/
   * SinglePass/ DoublePass
   */
  constructor() {
  }

  /**
   * Defines the metadata of KeyAndSecretDetails
   *
   * @returns {object} metadata of KeyAndSecretDetails
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'KeyAndSecretDetails',
      type: {
        name: 'Composite',
        className: 'KeyAndSecretDetails',
        modelProperties: {
          kekDetails: {
            required: false,
            serializedName: 'kekDetails',
            type: {
              name: 'Composite',
              className: 'KEKDetails'
            }
          },
          bekDetails: {
            required: false,
            serializedName: 'bekDetails',
            type: {
              name: 'Composite',
              className: 'BEKDetails'
            }
          },
          encryptionMechanism: {
            required: false,
            serializedName: 'encryptionMechanism',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = KeyAndSecretDetails;
