// Code generated by oagen. DO NOT EDIT.

#[allow(unused_imports)]
use super::*;
#[allow(unused_imports)]
use crate::enums::*;
use serde::{Deserialize, Serialize};
/// Public workflow version resource without tenant fields.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct WorkflowGraphVersion {
    /// Public content-addressed workflow version ID
    pub id: String,
    pub workflow_id: String,
    /// Defaults to `[]`.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub blocks: Option<Vec<WorkflowConfigBlock>>,
    /// Defaults to `[]`.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub edges: Option<Vec<WorkflowConfigEdge>>,
    /// Defaults to `[]`.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub block_version_ids: Option<Vec<String>>,
    /// Defaults to `[]`.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub edge_version_ids: Option<Vec<String>>,
    pub created_at: String,
}
impl WorkflowGraphVersion {
    /// Construct a new `WorkflowGraphVersion` with the required fields set.
    #[allow(deprecated)]
    pub fn new(
        id: impl Into<String>,
        workflow_id: impl Into<String>,
        created_at: impl Into<String>,
    ) -> Self {
        Self {
            id: id.into(),
            workflow_id: workflow_id.into(),
            blocks: Default::default(),
            edges: Default::default(),
            block_version_ids: Default::default(),
            edge_version_ids: Default::default(),
            created_at: created_at.into(),
        }
    }
}
