using System;
using Newtonsoft.Json;
namespace Unity.Pipeline.Models
{
///
/// Editor ground truth about the console, sampled on the main thread and served alongside
/// buffered entries so a client can tell whether the buffer agrees with the Editor console
/// without a second round trip. Null when served from a player build, which has no Editor
/// console.
///
[Serializable]
public class ConsoleGroundTruth
{
/// When the sample was taken (UTC).
[JsonProperty("sampledUtc")]
public DateTime SampledUtc { get; set; }
///
/// How long ago the sample was taken. Sampling runs on the main thread, so it stops while
/// the Editor is blocked compiling or importing; a large age means the rest of this object
/// describes an older state of the console.
///
[JsonProperty("ageMs")]
public long AgeMs { get; set; }
///
/// True while the project has editor compile errors. Read from
/// EditorUtility.scriptCompilationFailed, which is native state independent of the
/// log callback and of any domain reload, so it stays true for as long as the errors do.
///
[JsonProperty("compilationFailed")]
public bool CompilationFailed { get; set; }
/// True while script compilation is in progress.
[JsonProperty("compiling")]
public bool Compiling { get; set; }
///
/// Errors the Editor console holds. This is a console-lifetime total, so comparing it with
/// shows whether the buffer is missing entries the
/// console still displays.
///
[JsonProperty("consoleErrors")]
public int ConsoleErrors { get; set; }
/// Warnings the Editor console holds.
[JsonProperty("consoleWarnings")]
public int ConsoleWarnings { get; set; }
/// Informational entries the Editor console holds.
[JsonProperty("consoleLogs")]
public int ConsoleLogs { get; set; }
///
/// True once the buffer has been backfilled from the Editor console's own store. False
/// means that backfill is unavailable on this Editor version, which is a benign explanation
/// for the buffer holding fewer entries than and friends report.
///
[JsonProperty("seeded")]
public bool Seeded { get; set; }
}
}