/*
 * 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 how the scaling should be performed
 *
 */
class ScalingPolicyDescription {
  /**
   * Create a ScalingPolicyDescription.
   * @property {object} scalingTrigger Specifies the trigger associated with
   * this scaling policy
   * @property {string} [scalingTrigger.kind] Polymorphic Discriminator
   * @property {object} scalingMechanism Specifies the mechanism associated
   * with this scaling policy
   * @property {string} [scalingMechanism.kind] Polymorphic Discriminator
   */
  constructor() {
  }

  /**
   * Defines the metadata of ScalingPolicyDescription
   *
   * @returns {object} metadata of ScalingPolicyDescription
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ScalingPolicyDescription',
      type: {
        name: 'Composite',
        className: 'ScalingPolicyDescription',
        modelProperties: {
          scalingTrigger: {
            required: true,
            serializedName: 'ScalingTrigger',
            type: {
              name: 'Composite',
              polymorphicDiscriminator: {
                serializedName: 'Kind',
                clientName: 'kind'
              },
              uberParent: 'ScalingTriggerDescription',
              className: 'ScalingTriggerDescription'
            }
          },
          scalingMechanism: {
            required: true,
            serializedName: 'ScalingMechanism',
            type: {
              name: 'Composite',
              polymorphicDiscriminator: {
                serializedName: 'Kind',
                clientName: 'kind'
              },
              uberParent: 'ScalingMechanismDescription',
              className: 'ScalingMechanismDescription'
            }
          }
        }
      }
    };
  }
}

module.exports = ScalingPolicyDescription;
