// Code generated by oagen. DO NOT EDIT.

#[allow(unused_imports)]
use super::*;
#[allow(unused_imports)]
use crate::enums::*;
use serde::{Deserialize, Serialize};
/// Public live workflow edge object.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct WorkflowEdgeDoc {
    pub id: String,
    /// Foreign key to workflow
    pub workflow_id: String,
    /// ID of the source block
    pub source_block: String,
    /// ID of the target block
    pub target_block: String,
    /// Output handle on source block
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub source_handle: Option<String>,
    /// Input handle on target block
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub target_handle: Option<String>,
    pub updated_at: String,
}
impl WorkflowEdgeDoc {
    /// Construct a new `WorkflowEdgeDoc` with the required fields set.
    #[allow(deprecated)]
    pub fn new(
        id: impl Into<String>,
        workflow_id: impl Into<String>,
        source_block: impl Into<String>,
        target_block: impl Into<String>,
        updated_at: impl Into<String>,
    ) -> Self {
        Self {
            id: id.into(),
            workflow_id: workflow_id.into(),
            source_block: source_block.into(),
            target_block: target_block.into(),
            source_handle: Default::default(),
            target_handle: Default::default(),
            updated_at: updated_at.into(),
        }
    }
}
