tf_types/generated/
threat_model.rs1#![allow(unused_imports, non_camel_case_types, non_snake_case, clippy::all)]
4
5use serde::{Deserialize, Serialize};
6use super::*;
7
8#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
10pub struct Adversary {
11 pub id: String,
13 pub description: String,
15 pub capability_levels: Vec<Adversary_CapabilityLevels_Item>,
17}
18
19#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
20pub enum Adversary_CapabilityLevels_Item {
21 #[serde(rename = "opportunistic")]
22 Opportunistic,
23 #[serde(rename = "targeted")]
24 Targeted,
25 #[serde(rename = "insider")]
26 Insider,
27 #[serde(rename = "nation-state")]
28 NationState,
29 #[serde(rename = "ai-assisted")]
30 AiAssisted,
31}
32
33#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
35pub struct Asset {
36 pub id: String,
38 pub description: String,
40 pub criticality: RiskClass,
42}
43
44#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
46pub struct Mitigation {
47 pub id: String,
49 pub applies_to: Vec<String>,
51 pub description: String,
53 pub status: Mitigation_Status,
55}
56
57#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
59pub enum Mitigation_Status {
60 #[serde(rename = "planned")]
61 Planned,
62 #[serde(rename = "implemented")]
63 Implemented,
64 #[serde(rename = "not-applicable")]
65 NotApplicable,
66}
67
68#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
70pub struct ResidualRisk {
71 pub description: String,
73 pub accepted_by: ActorId,
75 pub accepted_at: Timestamp,
77}
78
79#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
81pub struct ThreatModel {
82 pub threat_model_version: ThreatModel_ThreatModelVersion,
84 pub project: String,
86 pub assets: Vec<Asset>,
88 pub adversaries: Vec<Adversary>,
90 pub attack_classes: Vec<String>,
92 pub mitigations: Vec<Mitigation>,
94 #[serde(skip_serializing_if = "Option::is_none", default)]
96 pub residual_risks: Option<Vec<ResidualRisk>>,
97}
98
99#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
101pub enum ThreatModel_ThreatModelVersion {
102 #[serde(rename = "1")]
103 V1,
104}