Skip to main content

tf_types/generated/
evidence_bundle.rs

1// GENERATED by `tf-schema codegen --target rust` — DO NOT EDIT BY HAND.
2
3#![allow(unused_imports, non_camel_case_types, non_snake_case, clippy::all)]
4
5use serde::{Deserialize, Serialize};
6use super::*;
7
8/// Compliance / legal evidence bundle (TF-0012). Captures who acted, what authority they had, what policy allowed/denied the action, what approval was given, whether quorum was met, what proof was generated, when it happened, and whether the event chain is tamper-evident.
9#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
10pub struct EvidenceBundle {
11    /// Version of the evidence-bundle schema.
12    pub evidence_version: EvidenceBundle_EvidenceVersion,
13    /// Stable identifier for this evidence bundle.
14    pub bundle_id: String,
15    pub trust_domain: TrustDomain,
16    /// Incident the bundle is collecting evidence for.
17    pub incident: EvidenceBundle_Incident,
18    /// Distinct actors involved in this incident.
19    #[serde(skip_serializing_if = "Option::is_none", default)]
20    pub actors: Option<Vec<ActorId>>,
21    /// Proof events that constitute the audit trail. Order is the original hash-chain order.
22    pub events: Vec<ProofEvent>,
23    /// Policy decisions consulted while the incident unfolded.
24    pub policy_decisions: Vec<PolicyDecision>,
25    /// Approval responses captured during the incident.
26    pub approvals: Vec<ApprovalResponse>,
27    /// Ceremony records for each approval (so audits can see how each approval was collected).
28    #[serde(skip_serializing_if = "Option::is_none", default)]
29    pub ceremonies: Option<Vec<ApprovalCeremony>>,
30    /// Quorum outcomes for any quorum-bound approval that resolved during the incident.
31    #[serde(skip_serializing_if = "Option::is_none", default)]
32    pub quorum_outcomes: Option<Vec<EvidenceBundle_QuorumOutcomes_Item>>,
33    /// Transparency-log / RFC 3161 anchors that strengthen this evidence.
34    #[serde(skip_serializing_if = "Option::is_none", default)]
35    pub anchors: Option<Vec<EvidenceBundle_Anchors_Item>>,
36    /// Optional L4 sealed evidence — the events array may be empty if the payload is sealed.
37    #[serde(skip_serializing_if = "Option::is_none", default)]
38    pub encrypted_payload: Option<ProofBundleEncrypted>,
39    /// Highest proof level any single event in this bundle was emitted at.
40    #[serde(skip_serializing_if = "Option::is_none", default)]
41    pub level: Option<EvidenceBundle_Level>,
42    pub issued_at: Timestamp,
43    pub issuer: ActorId,
44    pub signature: SignatureEnvelope,
45}
46
47#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
48pub struct EvidenceBundle_Anchors_Item {
49    /// Anchor backend kind.
50    pub kind: String,
51    /// Endpoint URL the anchor was submitted to.
52    #[serde(skip_serializing_if = "Option::is_none", default)]
53    pub url: Option<String>,
54    /// Backend-specific inclusion-proof blob.
55    #[serde(skip_serializing_if = "Option::is_none", default)]
56    pub inclusion_proof: Option<serde_json::Value>,
57}
58
59/// Version of the evidence-bundle schema.
60#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
61pub enum EvidenceBundle_EvidenceVersion {
62    #[serde(rename = "1")]
63    V1,
64}
65
66/// Incident the bundle is collecting evidence for.
67#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
68pub struct EvidenceBundle_Incident {
69    /// Human-readable incident label.
70    pub label: String,
71    pub started_at: Timestamp,
72    #[serde(skip_serializing_if = "Option::is_none", default)]
73    pub ended_at: Option<Timestamp>,
74    /// TF-0012 domain tags this evidence applies to.
75    #[serde(skip_serializing_if = "Option::is_none", default)]
76    pub domains: Option<Vec<String>>,
77    /// Free-text incident description.
78    #[serde(skip_serializing_if = "Option::is_none", default)]
79    pub description: Option<String>,
80}
81
82/// Highest proof level any single event in this bundle was emitted at.
83#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
84pub enum EvidenceBundle_Level {
85    #[serde(rename = "L0")]
86    L0,
87    #[serde(rename = "L1")]
88    L1,
89    #[serde(rename = "L2")]
90    L2,
91    #[serde(rename = "L3")]
92    L3,
93    #[serde(rename = "L4")]
94    L4,
95    #[serde(rename = "L5")]
96    L5,
97}
98
99#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
100pub struct EvidenceBundle_QuorumOutcomes_Item {
101    /// ApprovalRequest the quorum resolved.
102    pub request_id: String,
103    /// Number of approvers required.
104    pub min_approvers: i64,
105    /// Eligible approver set.
106    #[serde(skip_serializing_if = "Option::is_none", default)]
107    pub of: Option<Vec<ActorId>>,
108    /// Subset of `of` that signed approve.
109    pub approvers: Vec<ActorId>,
110    /// Final aggregated decision.
111    #[serde(skip_serializing_if = "Option::is_none", default)]
112    pub decision: Option<String>,
113}