using System; namespace VanadiumGuard.Protocol { /// /// Body of a 403 from /v1/session/open. The client shows this and stops; it is the one /// case where the guard refuses to run rather than running and reporting. /// public sealed class SessionRejection { /// Stable code the player can quote to support, e.g. VG-7001. public string ReasonCode { get; set; } = string.Empty; /// Player-facing text. Says a machine is blocked, not how it was recognised. public string PlayerMessage { get; set; } = string.Empty; /// Null for a permanent ban. public DateTimeOffset? ExpiresUtc { get; set; } } /// /// POST /v1/internal/machine/ban. Internal, called by moderation tooling with the /// internal API key - never by a game client. /// public sealed class MachineBanRequest { /// Composite id of the machine to ban. Takes precedence over PlayerId. public string? Composite { get; set; } /// /// Ban whichever machines this player has been seen on. Convenient for moderators, /// who know an account and not a hash. /// public string? PlayerId { get; set; } public string Reason { get; set; } = string.Empty; /// Who issued it. Recorded verbatim so bans can be traced to a person. public string IssuedBy { get; set; } = string.Empty; /// Null or absent bans permanently. public DateTimeOffset? ExpiresUtc { get; set; } } public sealed class MachineUnbanRequest { public string Composite { get; set; } = string.Empty; public string LiftedBy { get; set; } = string.Empty; public string Reason { get; set; } = string.Empty; } /// One machine as the service knows it. Returned by the lookup endpoints. public sealed class MachineRecordView { public string Composite { get; set; } = string.Empty; public string[] PlayerIds { get; set; } = Array.Empty(); public DateTimeOffset FirstSeenUtc { get; set; } public DateTimeOffset LastSeenUtc { get; set; } public bool Banned { get; set; } public string? BanReason { get; set; } public string? BannedBy { get; set; } public DateTimeOffset? BannedUtc { get; set; } public DateTimeOffset? ExpiresUtc { get; set; } } public sealed class MachineBanResult { /// Composites actually banned by this call. public string[] Banned { get; set; } = Array.Empty(); /// Live guard sessions disconnected as a result. public int SessionsEnded { get; set; } } }