using System; using System.Diagnostics.CodeAnalysis; namespace StardewModdingAPI.Web.Framework.LogParsing.Models { /// Parsed metadata for a log. public class ParsedLog { /********* ** Accessors *********/ /**** ** Metadata ****/ /// Whether the log file was successfully parsed. [MemberNotNullWhen(true, nameof(ParsedLog.RawText))] public bool IsValid { get; set; } /// An error message indicating why the log file is invalid. public string? Error { get; set; } /// The raw log text. public string? RawText { get; set; } /// Whether there are messages from multiple screens in the log. public bool IsSplitScreen { get; set; } /**** ** Log data ****/ /// Whether SMAPI is running in strict mode, which disables all deprecated APIs. public bool IsStrictMode { get; set; } /// The SMAPI version. public string? ApiVersion { get; set; } /// The parsed SMAPI version, if it's valid. public ISemanticVersion? ApiVersionParsed { get; set; } /// The game version. public string? GameVersion { get; set; } /// The player's operating system. public string? OperatingSystem { get; set; } /// The game install path. public string? GamePath { get; set; } /// The mod folder path. public string? ModPath { get; set; } /// The ISO 8601 timestamp when the log was started. public DateTimeOffset Timestamp { get; set; } /// Metadata about installed mods and content packs. public LogModInfo[] Mods { get; set; } = Array.Empty(); /// The log messages. public LogMessage[] Messages { get; set; } = Array.Empty(); } }