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

/**
 * Describes the horizontal auto scaling mechanism that adds or removes
 * replicas (containers or container groups).
 *
 * @extends models['AutoScalingMechanism']
 */
class AddRemoveReplicaScalingMechanism extends models['AutoScalingMechanism'] {
  /**
   * Create a AddRemoveReplicaScalingMechanism.
   * @property {number} minCount Minimum number of containers (scale down won't
   * be performed below this number).
   * @property {number} maxCount Maximum number of containers (scale up won't
   * be performed above this number).
   * @property {number} scaleIncrement Each time auto scaling is performed,
   * this number of containers will be added or removed.
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of AddRemoveReplicaScalingMechanism
   *
   * @returns {object} metadata of AddRemoveReplicaScalingMechanism
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'AddRemoveReplica',
      type: {
        name: 'Composite',
        polymorphicDiscriminator: {
          serializedName: 'kind',
          clientName: 'kind'
        },
        uberParent: 'AutoScalingMechanism',
        className: 'AddRemoveReplicaScalingMechanism',
        modelProperties: {
          kind: {
            required: true,
            serializedName: 'kind',
            isPolymorphicDiscriminator: true,
            type: {
              name: 'String'
            }
          },
          minCount: {
            required: true,
            serializedName: 'minCount',
            type: {
              name: 'Number'
            }
          },
          maxCount: {
            required: true,
            serializedName: 'maxCount',
            type: {
              name: 'Number'
            }
          },
          scaleIncrement: {
            required: true,
            serializedName: 'scaleIncrement',
            type: {
              name: 'Number'
            }
          }
        }
      }
    };
  }
}

module.exports = AddRemoveReplicaScalingMechanism;
