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

/**
 * @summary Scale settings for the pool
  *
 * Defines the desired size of the pool. This can either be 'fixedScale' where
 * the requested targetDedicatedNodes is specified, or 'autoScale' which
 * defines a formula which is periodically reevaluated. If this property is not
 * specified, the pool will have a fixed scale with 0 targetDedicatedNodes.
 *
 */
class ScaleSettings {
  /**
   * Create a ScaleSettings.
   * @property {object} [fixedScale] Fixed scale settings for the pool. This
   * property and autoScale are mutually exclusive and one of the properties
   * must be specified.
   * @property {moment.duration} [fixedScale.resizeTimeout] The default value
   * is 15 minutes. Timeout values use ISO 8601 format. For example, use PT10M
   * for 10 minutes. The minimum value is 5 minutes. If you specify a value
   * less than 5 minutes, the Batch service rejects the request with an error;
   * if you are calling the REST API directly, the HTTP status code is 400 (Bad
   * Request).
   * @property {number} [fixedScale.targetDedicatedNodes] At least one of
   * targetDedicatedNodes, targetLowPriorityNodes must be set.
   * @property {number} [fixedScale.targetLowPriorityNodes] At least one of
   * targetDedicatedNodes, targetLowPriorityNodes must be set.
   * @property {string} [fixedScale.nodeDeallocationOption] If omitted, the
   * default value is Requeue. Possible values include: 'Requeue', 'Terminate',
   * 'TaskCompletion', 'RetainedData'
   * @property {object} [autoScale] AutoScale settings for the pool. This
   * property and fixedScale are mutually exclusive and one of the properties
   * must be specified.
   * @property {string} [autoScale.formula]
   * @property {moment.duration} [autoScale.evaluationInterval] If omitted, the
   * default value is 15 minutes (PT15M).
   */
  constructor() {
  }

  /**
   * Defines the metadata of ScaleSettings
   *
   * @returns {object} metadata of ScaleSettings
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ScaleSettings',
      type: {
        name: 'Composite',
        className: 'ScaleSettings',
        modelProperties: {
          fixedScale: {
            required: false,
            serializedName: 'fixedScale',
            type: {
              name: 'Composite',
              className: 'FixedScaleSettings'
            }
          },
          autoScale: {
            required: false,
            serializedName: 'autoScale',
            type: {
              name: 'Composite',
              className: 'AutoScaleSettings'
            }
          }
        }
      }
    };
  }
}

module.exports = ScaleSettings;
