blob: d530356927f9c8a89dcbc5552e6849e46e83422e (
plain) (
blame)
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
|
using System.Text.Json.Nodes;
using System.Text.Json.Serialization;
namespace Spacebar.UApi.Models;
// TODO: real schemas
public class GuildTemplate {
[JsonPropertyName("code")]
public string Code { get; set; }
[JsonPropertyName("name")]
public string Name { get; set; }
[JsonPropertyName("description")]
public string Description { get; set; }
[JsonPropertyName("usage_count")]
public int UsageCount { get; set; }
[JsonPropertyName("creator_id")]
public string CreatorId { get; set; }
[JsonPropertyName("creator")]
public JsonObject Creator { get; set; }
[JsonPropertyName("created_at")]
public DateTimeOffset CreatedAt { get; set; }
[JsonPropertyName("updated_at")]
public DateTimeOffset UpdatedAt { get; set; }
[JsonPropertyName("source_guild_id")]
public string SourceGuildId { get; set; }
[JsonPropertyName("serialized_source_guild")]
public SerializedSourceGuild SerializedSourceGuild { get; set; }
}
public class SerializedSourceGuild { }
public class GuildTemplateRole {
[JsonPropertyName("id")]
public int Id { get; set; }
[JsonPropertyName("name")]
public string Name { get; set; }
[JsonPropertyName("permissions")]
public string Permissions { get; set; }
// "color" ignored for now - is deprecated anyhow
[JsonPropertyName("colors")]
public RoleColors Colors { get; set; }
[JsonPropertyName("hoist")]
public bool Hoist { get; set; }
[JsonPropertyName("mentionable")]
public bool Mentionable { get; set; }
// [JsonPropertyName("icon")]
}
public class RoleColors {
[JsonPropertyName("primary_color")]
public int PrimaryColor { get; set; }
[JsonPropertyName("secondary_color")]
public int? SecondaryColor { get; set; }
[JsonPropertyName("tertiary_color")]
public int TertiaryColor { get; set; }
}
|