// Code generated by oagen. DO NOT EDIT.

#[allow(unused_imports)]
use super::*;
#[allow(unused_imports)]
use crate::enums::*;
use serde::{Deserialize, Serialize};
/// Public edge version resource without tenant fields.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct WorkflowEdgeVersion {
    /// Public content-addressed edge version ID
    pub id: String,
    /// Stable logical edge ID
    pub edge_id: String,
    /// Source workflow ID
    pub workflow_id: String,
    /// Workflow version this edge version belongs to
    pub workflow_version_id: String,
    /// ID of the source block
    pub source: String,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub source_handle: Option<String>,
    /// ID of the target block
    pub target: String,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub target_handle: Option<String>,
    /// Defaults to `true`.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub animated: Option<bool>,
    pub created_at: String,
}
impl WorkflowEdgeVersion {
    /// Construct a new `WorkflowEdgeVersion` with the required fields set.
    #[allow(deprecated)]
    pub fn new(
        id: impl Into<String>,
        edge_id: impl Into<String>,
        workflow_id: impl Into<String>,
        workflow_version_id: impl Into<String>,
        source: impl Into<String>,
        target: impl Into<String>,
        created_at: impl Into<String>,
    ) -> Self {
        Self {
            id: id.into(),
            edge_id: edge_id.into(),
            workflow_id: workflow_id.into(),
            workflow_version_id: workflow_version_id.into(),
            source: source.into(),
            source_handle: Default::default(),
            target: target.into(),
            target_handle: Default::default(),
            animated: Default::default(),
            created_at: created_at.into(),
        }
    }
}
