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

const models = require('./index');

/**
 * Azure Key Vault secret reference.
 *
 * @extends models['SecretBase']
 */
class AzureKeyVaultSecretReference extends models['SecretBase'] {
  /**
   * Create a AzureKeyVaultSecretReference.
   * @member {object} store The Azure Key Vault linked service reference.
   * @member {string} [store.referenceName] Reference LinkedService name.
   * @member {object} [store.parameters] Arguments for LinkedService.
   * @member {object} secretName The name of the secret in Azure Key Vault.
   * Type: string (or Expression with resultType string).
   * @member {object} [secretVersion] The version of the secret in Azure Key
   * Vault. The default value is the latest version of the secret. Type: string
   * (or Expression with resultType string).
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of AzureKeyVaultSecretReference
   *
   * @returns {object} metadata of AzureKeyVaultSecretReference
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'AzureKeyVaultSecret',
      type: {
        name: 'Composite',
        polymorphicDiscriminator: {
          serializedName: 'type',
          clientName: 'type'
        },
        uberParent: 'SecretBase',
        className: 'AzureKeyVaultSecretReference',
        modelProperties: {
          type: {
            required: true,
            serializedName: 'type',
            isPolymorphicDiscriminator: true,
            type: {
              name: 'String'
            }
          },
          store: {
            required: true,
            serializedName: 'store',
            defaultValue: {},
            type: {
              name: 'Composite',
              className: 'LinkedServiceReference'
            }
          },
          secretName: {
            required: true,
            serializedName: 'secretName',
            type: {
              name: 'Object'
            }
          },
          secretVersion: {
            required: false,
            serializedName: 'secretVersion',
            type: {
              name: 'Object'
            }
          }
        }
      }
    };
  }
}

module.exports = AzureKeyVaultSecretReference;
