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

/**
 * Describes the parameters for using a user's KeyVault certificate for
 * securing custom domain.
 *
 */
class KeyVaultCertificateSourceParameters {
  /**
   * Create a KeyVaultCertificateSourceParameters.
   * @property {string} subscriptionId Subscription Id of the user's Key Vault
   * containing the SSL certificate
   * @property {string} resourceGroupName Resource group of the user's Key
   * Vault containing the SSL certificate
   * @property {string} vaultName The name of the user's Key Vault containing
   * the SSL certificate
   * @property {string} secretName The name of Key Vault Secret (representing
   * the full certificate PFX) in Key Vault.
   * @property {string} secretVersion The version(GUID) of Key Vault Secret in
   * Key Vault.
   */
  constructor() {
  }

  /**
   * Defines the metadata of KeyVaultCertificateSourceParameters
   *
   * @returns {object} metadata of KeyVaultCertificateSourceParameters
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'KeyVaultCertificateSourceParameters',
      type: {
        name: 'Composite',
        className: 'KeyVaultCertificateSourceParameters',
        modelProperties: {
          odatatype: {
            required: true,
            isConstant: true,
            serializedName: '@odata\\.type',
            defaultValue: '#Microsoft.Azure.Cdn.Models.KeyVaultCertificateSourceParameters',
            type: {
              name: 'String'
            }
          },
          subscriptionId: {
            required: true,
            serializedName: 'subscriptionId',
            type: {
              name: 'String'
            }
          },
          resourceGroupName: {
            required: true,
            serializedName: 'resourceGroupName',
            type: {
              name: 'String'
            }
          },
          vaultName: {
            required: true,
            serializedName: 'vaultName',
            type: {
              name: 'String'
            }
          },
          secretName: {
            required: true,
            serializedName: 'secretName',
            type: {
              name: 'String'
            }
          },
          secretVersion: {
            required: true,
            serializedName: 'secretVersion',
            type: {
              name: 'String'
            }
          },
          updateRule: {
            required: true,
            isConstant: true,
            serializedName: 'updateRule',
            defaultValue: 'NoAction',
            type: {
              name: 'String'
            }
          },
          deleteRule: {
            required: true,
            isConstant: true,
            serializedName: 'deleteRule',
            defaultValue: 'NoAction',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = KeyVaultCertificateSourceParameters;
