29 lines
955 B
C#
29 lines
955 B
C#
using System;
|
|
using System.Text.Json.Serialization;
|
|
using Luski.Shared.PublicServers.V1.Enums;
|
|
using Luski.Shared.PublicServers.V1.Shared;
|
|
|
|
namespace Luski.net.JsonTypes;
|
|
|
|
public class LocalServerInfo
|
|
{
|
|
[JsonInclude]
|
|
[JsonPropertyName("alternate_servers")]
|
|
public ServerData[] AlternateServers { get; set; } = Array.Empty<ServerData>();
|
|
[JsonInclude]
|
|
[JsonPropertyName("picture_type")]
|
|
public PictureType PictureType { get; set; }
|
|
[JsonInclude]
|
|
[JsonPropertyName("name")]
|
|
public string Name { get; set; } = default!;
|
|
[JsonInclude]
|
|
[JsonPropertyName("description")]
|
|
public string Description { get; set; } = default!;
|
|
}
|
|
|
|
[JsonSerializable(typeof(LocalServerInfo))]
|
|
[JsonSourceGenerationOptions(
|
|
GenerationMode = JsonSourceGenerationMode.Default,
|
|
PropertyNamingPolicy = JsonKnownNamingPolicy.CamelCase,
|
|
WriteIndented = false)]
|
|
internal partial class LocalServerInfoContext : JsonSerializerContext; |