// Code generated by oagen. DO NOT EDIT.

#[allow(unused_imports)]
use super::*;
#[allow(unused_imports)]
use crate::enums::*;
use serde::{Deserialize, Serialize};
/// Body for POST /v1/workflows/blocks.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct WorkflowBlockCreateRequest {
    /// Workflow to create the block in.
    pub workflow_id: String,
    /// Opaque block ID. Omit to let the server generate one. Block IDs are unique per ORGANIZATION (not per workflow) — reusing a human-friendly id like 'block_extract' across multiple workflows in the same org will fail with 409. Prefer the server-generated ``blk_<nanoid>`` form for predictability.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub id: Option<String>,
    /// Block type
    #[serde(rename = "type")]
    pub type_: WorkflowBlockCreateRequestType,
    /// Display label
    ///
    /// Defaults to ``.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub label: Option<String>,
    /// X position
    ///
    /// Defaults to `0`.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub position_x: Option<f64>,
    /// Y position
    ///
    /// Defaults to `0`.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub position_y: Option<f64>,
    /// Block width
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub width: Option<f64>,
    /// Block height
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub height: Option<f64>,
    /// Block configuration
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub config: Option<std::collections::HashMap<String, serde_json::Value>>,
    /// ID of parent container block (while_loop, for_each)
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub parent_id: Option<String>,
}
