using MessagePack;
using System.Text.Json.Serialization;
namespace SVSim.EmulatedEntrypoint.Models.Dtos.Internal;
[MessagePackObject]
public class DataHeaders
{
[JsonPropertyName("short_udid")]
[Key("short_udid")]
public long ShortUdid { get; set; }
[JsonPropertyName("viewer_id")]
[Key("viewer_id")]
public long ViewerId { get; set; }
[JsonPropertyName("sid")]
[Key("sid")]
public string Sid { get; set; }
[JsonPropertyName("servertime")]
[Key("servertime")]
public long Servertime { get; set; }
[JsonPropertyName("result_code")]
[Key("result_code")]
public int ResultCode { get; set; }
///
/// Echoed UDID. Read by SignUpTask.Parse to validate response identity (client logs
/// udid一致しません and discards the response on mismatch); ignored by every other
/// client task. Always set by ShadowverseTranslationMiddleware from the request's
/// resolved UDID — never from controller state. Empty string when the SID→UDID lookup misses
/// (request without UDID/SID headers).
///
[JsonPropertyName("udid")]
[Key("udid")]
public string Udid { get; set; } = "";
///
/// Tells the client the required version path component for asset manifests on the
/// resource server (Akamai CDN, hardcoded to shadowverse.akamaized.net/ in
/// Wizard/SetUp.cs:48). NetworkTask.setResourceVersion writes the value
/// to PlayerPrefs["RES_VER"]; the manifest URL becomes
/// dl/Manifest/<RES_VER>/<lang>/<Platform>/. When the client
/// has no cached RES_VER (e.g., after NukeIdentityOnStartup wipes
/// PlayerPrefs), it defaults to "00000000", which Akamai doesn't serve — the
/// manifest fetch 404s and the client shows "Connection Error / Reconnect" before
/// the tutorial UI ever appears.
///
/// Nullable to keep it off the wire on responses that don't need it (the global
/// WhenWritingNull policy in Program.cs handles the omission).
///
///
[JsonPropertyName("required_res_ver")]
[Key("required_res_ver")]
public string? RequiredResVer { get; set; }
}