// Code generated by oagen. DO NOT EDIT.

#[allow(unused_imports)]
use super::*;
#[allow(unused_imports)]
use crate::enums::*;
use serde::{Deserialize, Serialize};
/// Response for cancel workflow endpoint.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct CancelWorkflowResponse {
    pub run: WorkflowRun,
    /// Whether immediate cancellation signaling was available
    ///
    /// Defaults to `true`.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub redis_available: Option<bool>,
    /// Cancellation delivery state from this request
    ///
    /// Defaults to `cancellation_requested`.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub cancellation_status: Option<CancelWorkflowResponseCancellationStatus>,
}
impl CancelWorkflowResponse {
    /// Construct a new `CancelWorkflowResponse` with the required fields set.
    #[allow(deprecated)]
    pub fn new(run: WorkflowRun) -> Self {
        Self {
            run,
            redis_available: Default::default(),
            cancellation_status: Default::default(),
        }
    }
}
