Skip to main content

orvanta_api/models/
cmmn_case_model_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: 6.3.0
7 * Contact: contact@orvanta.cloud
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// CmmnCaseModelWithDraft : The `get/draft/{path}` shape — the deployed model plus the unsaved `draft` row parked at the same path. 
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct CmmnCaseModelWithDraft {
17    #[serde(rename = "path")]
18    pub path: String,
19    #[serde(rename = "summary")]
20    pub summary: String,
21    #[serde(rename = "description")]
22    pub description: String,
23    /// The deployed CMMN 1.1 XML, byte-for-byte as saved. Null only when the model row carries no version at all — which a model created through this API never does, since every save appends one. 
24    #[serde(rename = "cmmn_xml", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
25    pub cmmn_xml: Option<Option<String>>,
26    #[serde(rename = "extra_perms")]
27    pub extra_perms: std::collections::HashMap<String, bool>,
28    #[serde(rename = "draft_only", skip_serializing_if = "Option::is_none")]
29    pub draft_only: Option<bool>,
30    #[serde(rename = "draft", skip_serializing_if = "Option::is_none")]
31    pub draft: Option<serde_json::Value>,
32    #[serde(rename = "labels", skip_serializing_if = "Option::is_none")]
33    pub labels: Option<Vec<String>>,
34}
35
36impl CmmnCaseModelWithDraft {
37    /// The `get/draft/{path}` shape — the deployed model plus the unsaved `draft` row parked at the same path. 
38    pub fn new(path: String, summary: String, description: String, extra_perms: std::collections::HashMap<String, bool>) -> CmmnCaseModelWithDraft {
39        CmmnCaseModelWithDraft {
40            path,
41            summary,
42            description,
43            cmmn_xml: None,
44            extra_perms,
45            draft_only: None,
46            draft: None,
47            labels: None,
48        }
49    }
50}
51