orvanta-api 6.5.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: 6.5.0
 * Contact: contact@orvanta.cloud
 * Generated by: https://openapi-generator.tech
 */

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

/// CmmnCaseModelWithDraft : The `get/draft/{path}` shape — the deployed model plus the unsaved `draft` row parked at the same path. 
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CmmnCaseModelWithDraft {
    #[serde(rename = "path")]
    pub path: String,
    #[serde(rename = "summary")]
    pub summary: String,
    #[serde(rename = "description")]
    pub description: String,
    /// 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. 
    #[serde(rename = "cmmn_xml", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub cmmn_xml: Option<Option<String>>,
    #[serde(rename = "extra_perms")]
    pub extra_perms: std::collections::HashMap<String, bool>,
    #[serde(rename = "draft_only", skip_serializing_if = "Option::is_none")]
    pub draft_only: Option<bool>,
    #[serde(rename = "draft", skip_serializing_if = "Option::is_none")]
    pub draft: Option<serde_json::Value>,
    #[serde(rename = "labels", skip_serializing_if = "Option::is_none")]
    pub labels: Option<Vec<String>>,
}

impl CmmnCaseModelWithDraft {
    /// The `get/draft/{path}` shape — the deployed model plus the unsaved `draft` row parked at the same path. 
    pub fn new(path: String, summary: String, description: String, extra_perms: std::collections::HashMap<String, bool>) -> CmmnCaseModelWithDraft {
        CmmnCaseModelWithDraft {
            path,
            summary,
            description,
            cmmn_xml: None,
            extra_perms,
            draft_only: None,
            draft: None,
            labels: None,
        }
    }
}