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

/**
 * Configure your SQL virtual machine to be able to connect to the Azure Key
 * Vault service.
 *
 */
class KeyVaultCredentialSettings {
  /**
   * Create a KeyVaultCredentialSettings.
   * @property {boolean} [enable] Enable or disable key vault credential
   * setting.
   * @property {string} [credentialName] Credential name.
   * @property {string} [azureKeyVaultUrl] Azure Key Vault url.
   * @property {string} [servicePrincipalName] Service principal name to access
   * key vault.
   * @property {string} [servicePrincipalSecret] Service principal name secret
   * to access key vault.
   */
  constructor() {
  }

  /**
   * Defines the metadata of KeyVaultCredentialSettings
   *
   * @returns {object} metadata of KeyVaultCredentialSettings
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'KeyVaultCredentialSettings',
      type: {
        name: 'Composite',
        className: 'KeyVaultCredentialSettings',
        modelProperties: {
          enable: {
            required: false,
            serializedName: 'enable',
            type: {
              name: 'Boolean'
            }
          },
          credentialName: {
            required: false,
            serializedName: 'credentialName',
            type: {
              name: 'String'
            }
          },
          azureKeyVaultUrl: {
            required: false,
            serializedName: 'azureKeyVaultUrl',
            type: {
              name: 'String'
            }
          },
          servicePrincipalName: {
            required: false,
            serializedName: 'servicePrincipalName',
            type: {
              name: 'String'
            }
          },
          servicePrincipalSecret: {
            required: false,
            serializedName: 'servicePrincipalSecret',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = KeyVaultCredentialSettings;
