// Code generated by oagen. DO NOT EDIT.

#[allow(unused_imports)]
use super::*;
#[allow(unused_imports)]
use crate::enums::*;
use serde::{Deserialize, Serialize};
/// The run failed. All loose error fields are bundled here.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ErrorTerminal {
    /// Defaults to `error`.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub status: Option<String>,
    /// Human-readable error message
    pub message: String,
    /// Which execution stage failed
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub stage: Option<ErrorTerminalStage>,
    /// Error category for retry decisions
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub category: Option<ErrorTerminalCategory>,
    /// Detailed error context including stack trace
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub details: Option<ErrorDetails>,
    /// Step ID of the failing step, when the failure was attributable to a specific step
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub failing_step_id: Option<String>,
}
impl ErrorTerminal {
    /// Construct a new `ErrorTerminal` with the required fields set.
    #[allow(deprecated)]
    pub fn new(message: impl Into<String>) -> Self {
        Self {
            status: Default::default(),
            message: message.into(),
            stage: Default::default(),
            category: Default::default(),
            details: Default::default(),
            failing_step_id: Default::default(),
        }
    }
}
