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

/**
 * Represents a database data masking policy.
 *
 * @extends models['ProxyResource']
 */
class DataMaskingPolicy extends models['ProxyResource'] {
  /**
   * Create a DataMaskingPolicy.
   * @property {string} dataMaskingState The state of the data masking policy.
   * Possible values include: 'Disabled', 'Enabled'
   * @property {string} [exemptPrincipals] The list of the exempt principals.
   * Specifies the semicolon-separated list of database users for which the
   * data masking policy does not apply. The specified users receive data
   * results without masking for all of the database queries.
   * @property {string} [applicationPrincipals] The list of the application
   * principals. This is a legacy parameter and is no longer used.
   * @property {string} [maskingLevel] The masking level. This is a legacy
   * parameter and is no longer used.
   * @property {string} [location] The location of the data masking policy.
   * @property {string} [kind] The kind of data masking policy. Metadata, used
   * for Azure portal.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of DataMaskingPolicy
   *
   * @returns {object} metadata of DataMaskingPolicy
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'DataMaskingPolicy',
      type: {
        name: 'Composite',
        className: 'DataMaskingPolicy',
        modelProperties: {
          id: {
            required: false,
            readOnly: true,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          name: {
            required: false,
            readOnly: true,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          type: {
            required: false,
            readOnly: true,
            serializedName: 'type',
            type: {
              name: 'String'
            }
          },
          dataMaskingState: {
            required: true,
            serializedName: 'properties.dataMaskingState',
            type: {
              name: 'Enum',
              allowedValues: [ 'Disabled', 'Enabled' ]
            }
          },
          exemptPrincipals: {
            required: false,
            serializedName: 'properties.exemptPrincipals',
            type: {
              name: 'String'
            }
          },
          applicationPrincipals: {
            required: false,
            readOnly: true,
            serializedName: 'properties.applicationPrincipals',
            type: {
              name: 'String'
            }
          },
          maskingLevel: {
            required: false,
            readOnly: true,
            serializedName: 'properties.maskingLevel',
            type: {
              name: 'String'
            }
          },
          location: {
            required: false,
            readOnly: true,
            serializedName: 'location',
            type: {
              name: 'String'
            }
          },
          kind: {
            required: false,
            readOnly: true,
            serializedName: 'kind',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = DataMaskingPolicy;
