about summary refs log tree commit diff
path: root/MatrixRoomUtils.Core/Filters/SyncFilter.cs
blob: 795789842d3b543421d33eb86871160bf5c0394b (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
using System.Text.Json.Serialization;

namespace MatrixRoomUtils.Core.Filters;

public class SyncFilter {
    [JsonPropertyName("account_data")]
    public AccountDataFilter? AccountData { get; set; }

    [JsonPropertyName("presence")]
    public PresenceFilter? Presence { get; set; }

    [JsonPropertyName("room")]
    public RoomFilter? Room { get; set; }
}

public class PresenceFilter {
    [JsonPropertyName("not_types")]
    public List<string>? NotTypes { get; set; }
}

public class RoomFilter {
    [JsonPropertyName("account_data")]
    public AccountDataFilter? AccountData { get; set; }

    [JsonPropertyName("ephemeral")]
    public EphemeralFilter? Ephemeral { get; set; }

    public class EphemeralFilter {
        [JsonPropertyName("not_types")]
        public List<string>? NotTypes { get; set; }
    }

    [JsonPropertyName("state")]
    public StateFilter? State { get; set; }

    public class StateFilter {
        [JsonPropertyName("lazy_load_members")]
        public bool? LazyLoadMembers { get; set; }

        [JsonPropertyName("types")]
        public List<string>? Types { get; set; }
    }

    [JsonPropertyName("timeline")]
    public TimelineFilter? Timeline { get; set; }

    public class TimelineFilter {
        [JsonPropertyName("limit")]
        public int? Limit { get; set; }

        [JsonPropertyName("types")]
        public List<string>? Types { get; set; }

        [JsonPropertyName("not_types")]
        public List<string>? NotTypes { get; set; }
    }
}

public class AccountDataFilter {
    [JsonPropertyName("not_types")]
    public List<string>? NotTypes { get; set; }
}