Luski.Net/Luski.net/JsonTypes/LocalServerInfo.cs

29 lines
955 B
C#
Raw Normal View History

using System;
using System.Text.Json.Serialization;
2024-08-27 10:57:22 -04:00
using Luski.Shared.PublicServers.V1.Enums;
2024-03-20 23:18:34 -04:00
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>();
2024-08-27 10:57:22 -04:00
[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)]
2024-08-27 10:57:22 -04:00
internal partial class LocalServerInfoContext : JsonSerializerContext;