48 lines
1.1 KiB
C#
48 lines
1.1 KiB
C#
using System.Text.Json.Serialization;
|
|
|
|
namespace FinalFactory.Rendezvous.Contracts;
|
|
|
|
public sealed class SessionCapacity
|
|
{
|
|
[JsonRequired]
|
|
public int CurrentPlayers { get; set; }
|
|
|
|
[JsonRequired]
|
|
public int MaximumPlayers { get; set; }
|
|
}
|
|
|
|
public sealed class NetworkEndpoint
|
|
{
|
|
[JsonRequired]
|
|
public AddressFamilyKind AddressFamily { get; set; }
|
|
|
|
[JsonRequired]
|
|
public string Address { get; set; } = string.Empty;
|
|
|
|
[JsonRequired]
|
|
public int Port { get; set; }
|
|
}
|
|
|
|
public sealed class ApiError
|
|
{
|
|
[JsonRequired]
|
|
public int ContractVersion { get; set; } = ContractLimits.ContractVersion;
|
|
|
|
[JsonRequired]
|
|
public RendezvousErrorCode Code { get; set; }
|
|
|
|
[JsonRequired]
|
|
public string Message { get; set; } = string.Empty;
|
|
public string? CorrelationId { get; set; }
|
|
public int? RetryAfterSeconds { get; set; }
|
|
}
|
|
|
|
public sealed class HealthResponse
|
|
{
|
|
[JsonRequired]
|
|
public int ContractVersion { get; set; } = ContractLimits.ContractVersion;
|
|
|
|
[JsonRequired]
|
|
public string Status { get; set; } = string.Empty;
|
|
}
|