Skip to main content

orvanta_api/models/
bpmn_flow_with_draft.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#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct BpmnFlowWithDraft {
16    #[serde(rename = "path")]
17    pub path: String,
18    #[serde(rename = "summary")]
19    pub summary: String,
20    #[serde(rename = "description")]
21    pub description: String,
22    #[serde(rename = "bpmn_xml")]
23    pub bpmn_xml: String,
24    /// JSON Schema of the deployed version's start variables (see `BpmnFlow.schema`). Always the deployed version's — a draft carries no schema of its own.
25    #[serde(rename = "schema", skip_serializing_if = "Option::is_none")]
26    pub schema: Option<serde_json::Value>,
27    #[serde(rename = "extra_perms")]
28    pub extra_perms: std::collections::HashMap<String, bool>,
29    #[serde(rename = "draft_only", skip_serializing_if = "Option::is_none")]
30    pub draft_only: Option<bool>,
31    #[serde(rename = "draft", skip_serializing_if = "Option::is_none")]
32    pub draft: Option<serde_json::Value>,
33    #[serde(rename = "labels", skip_serializing_if = "Option::is_none")]
34    pub labels: Option<Vec<String>>,
35}
36
37impl BpmnFlowWithDraft {
38    pub fn new(path: String, summary: String, description: String, bpmn_xml: String, extra_perms: std::collections::HashMap<String, bool>) -> BpmnFlowWithDraft {
39        BpmnFlowWithDraft {
40            path,
41            summary,
42            description,
43            bpmn_xml,
44            schema: None,
45            extra_perms,
46            draft_only: None,
47            draft: None,
48            labels: None,
49        }
50    }
51}
52