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

/**
 * Auto-scale settings for the cluster. The system automatically scales the
 * cluster up and down (within minimumNodeCount and maximumNodeCount) based on
 * the number of queued and running jobs assigned to the cluster.
 *
 */
class AutoScaleSettings {
  /**
   * Create a AutoScaleSettings.
   * @member {number} minimumNodeCount Minimum node count. The minimum number
   * of compute nodes the Batch AI service will try to allocate for the
   * cluster. Note, the actual number of nodes can be less than the specified
   * value if the subscription has not enough quota to fulfill the request.
   * @member {number} maximumNodeCount Maximum node count. The maximum number
   * of compute nodes the cluster can have.
   * @member {number} [initialNodeCount] Initial node count. The number of
   * compute nodes to allocate on cluster creation. Note that this value is
   * used only during cluster creation. Default: 0. Default value: 0 .
   */
  constructor() {
  }

  /**
   * Defines the metadata of AutoScaleSettings
   *
   * @returns {object} metadata of AutoScaleSettings
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'AutoScaleSettings',
      type: {
        name: 'Composite',
        className: 'AutoScaleSettings',
        modelProperties: {
          minimumNodeCount: {
            required: true,
            serializedName: 'minimumNodeCount',
            type: {
              name: 'Number'
            }
          },
          maximumNodeCount: {
            required: true,
            serializedName: 'maximumNodeCount',
            type: {
              name: 'Number'
            }
          },
          initialNodeCount: {
            required: false,
            serializedName: 'initialNodeCount',
            defaultValue: 0,
            type: {
              name: 'Number'
            }
          }
        }
      }
    };
  }
}

module.exports = AutoScaleSettings;
