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

/**
 * AutoScale configuration properties.
 *
 */
class AutoScaleConfiguration {
  /**
   * Create a AutoScaleConfiguration.
   * @member {string} [status] If auto-scale is enabled for all services. Each
   * service can turn it off individually. Possible values include: 'Enabled',
   * 'Disabled'. Default value: 'Disabled' .
   * @member {number} [minReplicas] The minimum number of replicas for each
   * service. Default value: 1 .
   * @member {number} [maxReplicas] The maximum number of replicas for each
   * service. Default value: 100 .
   * @member {number} [targetUtilization] The target utilization.
   * @member {number} [refreshPeriodInSeconds] Refresh period in seconds.
   */
  constructor() {
  }

  /**
   * Defines the metadata of AutoScaleConfiguration
   *
   * @returns {object} metadata of AutoScaleConfiguration
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'AutoScaleConfiguration',
      type: {
        name: 'Composite',
        className: 'AutoScaleConfiguration',
        modelProperties: {
          status: {
            required: false,
            serializedName: 'status',
            defaultValue: 'Disabled',
            type: {
              name: 'String'
            }
          },
          minReplicas: {
            required: false,
            serializedName: 'minReplicas',
            defaultValue: 1,
            constraints: {
              InclusiveMinimum: 1
            },
            type: {
              name: 'Number'
            }
          },
          maxReplicas: {
            required: false,
            serializedName: 'maxReplicas',
            defaultValue: 100,
            constraints: {
              InclusiveMinimum: 1
            },
            type: {
              name: 'Number'
            }
          },
          targetUtilization: {
            required: false,
            serializedName: 'targetUtilization',
            type: {
              name: 'Number'
            }
          },
          refreshPeriodInSeconds: {
            required: false,
            serializedName: 'refreshPeriodInSeconds',
            type: {
              name: 'Number'
            }
          }
        }
      }
    };
  }
}

module.exports = AutoScaleConfiguration;
