/
MetricSeriesData.cs
53 lines (47 loc) · 2.1 KB
/
MetricSeriesData.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// <auto-generated/>
#nullable disable
using System;
using System.Collections.Generic;
using System.Linq;
namespace Azure.AI.MetricsAdvisor.Models
{
/// <summary> The MetricDataItem. </summary>
public partial class MetricSeriesData
{
/// <summary> Initializes a new instance of MetricSeriesData. </summary>
/// <param name="definition"></param>
/// <param name="timestamps"> timestamps of the data related to this time series. </param>
/// <param name="metricValues"> values of the data related to this time series. </param>
/// <exception cref="ArgumentNullException"> <paramref name="definition"/>, <paramref name="timestamps"/>, or <paramref name="metricValues"/> is null. </exception>
internal MetricSeriesData(MetricSeriesDefinition definition, IEnumerable<DateTimeOffset> timestamps, IEnumerable<double> metricValues)
{
if (definition == null)
{
throw new ArgumentNullException(nameof(definition));
}
if (timestamps == null)
{
throw new ArgumentNullException(nameof(timestamps));
}
if (metricValues == null)
{
throw new ArgumentNullException(nameof(metricValues));
}
Definition = definition;
Timestamps = timestamps.ToList();
MetricValues = metricValues.ToList();
}
/// <summary> Initializes a new instance of MetricSeriesData. </summary>
/// <param name="definition"></param>
/// <param name="timestamps"> timestamps of the data related to this time series. </param>
/// <param name="metricValues"> values of the data related to this time series. </param>
internal MetricSeriesData(MetricSeriesDefinition definition, IReadOnlyList<DateTimeOffset> timestamps, IReadOnlyList<double> metricValues)
{
Definition = definition;
Timestamps = timestamps;
MetricValues = metricValues;
}
}
}