@@ -14,79 +14,80 @@ public class AzureAlertContext
14
14
/// <summary>
15
15
/// Gets or sets the unique ID for this alert.
16
16
/// </summary>
17
- [ JsonProperty ( "id" ) ]
17
+ [ JsonProperty ( "id" , Required = Required . Always ) ]
18
18
public string Id { get ; set ; }
19
19
20
20
/// <summary>
21
21
/// Gets or sets the name of the alert.
22
22
/// </summary>
23
- [ JsonProperty ( "name" ) ]
23
+ [ JsonProperty ( "name" , Required = Required . Always ) ]
24
24
public string Name { get ; set ; }
25
25
26
26
/// <summary>
27
27
/// Gets or sets the description of the alert.
28
28
/// </summary>
29
- [ JsonProperty ( "description" ) ]
29
+ [ JsonProperty ( "description" , Required = Required . Always ) ]
30
30
public string Description { get ; set ; }
31
31
32
32
/// <summary>
33
33
/// Gets or sets the condition type, e.g. '<c>Metric</c>' or '<c>Event</c>'.
34
34
/// </summary>
35
- [ JsonProperty ( "conditionType" ) ]
35
+ [ JsonProperty ( "conditionType" , Required = Required . Always ) ]
36
36
public string ConditionType { get ; set ; }
37
37
38
38
/// <summary>
39
39
/// Gets or sets the Azure subscription ID.
40
40
/// </summary>
41
- [ JsonProperty ( "subscriptionId" ) ]
41
+ [ JsonProperty ( "subscriptionId" , Required = Required . Always ) ]
42
42
public string SubscriptionId { get ; set ; }
43
43
44
44
/// <summary>
45
45
/// Gets or sets the time at which the alert was triggered. The alert is triggered as soon as
46
46
/// the metric is read from the diagnostics storage.
47
47
/// </summary>
48
- [ JsonProperty ( "timestamp" ) ]
48
+ [ JsonProperty ( "timestamp" , Required = Required . Always ) ]
49
49
public DateTime Timestamp { get ; set ; }
50
50
51
51
/// <summary>
52
52
/// Gets or sets information about the condition causing the event.
53
53
/// </summary>
54
+ [ JsonProperty ( "condition" , Required = Required . Always ) ]
54
55
public AzureAlertCondition Condition { get ; set ; }
55
56
56
57
/// <summary>
57
58
/// Gets or sets the resource group name of the impacted resource causing the alert.
58
59
/// </summary>
59
- [ JsonProperty ( "resourceGroupName" ) ]
60
+ [ JsonProperty ( "resourceGroupName" , Required = Required . Always ) ]
60
61
public string ResourceGroupName { get ; set ; }
61
62
62
63
/// <summary>
63
64
/// Gets or sets the name of the resource causing the alert.
64
65
/// </summary>
65
- [ JsonProperty ( "resourceName" ) ]
66
+ [ JsonProperty ( "resourceName" , Required = Required . Always ) ]
66
67
public string ResourceName { get ; set ; }
67
68
68
69
/// <summary>
69
70
/// Gets or sets the type of the impacted resource.
70
71
/// </summary>
71
- [ JsonProperty ( "resourceType" ) ]
72
+ [ JsonProperty ( "resourceType" , Required = Required . Always ) ]
72
73
public string ResourceType { get ; set ; }
73
74
74
75
/// <summary>
75
76
/// Gets or sets the ID of the resource.
76
77
/// </summary>
77
- [ JsonProperty ( "resourceId" ) ]
78
+ [ JsonProperty ( "resourceId" , Required = Required . Always ) ]
78
79
public string ResourceId { get ; set ; }
79
80
80
81
/// <summary>
81
82
/// Gets or sets the region where the resource is located.
82
83
/// </summary>
83
- [ JsonProperty ( "resourceRegion" ) ]
84
+ [ JsonProperty ( "resourceRegion" , Required = Required . Always ) ]
84
85
public string ResourceRegion { get ; set ; }
85
86
86
87
/// <summary>
87
88
/// Gets or sets a direct link to the resource summary page on the Azure portal.
88
89
/// </summary>
89
- [ JsonProperty ( "portalLink" ) ]
90
+ [ JsonProperty ( "portalLink" , Required = Required . Always ) ]
90
91
public string PortalLink { get ; set ; }
91
92
}
92
93
}
0 commit comments