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

/**
 * Represents metrics values.
 *
 */
class MetricValue {
  /**
   * Create a MetricValue.
   * @member {number} [_count] The number of values for the metric.
   * @member {number} [average] The average value of the metric.
   * @member {number} [maximum] The max value of the metric.
   * @member {number} [minimum] The min value of the metric.
   * @member {date} [timestamp] The metric timestamp (ISO-8601 format).
   * @member {number} [total] The total value of the metric.
   */
  constructor() {
  }

  /**
   * Defines the metadata of MetricValue
   *
   * @returns {object} metadata of MetricValue
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'MetricValue',
      type: {
        name: 'Composite',
        className: 'MetricValue',
        modelProperties: {
          _count: {
            required: false,
            readOnly: true,
            serializedName: '_count',
            type: {
              name: 'Number'
            }
          },
          average: {
            required: false,
            readOnly: true,
            serializedName: 'average',
            type: {
              name: 'Number'
            }
          },
          maximum: {
            required: false,
            readOnly: true,
            serializedName: 'maximum',
            type: {
              name: 'Number'
            }
          },
          minimum: {
            required: false,
            readOnly: true,
            serializedName: 'minimum',
            type: {
              name: 'Number'
            }
          },
          timestamp: {
            required: false,
            readOnly: true,
            serializedName: 'timestamp',
            type: {
              name: 'DateTime'
            }
          },
          total: {
            required: false,
            readOnly: true,
            serializedName: 'total',
            type: {
              name: 'Number'
            }
          }
        }
      }
    };
  }
}

module.exports = MetricValue;
