-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNotification.cs
103 lines (90 loc) · 3.23 KB
/
Notification.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
using System.Text.Json.Serialization;
#pragma warning disable 8618
namespace komoband;
public class Notification {
public Event Event {get; set;}
public State State {get; set;}
}
[JsonPolymorphic(
TypeDiscriminatorPropertyName = "type",
IgnoreUnrecognizedTypeDiscriminators = true
)]
[JsonDerivedType(typeof(AddSubscriberPipeEvent), typeDiscriminator: "AddSubscriberPipe")]
[JsonDerivedType(typeof(ReloadConfigurationEvent), typeDiscriminator: "ReloadConfiguration")]
[JsonDerivedType(typeof(ReloadStaticConfigurationEvent), typeDiscriminator: "ReloadStaticConfiguration")]
[JsonDerivedType(typeof(FocusWorkspaceNumberEvent), typeDiscriminator: "FocusWorkspaceNumber")]
[JsonDerivedType(typeof(SendContainerToWorkspaceNumberEvent), typeDiscriminator: "SendContainerToWorkspaceNumber")]
[JsonDerivedType(typeof(FocusChangeEvent), typeDiscriminator: "FocusChange")]
[JsonDerivedType(typeof(CloakEvent), typeDiscriminator: "Cloak")]
[JsonDerivedType(typeof(UncloakEvent), typeDiscriminator: "Uncloak")]
[JsonDerivedType(typeof(ChangeLayoutEvent), typeDiscriminator: "ChangeLayout")]
[JsonDerivedType(typeof(ChangeLayoutCustomEvent), typeDiscriminator: "ChangeLayoutCustom")]
[JsonDerivedType(typeof(CycleLayoutEvent), typeDiscriminator: "CycleLayout")]
[JsonDerivedType(typeof(ToggleMonocleEvent), typeDiscriminator: "ToggleMonocle")]
[JsonDerivedType(typeof(ToggleTilingEvent), typeDiscriminator: "ToggleTiling")]
public class Event;
public class AddSubscriberPipeEvent : Event {
public string Content {get; set;}
}
public class ReloadConfigurationEvent : Event;
public class ReloadStaticConfigurationEvent : Event {
public string Content {get; set;}
}
public class FocusWorkspaceNumberEvent : Event {
public int Content {get; set;}
}
public class SendContainerToWorkspaceNumberEvent : Event {
public int Content {get; set;}
}
public class FocusChangeEvent : Event;
public class CloakEvent : Event;
public class UncloakEvent : Event;
public class ChangeLayoutEvent : Event {
public string Content {get; set;}
}
public class ChangeLayoutCustomEvent : Event {
public string Content {get; set;}
}
public class CycleLayoutEvent : Event {
public string Content {get; set;}
}
public class ToggleMonocleEvent : Event;
public class ToggleTilingEvent : Event;
public class State {
public Monitors Monitors {get; set;}
}
public class Monitors {
public Monitor[] Elements {get; set;}
}
public class Monitor {
public Workspaces Workspaces {get; set;}
}
public class Workspaces {
public Workspace[] Elements {get; set;}
public int Focused {get; set;}
}
public class Workspace {
public string Name {get; set;}
public Containers Containers {get; set;}
public bool Tile {get; set;}
public Layout Layout {get; set;}
[JsonPropertyName("monocle_container")]
public MonocleContainer? MonocleContainer {get; set;}
}
public class Containers {
public Container[] Elements {get; set;}
public int Focused {get; set;}
}
public class Container {
public string Id {get; set;}
}
public class Layout {
public string? Default {get; set;}
public CustomLayout[]? Custom {get; set;}
}
public class CustomLayout {
public string Column {get; set;}
}
public class MonocleContainer {
public string Id {get; set;}
}