-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathEvents.cs
46 lines (33 loc) · 1.05 KB
/
Events.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
using System.Text.Json.Serialization;
namespace EliteVA;
public class ServerEvent
{
[JsonPropertyName("VariablesEvent")]
public VariablesEvent? VariablesEvent { get; init; }
[JsonPropertyName("JournalEvent")]
public string? JournalEvent { get; init; }
}
public class VariablesEvent
{
[JsonPropertyName("event")]
public string Event { get; init; }
[JsonPropertyName("set_variables")]
public SetVariable[] SetVariables { get; init; }
[JsonPropertyName("unset_variables")]
public UnsetVariable[] UnsetVariables { get; init; }
}
public class SetVariable
{
[JsonPropertyName("path")]
public string Path { get; init; }
[JsonPropertyName("encoded_value")]
public string EncodedValue { get; init; }
[JsonPropertyName("value_type")]
public ValueType ValueType { get; init; }
}
public class UnsetVariable
{
[JsonPropertyName("path")] public string Path { get; init; }
}
[JsonConverter(typeof(JsonStringEnumConverter))]
public enum ValueType { Int32, Single, String, Boolean, DateTime };