Skip to main content

orvanta_api/models/
dmn_decision.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.7.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 DmnDecision {
16    #[serde(rename = "workspace_id")]
17    pub workspace_id: String,
18    #[serde(rename = "path")]
19    pub path: String,
20    #[serde(rename = "summary")]
21    pub summary: String,
22    #[serde(rename = "description")]
23    pub description: String,
24    /// The DMN 1.3 XML
25    #[serde(rename = "value")]
26    pub value: String,
27    #[serde(rename = "edited_by")]
28    pub edited_by: String,
29    #[serde(rename = "edited_at")]
30    pub edited_at: String,
31    #[serde(rename = "archived")]
32    pub archived: bool,
33    #[serde(rename = "extra_perms")]
34    pub extra_perms: std::collections::HashMap<String, bool>,
35    #[serde(rename = "draft_only", skip_serializing_if = "Option::is_none")]
36    pub draft_only: Option<bool>,
37    #[serde(rename = "labels", skip_serializing_if = "Option::is_none")]
38    pub labels: Option<Vec<String>>,
39    #[serde(rename = "versions")]
40    pub versions: Vec<i32>,
41}
42
43impl DmnDecision {
44    pub fn new(workspace_id: String, path: String, summary: String, description: String, value: String, edited_by: String, edited_at: String, archived: bool, extra_perms: std::collections::HashMap<String, bool>, versions: Vec<i32>) -> DmnDecision {
45        DmnDecision {
46            workspace_id,
47            path,
48            summary,
49            description,
50            value,
51            edited_by,
52            edited_at,
53            archived,
54            extra_perms,
55            draft_only: None,
56            labels: None,
57            versions,
58        }
59    }
60}
61