Skip to main content

orvanta_api/models/
dmn_decision_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: 1.6.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 DmnDecisionWithDraft {
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    /// The DMN 1.3 XML
23    #[serde(rename = "value")]
24    pub value: String,
25    #[serde(rename = "extra_perms")]
26    pub extra_perms: std::collections::HashMap<String, bool>,
27    #[serde(rename = "draft_only", skip_serializing_if = "Option::is_none")]
28    pub draft_only: Option<bool>,
29    #[serde(rename = "draft", skip_serializing_if = "Option::is_none")]
30    pub draft: Option<serde_json::Value>,
31    #[serde(rename = "labels", skip_serializing_if = "Option::is_none")]
32    pub labels: Option<Vec<String>>,
33}
34
35impl DmnDecisionWithDraft {
36    pub fn new(path: String, summary: String, description: String, value: String, extra_perms: std::collections::HashMap<String, bool>) -> DmnDecisionWithDraft {
37        DmnDecisionWithDraft {
38            path,
39            summary,
40            description,
41            value,
42            extra_perms,
43            draft_only: None,
44            draft: None,
45            labels: None,
46        }
47    }
48}
49