-
Notifications
You must be signed in to change notification settings - Fork 533
Expand file tree
/
Copy pathIndexMetricsInfoEntity.cs
More file actions
39 lines (37 loc) · 1.57 KB
/
IndexMetricsInfoEntity.cs
File metadata and controls
39 lines (37 loc) · 1.57 KB
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
//------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
//------------------------------------------------------------
namespace Microsoft.Azure.Cosmos.Query.Core.Metrics
{
using System.Collections.Generic;
using System.Linq;
using Newtonsoft.Json;
/// <summary>
/// Query index utilization metrics in the Azure Cosmos database service.
/// </summary>
#if INTERNAL
#pragma warning disable SA1600
#pragma warning disable CS1591
public
#else
internal
#endif
sealed class IndexMetricsInfoEntity
{
/// <summary>
/// Initializes a new instance of the Index Utilization class. This is the legacy class of IndexMetricsInfoEntity.
/// </summary>
/// <param name="singleIndexes">The utilized single indexes list</param>
/// <param name="compositeIndexes">The potential single indexes list</param>
[JsonConstructor]
public IndexMetricsInfoEntity(
IReadOnlyList<SingleIndexIndexMetrics> singleIndexes,
IReadOnlyList<CompositeIndexIndexMetrics> compositeIndexes)
{
this.SingleIndexes = (singleIndexes ?? Enumerable.Empty<SingleIndexIndexMetrics>()).Where(item => item != null).ToList();
this.CompositeIndexes = (compositeIndexes ?? Enumerable.Empty<CompositeIndexIndexMetrics>()).Where(item => item != null).ToList();
}
public IReadOnlyList<SingleIndexIndexMetrics> SingleIndexes { get; }
public IReadOnlyList<CompositeIndexIndexMetrics> CompositeIndexes { get; }
}
}