-
Notifications
You must be signed in to change notification settings - Fork 4.5k
/
RuleDataSource.cs
50 lines (44 loc) · 2.87 KB
/
RuleDataSource.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
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// <auto-generated/>
#nullable disable
using Azure.Core;
namespace Azure.ResourceManager.Monitor.Models
{
/// <summary>
/// The resource from which the rule collects its data.
/// Please note <see cref="RuleDataSource"/> is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes.
/// The available derived classes include <see cref="RuleManagementEventDataSource"/> and <see cref="RuleMetricDataSource"/>.
/// </summary>
public abstract partial class RuleDataSource
{
/// <summary> Initializes a new instance of RuleDataSource. </summary>
protected RuleDataSource()
{
}
/// <summary> Initializes a new instance of RuleDataSource. </summary>
/// <param name="odataType"> specifies the type of data source. There are two types of rule data sources: RuleMetricDataSource and RuleManagementEventDataSource. </param>
/// <param name="resourceId"> the resource identifier of the resource the rule monitors. **NOTE**: this property cannot be updated for an existing rule. </param>
/// <param name="legacyResourceId"> the legacy resource identifier of the resource the rule monitors. **NOTE**: this property cannot be updated for an existing rule. </param>
/// <param name="resourceLocation"> the location of the resource. </param>
/// <param name="metricNamespace"> the namespace of the metric. </param>
internal RuleDataSource(string odataType, ResourceIdentifier resourceId, ResourceIdentifier legacyResourceId, string resourceLocation, string metricNamespace)
{
OdataType = odataType;
ResourceId = resourceId;
LegacyResourceId = legacyResourceId;
ResourceLocation = resourceLocation;
MetricNamespace = metricNamespace;
}
/// <summary> specifies the type of data source. There are two types of rule data sources: RuleMetricDataSource and RuleManagementEventDataSource. </summary>
internal string OdataType { get; set; }
/// <summary> the resource identifier of the resource the rule monitors. **NOTE**: this property cannot be updated for an existing rule. </summary>
public ResourceIdentifier ResourceId { get; set; }
/// <summary> the legacy resource identifier of the resource the rule monitors. **NOTE**: this property cannot be updated for an existing rule. </summary>
public ResourceIdentifier LegacyResourceId { get; set; }
/// <summary> the location of the resource. </summary>
public string ResourceLocation { get; set; }
/// <summary> the namespace of the metric. </summary>
public string MetricNamespace { get; set; }
}
}