// Code generated by oagen. DO NOT EDIT.

#[allow(unused_imports)]
use super::*;
#[allow(unused_imports)]
use crate::enums::*;
use serde::{Deserialize, Serialize};
/// Request to update a block. Only provided fields are updated.
/// ``config_mode`` is a request-level signal (not persisted) that controls
/// how the route folds the ``config`` patch into the existing config doc:
/// * ``"merge"`` (default): RFC 7396 JSON Merge Patch — dicts recurse,
/// arrays/scalars replace, ``null`` deletes the key. This is what CLI
/// callers pass via ``--merge-config-file``.
/// * ``"replace"``: take ``config`` as the full new typed config. Top-level
/// ``null`` values are pruned so the caller can wipe a key with one
/// request. This is what CLI callers pass via ``--config-file``.
/// Pre-config_mode callers (legacy SDKs, the canvas, any code that doesn't
/// send the field) keep the merge behavior; they were already sending
/// full configs on every save, which is idempotent under merge.
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct UpdateWorkflowBlockRequest {
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub label: Option<String>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub position_x: Option<f64>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub position_y: Option<f64>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub width: Option<f64>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub height: Option<f64>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub config: Option<std::collections::HashMap<String, serde_json::Value>>,
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub parent_id: Option<String>,
    /// How to apply the ``config`` field. 'merge' (default) deep-merges the patch into the existing config with null-as-delete; 'replace' uses the patch as the full new config. Not persisted.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub config_mode: Option<UpdateWorkflowBlockRequestConfigMode>,
}
