switchyard/types/
preflight.rs

1use serde::Serialize;
2
3/// Typed representation of a preflight diff row.
4/// Serialized to JSON for emission and report rows.
5#[derive(Clone, Debug, Serialize)]
6pub struct PreflightRow {
7    /// Unique identifier for the action
8    pub action_id: String,
9    /// Path being checked
10    pub path: String,
11    /// Current kind of the path
12    pub current_kind: String,
13    /// Planned kind of the path
14    pub planned_kind: String,
15    /// Whether the policy check passed
16    #[serde(skip_serializing_if = "Option::is_none")]
17    pub policy_ok: Option<bool>,
18    /// Provenance information for the path
19    #[serde(skip_serializing_if = "Option::is_none")]
20    pub provenance: Option<serde_json::Value>,
21    /// Additional notes about the path
22    #[serde(skip_serializing_if = "Option::is_none")]
23    pub notes: Option<Vec<String>>,
24    /// Preservation information for the path
25    #[serde(skip_serializing_if = "Option::is_none")]
26    pub preservation: Option<serde_json::Value>,
27    /// Whether preservation is supported for this path
28    #[serde(skip_serializing_if = "Option::is_none")]
29    pub preservation_supported: Option<bool>,
30    /// Whether the path is ready for restore
31    #[serde(skip_serializing_if = "Option::is_none")]
32    pub restore_ready: Option<bool>,
33    /// Backup tag for the path
34    #[serde(skip_serializing_if = "Option::is_none")]
35    pub backup_tag: Option<String>,
36}