-
Notifications
You must be signed in to change notification settings - Fork 4.8k
/
AcsRouterJobClassificationFailedEventData.cs
41 lines (36 loc) · 1.46 KB
/
AcsRouterJobClassificationFailedEventData.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
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Azure.Core;
namespace Azure.Messaging.EventGrid.SystemEvents
{
/// <summary> Schema of the Data property of an EventGridEvent for a Microsoft.Communication.RouterJobClassificationFailed event. </summary>
public partial class AcsRouterJobClassificationFailedEventData
{
/// <summary> List of Router Communication Errors. </summary>
[CodeGenMember("Errors")]
internal IReadOnlyList<AcsRouterCommunicationError> ErrorsInternal { get; }
/// <summary> List of Router Communication Errors. </summary>
public IReadOnlyList<ResponseError> Errors
{
get
{
if (_errors == null)
{
// Need to re-serialize to be able to deserialize as ResponseError with the internal properties populated.
var serialized = JsonSerializer.Serialize(
ErrorsInternal,
new JsonSerializerOptions
{
PropertyNamingPolicy = JsonNamingPolicy.CamelCase
});
_errors = JsonSerializer.Deserialize<List<ResponseError>>(serialized);
}
return _errors;
}
}
private List<ResponseError> _errors;
}
}