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

/**
 * Class representing a MetricsResultsItem.
 */
class MetricsResultsItem {
  /**
   * Create a MetricsResultsItem.
   * @member {string} id The specified ID for this metric.
   * @member {number} status The HTTP status code of this metric query.
   * @member {object} body The results of this metric query.
   * @member {object} [body.value]
   * @member {date} [body.value.start] Start time of the metric.
   * @member {date} [body.value.end] Start time of the metric.
   * @member {moment.duration} [body.value.interval] The interval used to
   * segment the metric data.
   * @member {array} [body.value.segments] Segmented metric data (if
   * segmented).
   */
  constructor() {
  }

  /**
   * Defines the metadata of MetricsResultsItem
   *
   * @returns {object} metadata of MetricsResultsItem
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'metricsResultsItem',
      type: {
        name: 'Composite',
        className: 'MetricsResultsItem',
        modelProperties: {
          id: {
            required: true,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          status: {
            required: true,
            serializedName: 'status',
            type: {
              name: 'Number'
            }
          },
          body: {
            required: true,
            serializedName: 'body',
            type: {
              name: 'Composite',
              className: 'MetricsResult'
            }
          }
        }
      }
    };
  }
}

module.exports = MetricsResultsItem;
