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

/**
 * A metric result.
 *
 */
class MetricsResult {
  /**
   * Create a MetricsResult.
   * @member {object} [value]
   * @member {date} [value.start] Start time of the metric.
   * @member {date} [value.end] Start time of the metric.
   * @member {moment.duration} [value.interval] The interval used to segment
   * the metric data.
   * @member {array} [value.segments] Segmented metric data (if segmented).
   */
  constructor() {
  }

  /**
   * Defines the metadata of MetricsResult
   *
   * @returns {object} metadata of MetricsResult
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'metricsResult',
      type: {
        name: 'Composite',
        className: 'MetricsResult',
        modelProperties: {
          value: {
            required: false,
            serializedName: 'value',
            type: {
              name: 'Composite',
              additionalProperties: {
                type: {
                  name: 'Dictionary',
                  value: {
                      required: false,
                      serializedName: 'ObjectElementType',
                      type: {
                        name: 'Object'
                      }
                  }
                }
              },
              className: 'MetricsResultInfo'
            }
          }
        }
      }
    };
  }
}

module.exports = MetricsResult;
