namespace Discord.Gateway
{
internal class GatewayPayload
{
public GatewayOp Op { get; set; }
public DT? D { get; set; }
public int? S { get; set; }
public string? T { get; set; }
public GatewayPayload(GatewayOp op, DT? d = default, int? s = null, string? t = null)
{
Op = op;
D = d;
S = s;
T = t;
}
public static GatewayPayload? Parse(string json)
{
return JSON.Deserialize>(json);
}
public override string ToString()
{
return JSON.Serialize(this);
}
public static implicit operator string(GatewayPayload payload)
{
return payload.ToString();
}
}
}