orvanta_api/models/preview_bpmn_instance.rs
1/*
2 * Orvanta API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 3.0.0
7 * Contact: contact@orvanta.cloud
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// PreviewBpmnInstance : An inline, possibly-undeployed BPMN diagram plus initial process variables (#710 stage 3) -- the request body for `POST /bpmn/run/preview`.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct PreviewBpmnInstance {
17 /// the BPMN 2.0 XML as currently open in the editor
18 #[serde(rename = "bpmn_xml")]
19 pub bpmn_xml: String,
20 /// Optional: only for scope-checking and job attribution (audit log, job list). Never resolved to a deployed `bpmn_flow` row.
21 #[serde(rename = "path", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
22 pub path: Option<Option<String>>,
23 /// Start variables for this run, addressed by the process as `flow_input.<name>`.
24 #[serde(rename = "flow_input", skip_serializing_if = "Option::is_none")]
25 pub flow_input: Option<std::collections::HashMap<String, serde_json::Value>>,
26}
27
28impl PreviewBpmnInstance {
29 /// An inline, possibly-undeployed BPMN diagram plus initial process variables (#710 stage 3) -- the request body for `POST /bpmn/run/preview`.
30 pub fn new(bpmn_xml: String) -> PreviewBpmnInstance {
31 PreviewBpmnInstance {
32 bpmn_xml,
33 path: None,
34 flow_input: None,
35 }
36 }
37}
38