Skip to main content

tf_types/generated/
approval_request.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/// A pending approval request raised by the daemon when a guarded action requires explicit human approval.
9#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
10pub struct ApprovalRequest {
11    /// Version of the approval-request schema itself.
12    pub request_version: ApprovalRequest_RequestVersion,
13    /// Stable identifier for this pending request.
14    pub id: String,
15    /// Actor requesting the action.
16    pub actor: ActorId,
17    /// Action name the actor is attempting.
18    pub action: ActionName,
19    /// Optional target (path, URL, etc.) the action would affect.
20    #[serde(skip_serializing_if = "Option::is_none", default)]
21    pub target: Option<String>,
22    /// Danger categories the guard surfaced for this request.
23    #[serde(skip_serializing_if = "Option::is_none", default)]
24    pub danger_tags: Option<Vec<DangerTag>>,
25    /// Human-readable explanation of why approval is needed.
26    pub reason: String,
27    /// When the request was enqueued.
28    pub created_at: Timestamp,
29    /// When the request will be auto-denied.
30    #[serde(skip_serializing_if = "Option::is_none", default)]
31    pub expires_at: Option<Timestamp>,
32}
33
34/// Version of the approval-request schema itself.
35#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
36pub enum ApprovalRequest_RequestVersion {
37    #[serde(rename = "1")]
38    V1,
39}