/*
 * 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';

/**
 * The encryption configuration for the account.
 *
 */
class EncryptionConfig {
  /**
   * Create a EncryptionConfig.
   * @property {string} type The type of encryption configuration being used.
   * Currently the only supported types are 'UserManaged' and 'ServiceManaged'.
   * Possible values include: 'UserManaged', 'ServiceManaged'
   * @property {object} [keyVaultMetaInfo] The Key Vault information for
   * connecting to user managed encryption keys.
   * @property {string} [keyVaultMetaInfo.keyVaultResourceId] The resource
   * identifier for the user managed Key Vault being used to encrypt.
   * @property {string} [keyVaultMetaInfo.encryptionKeyName] The name of the
   * user managed encryption key.
   * @property {string} [keyVaultMetaInfo.encryptionKeyVersion] The version of
   * the user managed encryption key.
   */
  constructor() {
  }

  /**
   * Defines the metadata of EncryptionConfig
   *
   * @returns {object} metadata of EncryptionConfig
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'EncryptionConfig',
      type: {
        name: 'Composite',
        className: 'EncryptionConfig',
        modelProperties: {
          type: {
            required: true,
            serializedName: 'type',
            type: {
              name: 'Enum',
              allowedValues: [ 'UserManaged', 'ServiceManaged' ]
            }
          },
          keyVaultMetaInfo: {
            required: false,
            serializedName: 'keyVaultMetaInfo',
            type: {
              name: 'Composite',
              className: 'KeyVaultMetaInfo'
            }
          }
        }
      }
    };
  }
}

module.exports = EncryptionConfig;
