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

/**
 * Specifies a metric to load balance a service during runtime.
 *
 */
class ServiceLoadMetricDescription {
  /**
   * Create a ServiceLoadMetricDescription.
   * @property {string} name The name of the metric. If the service chooses to
   * report load during runtime, the load metric name should match the name
   * that is specified in Name exactly. Note that metric names are
   * case-sensitive.
   * @property {string} [weight] The service load metric relative weight,
   * compared to other metrics configured for this service, as a number.
   * Possible values include: 'Zero', 'Low', 'Medium', 'High'
   * @property {number} [primaryDefaultLoad] Used only for Stateful services.
   * The default amount of load, as a number, that this service creates for
   * this metric when it is a Primary replica.
   * @property {number} [secondaryDefaultLoad] Used only for Stateful services.
   * The default amount of load, as a number, that this service creates for
   * this metric when it is a Secondary replica.
   * @property {number} [defaultLoad] Used only for Stateless services. The
   * default amount of load, as a number, that this service creates for this
   * metric.
   */
  constructor() {
  }

  /**
   * Defines the metadata of ServiceLoadMetricDescription
   *
   * @returns {object} metadata of ServiceLoadMetricDescription
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ServiceLoadMetricDescription',
      type: {
        name: 'Composite',
        className: 'ServiceLoadMetricDescription',
        modelProperties: {
          name: {
            required: true,
            serializedName: 'Name',
            type: {
              name: 'String'
            }
          },
          weight: {
            required: false,
            serializedName: 'Weight',
            type: {
              name: 'String'
            }
          },
          primaryDefaultLoad: {
            required: false,
            serializedName: 'PrimaryDefaultLoad',
            type: {
              name: 'Number'
            }
          },
          secondaryDefaultLoad: {
            required: false,
            serializedName: 'SecondaryDefaultLoad',
            type: {
              name: 'Number'
            }
          },
          defaultLoad: {
            required: false,
            serializedName: 'DefaultLoad',
            type: {
              name: 'Number'
            }
          }
        }
      }
    };
  }
}

module.exports = ServiceLoadMetricDescription;
