orvanta-api 3.0.0

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
Documentation
/*
 * Orvanta API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 3.0.0
 * Contact: contact@orvanta.cloud
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// PreviewBpmnInstance : An inline, possibly-undeployed BPMN diagram plus initial process variables (#710 stage 3) -- the request body for `POST /bpmn/run/preview`.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct PreviewBpmnInstance {
    /// the BPMN 2.0 XML as currently open in the editor
    #[serde(rename = "bpmn_xml")]
    pub bpmn_xml: String,
    /// Optional: only for scope-checking and job attribution (audit log, job list). Never resolved to a deployed `bpmn_flow` row.
    #[serde(rename = "path", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub path: Option<Option<String>>,
    /// Start variables for this run, addressed by the process as `flow_input.<name>`.
    #[serde(rename = "flow_input", skip_serializing_if = "Option::is_none")]
    pub flow_input: Option<std::collections::HashMap<String, serde_json::Value>>,
}

impl PreviewBpmnInstance {
    /// An inline, possibly-undeployed BPMN diagram plus initial process variables (#710 stage 3) -- the request body for `POST /bpmn/run/preview`.
    pub fn new(bpmn_xml: String) -> PreviewBpmnInstance {
        PreviewBpmnInstance {
            bpmn_xml,
            path: None,
            flow_input: None,
        }
    }
}