using System;
using System.Text.Json.Serialization;

namespace StellaOps.Feedser.Source.Cccs.Internal;

internal sealed record CccsRawAdvisoryDocument
{
    [JsonPropertyName("sourceId")]
    public string SourceId { get; init; } = string.Empty;

    [JsonPropertyName("serialNumber")]
    public string? SerialNumber { get; init; }

    [JsonPropertyName("uuid")]
    public string? Uuid { get; init; }

    [JsonPropertyName("language")]
    public string Language { get; init; } = "en";

    [JsonPropertyName("title")]
    public string Title { get; init; } = string.Empty;

    [JsonPropertyName("summary")]
    public string? Summary { get; init; }

    [JsonPropertyName("canonicalUrl")]
    public string CanonicalUrl { get; init; } = string.Empty;

    [JsonPropertyName("externalUrl")]
    public string? ExternalUrl { get; init; }

    [JsonPropertyName("bodyHtml")]
    public string BodyHtml { get; init; } = string.Empty;

    [JsonPropertyName("bodySegments")]
    public string[] BodySegments { get; init; } = Array.Empty<string>();

    [JsonPropertyName("alertType")]
    public string? AlertType { get; init; }

    [JsonPropertyName("subject")]
    public string? Subject { get; init; }

    [JsonPropertyName("banner")]
    public string? Banner { get; init; }

    [JsonPropertyName("published")]
    public DateTimeOffset? Published { get; init; }

    [JsonPropertyName("modified")]
    public DateTimeOffset? Modified { get; init; }

    [JsonPropertyName("rawCreated")]
    public string? RawDateCreated { get; init; }

    [JsonPropertyName("rawModified")]
    public string? RawDateModified { get; init; }
}
