44 lines
1.9 KiB
C#
44 lines
1.9 KiB
C#
using System.Text.Json.Serialization;
|
|
using Luski.Shared.PublicServers.V1.Enums;
|
|
using Luski.Shared.PublicServers.V1.Shared;
|
|
|
|
namespace Luski.Shared.PublicServers.V1.ServerToClient.HTTP;
|
|
|
|
public class ServerInfoSTC : STC
|
|
{
|
|
[JsonInclude]
|
|
[JsonPropertyName("name")]
|
|
public string Name { get; set; } = string.Empty;
|
|
[JsonInclude]
|
|
[JsonPropertyName("wssv4")]
|
|
public string WSSv4Address { get; set; } = string.Empty;
|
|
[JsonInclude]
|
|
[JsonPropertyName("description")]
|
|
public string Description { get; set; } = string.Empty;
|
|
[JsonInclude]
|
|
[JsonPropertyName("owner")]
|
|
public long Owner { get; set; }
|
|
[JsonInclude]
|
|
[JsonPropertyName("picture_type")]
|
|
public PictureType PictureType { get; set; }
|
|
[JsonInclude]
|
|
[JsonPropertyName("allowed_profile_text_modifications")]
|
|
public TextModification ProfileModifications { get; set; } = TextModification.Rainbow | TextModification.Gradient | TextModification.Color | TextModification.Italic;
|
|
[JsonInclude]
|
|
[JsonPropertyName("allowed_channel_text_modifications")]
|
|
public TextModification ChannelModifications { get; set; } = TextModification.Rainbow | TextModification.Gradient | TextModification.Color | TextModification.Italic;
|
|
[JsonInclude]
|
|
[JsonPropertyName("allowed_category_text_modifications")]
|
|
public TextModification CategoryModifications { get; set; } = TextModification.Rainbow | TextModification.Gradient | TextModification.Color | TextModification.Italic;
|
|
[JsonInclude]
|
|
[JsonPropertyName("alternate_servers")]
|
|
public ServerData[] AlternateServers { get; set; } =Array.Empty<ServerData>();
|
|
}
|
|
|
|
[JsonSerializable(typeof(ServerInfoSTC))]
|
|
[JsonSourceGenerationOptions(
|
|
GenerationMode = JsonSourceGenerationMode.Default,
|
|
PropertyNamingPolicy = JsonKnownNamingPolicy.Unspecified,
|
|
WriteIndented = false,
|
|
DefaultIgnoreCondition = JsonIgnoreCondition.Never)]
|
|
public partial class ServerInfoSTCContext : JsonSerializerContext; |