Skip to main content

tf_types/generated/
actions.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/// Definition of a single named action.
9#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
10pub struct ActionDef {
11    /// Dotted action name this library defines.
12    pub name: ActionName,
13    /// Default risk class when no policy overrides it.
14    pub default_risk: RiskClass,
15    /// Default proof level when no policy overrides it.
16    pub default_proof: ProofLevel,
17    /// Default approval requirement when no policy overrides it.
18    #[serde(skip_serializing_if = "Option::is_none", default)]
19    pub approval_default: Option<ApprovalRequirement>,
20    /// Human-readable description of what the action does.
21    pub description: String,
22    /// Parameters schema for the action (opaque JSON Schema fragment).
23    #[serde(skip_serializing_if = "Option::is_none", default)]
24    pub parameters: Option<serde_json::Value>,
25    /// Flagged as dangerous; policies SHOULD require explicit approval.
26    #[serde(skip_serializing_if = "Option::is_none", default)]
27    pub dangerous: Option<bool>,
28    /// Whether the action can be undone by its inverse.
29    #[serde(skip_serializing_if = "Option::is_none", default)]
30    pub reversible: Option<bool>,
31}
32
33/// Catalog of action definitions referenced by TF-0006 agent contracts.
34#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
35pub struct Actions {
36    /// Version of the actions-library manifest schema itself.
37    pub actions_library_version: Actions_ActionsLibraryVersion,
38    /// Library identifier, e.g. tf-actions-std.
39    pub library_id: String,
40    /// Action definitions this library publishes.
41    pub actions: Vec<ActionDef>,
42}
43
44/// Version of the actions-library manifest schema itself.
45#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
46pub enum Actions_ActionsLibraryVersion {
47    #[serde(rename = "1")]
48    V1,
49}