Skip to main content

orvanta_api/models/
new_bpmn_flow.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: 2.5.0
7 * Contact: contact@orvanta.cloud
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct NewBpmnFlow {
16    #[serde(rename = "path")]
17    pub path: String,
18    #[serde(rename = "summary")]
19    pub summary: String,
20    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
21    pub description: Option<String>,
22    #[serde(rename = "bpmn_xml")]
23    pub bpmn_xml: String,
24    /// JSON Schema of the process's start variables (the `flow_input` accepted by `POST /bpmn/run/p/{path}`). Optional: when omitted, it is derived server-side from the deployed diagram — declared start form properties plus variables the process reads but never sets. Supply one only to override that derivation.
25    #[serde(rename = "schema", skip_serializing_if = "Option::is_none")]
26    pub schema: Option<serde_json::Value>,
27    #[serde(rename = "draft_only", skip_serializing_if = "Option::is_none")]
28    pub draft_only: Option<bool>,
29    #[serde(rename = "labels", skip_serializing_if = "Option::is_none")]
30    pub labels: Option<Vec<String>>,
31}
32
33impl NewBpmnFlow {
34    pub fn new(path: String, summary: String, bpmn_xml: String) -> NewBpmnFlow {
35        NewBpmnFlow {
36            path,
37            summary,
38            description: None,
39            bpmn_xml,
40            schema: None,
41            draft_only: None,
42            labels: None,
43        }
44    }
45}
46