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

/**
 * Base class for all types of ManagedRuleSet.
 *
 */
class ManagedRuleSet {
  /**
   * Create a ManagedRuleSet.
   * @member {number} [priority] Describes priority of the rule
   * @member {number} [version] defines version of the ruleset
   * @member {string} ruleSetType Polymorphic Discriminator
   */
  constructor() {
  }

  /**
   * Defines the metadata of ManagedRuleSet
   *
   * @returns {object} metadata of ManagedRuleSet
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'Unknown',
      type: {
        name: 'Composite',
        polymorphicDiscriminator: {
          serializedName: 'ruleSetType',
          clientName: 'ruleSetType'
        },
        uberParent: 'ManagedRuleSet',
        className: 'ManagedRuleSet',
        modelProperties: {
          priority: {
            required: false,
            serializedName: 'priority',
            type: {
              name: 'Number'
            }
          },
          version: {
            required: false,
            serializedName: 'version',
            type: {
              name: 'Number'
            }
          },
          ruleSetType: {
            required: true,
            serializedName: 'ruleSetType',
            isPolymorphicDiscriminator: true,
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = ManagedRuleSet;
