summary refs log tree commit diff
path: root/extra/admin-api/Models/Spacebar.Models.Gateway/QoSPayload.cs
blob: e470318bdc101598f914e5ae11d2ff4c5966095c (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
using System.Text.Json.Serialization;

namespace Spacebar.Models.Gateway;

public class HeartbeatRequest {
    [JsonPropertyName("seq")]
    public required int? Sequence { get; set; }
}

public class QoSHeartbeatRequest : HeartbeatRequest {
    [JsonPropertyName("qos")]
    public required QoSPayload QoSPayload { get; set; }
}

public class QoSPayload {
    [JsonPropertyName("ver")]
    public int Version { get; set; }

    [JsonPropertyName("active")]
    public bool Active { get; set; }

    [JsonPropertyName("reasons")]
    public List<string> Reasons { get; set; } = [];
}