2021-08-27 11:03:47 -04:00
|
|
|
using System.Text.Json.Serialization;
|
2020-12-22 13:15:26 +01:00
|
|
|
|
2021-11-26 21:10:56 -05:00
|
|
|
namespace Myriad.Gateway;
|
|
|
|
|
|
|
|
public record GatewayIdentify
|
2020-12-22 13:15:26 +01:00
|
|
|
{
|
2021-11-26 21:10:56 -05:00
|
|
|
public string Token { get; init; }
|
|
|
|
public ConnectionProperties Properties { get; init; }
|
2020-12-22 13:15:26 +01:00
|
|
|
|
2021-11-26 21:10:56 -05:00
|
|
|
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
|
|
|
public bool? Compress { get; init; }
|
2020-12-22 13:15:26 +01:00
|
|
|
|
2021-11-26 21:10:56 -05:00
|
|
|
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
|
|
|
public int? LargeThreshold { get; init; }
|
2020-12-22 13:15:26 +01:00
|
|
|
|
2021-11-26 21:10:56 -05:00
|
|
|
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
|
|
|
public ShardInfo? Shard { get; init; }
|
2020-12-22 13:15:26 +01:00
|
|
|
|
2021-11-26 21:10:56 -05:00
|
|
|
public GatewayIntent Intents { get; init; }
|
2020-12-22 13:15:26 +01:00
|
|
|
|
2022-01-13 12:28:44 -05:00
|
|
|
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
|
|
|
public GatewayStatusUpdate? Presence { get; init; }
|
|
|
|
|
2021-11-26 21:10:56 -05:00
|
|
|
public record ConnectionProperties
|
|
|
|
{
|
|
|
|
[JsonPropertyName("$os")] public string Os { get; init; }
|
|
|
|
[JsonPropertyName("$browser")] public string Browser { get; init; }
|
|
|
|
[JsonPropertyName("$device")] public string Device { get; init; }
|
2020-12-22 13:15:26 +01:00
|
|
|
}
|
|
|
|
}
|