1
1
using System ;
2
2
using System . Text . Json . Serialization ;
3
3
4
+ // ReSharper disable UnusedAutoPropertyAccessor.Global
5
+ #pragma warning disable CS8618
4
6
namespace MultiRPC . Discord . Status
5
7
{
6
8
/*public class Page
7
9
{
8
10
[JsonPropertyName("id")]
9
- public string Id { get; set ; }
11
+ public string Id { get; init ; }
10
12
11
13
[JsonPropertyName("name")]
12
- public string Name { get; set ; }
14
+ public string Name { get; init ; }
13
15
14
16
[JsonPropertyName("url")]
15
- public string Url { get; set ; }
17
+ public string Url { get; init ; }
16
18
17
19
[JsonPropertyName("time_zone")]
18
- public string TimeZone { get; set ; }
20
+ public string TimeZone { get; init ; }
19
21
20
22
[JsonPropertyName("updated_at")]
21
- public DateTime UpdatedAt { get; set ; }
23
+ public DateTime UpdatedAt { get; init ; }
22
24
}*/
23
25
24
26
public class Component
25
27
{
26
28
[ JsonPropertyName ( "id" ) ]
27
- public string Id { get ; set ; }
29
+ public string Id { get ; init ; }
28
30
29
31
[ JsonPropertyName ( "name" ) ]
30
- public string Name { get ; set ; }
32
+ public string Name { get ; init ; }
31
33
32
34
[ JsonPropertyName ( "status" ) ]
33
- public string Status { get ; set ; }
35
+ public string Status { get ; init ; }
34
36
35
37
[ JsonPropertyName ( "created_at" ) ]
36
- public DateTime CreatedAt { get ; set ; }
38
+ public DateTime CreatedAt { get ; init ; }
37
39
38
40
[ JsonPropertyName ( "updated_at" ) ]
39
- public DateTime UpdatedAt { get ; set ; }
41
+ public DateTime UpdatedAt { get ; init ; }
40
42
41
43
[ JsonPropertyName ( "position" ) ]
42
- public int Position { get ; set ; }
44
+ public int Position { get ; init ; }
43
45
44
46
[ JsonPropertyName ( "description" ) ]
45
- public string Description { get ; set ; }
47
+ public string Description { get ; init ; }
46
48
47
49
[ JsonPropertyName ( "showcase" ) ]
48
- public bool Showcase { get ; set ; }
50
+ public bool Showcase { get ; init ; }
49
51
50
52
[ JsonPropertyName ( "start_date" ) ]
51
- public string StartDate { get ; set ; }
53
+ public string StartDate { get ; init ; }
52
54
53
55
[ JsonPropertyName ( "group_id" ) ]
54
- public string GroupId { get ; set ; }
56
+ public string GroupId { get ; init ; }
55
57
56
58
[ JsonPropertyName ( "page_id" ) ]
57
- public string PageId { get ; set ; }
59
+ public string PageId { get ; init ; }
58
60
59
61
[ JsonPropertyName ( "group" ) ]
60
- public bool Group { get ; set ; }
62
+ public bool Group { get ; init ; }
61
63
62
64
[ JsonPropertyName ( "only_show_if_degraded" ) ]
63
- public bool OnlyShowIfDegraded { get ; set ; }
65
+ public bool OnlyShowIfDegraded { get ; init ; }
64
66
65
67
[ JsonPropertyName ( "components" ) ]
66
- public string [ ] Components { get ; set ; }
68
+ public string [ ] Components { get ; init ; }
67
69
}
68
70
69
71
public class Data
70
72
{
71
73
//[JsonPropertyName("page")]
72
- //public Page Page { get; set ; }
74
+ //public Page Page { get; init ; }
73
75
74
76
[ JsonPropertyName ( "components" ) ]
75
- public Component [ ] Components { get ; set ; }
77
+ public Component [ ] Components { get ; init ; }
76
78
}
77
79
}
0 commit comments