// Code generated by oagen. DO NOT EDIT.

#[allow(unused_imports)]
use super::*;
#[allow(unused_imports)]
use crate::enums::*;
use serde::{Deserialize, Serialize};
/// The step failed. Error details are bundled into lifecycle.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct ErrorStepLifecycle {
    /// Defaults to `error`.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub status: Option<String>,
    /// Human-readable error message
    pub message: String,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub stage: Option<ErrorStepLifecycleStage>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub category: Option<ErrorStepLifecycleCategory>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub details: Option<ErrorDetails>,
}
impl ErrorStepLifecycle {
    /// Construct a new `ErrorStepLifecycle` 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(),
        }
    }
}
