1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
* Orvanta API
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.6.0
* Contact: contact@orvanta.cloud
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct EvaluateRequest {
/// A saved dmn_decision path to load and evaluate
#[serde(rename = "decision_id", skip_serializing_if = "Option::is_none")]
pub decision_id: Option<String>,
/// Input values keyed by FEEL variable name
#[serde(rename = "inputs")]
pub inputs: std::collections::HashMap<String, serde_json::Value>,
/// Inline DMN 1.3 XML to evaluate instead of a saved decision_id
#[serde(rename = "xml", skip_serializing_if = "Option::is_none")]
pub xml: Option<String>,
/// In-document `<decision id>` selector, separate from decision_id (which is the storage path when loading a saved decision). When set, selects which decision inside the document to evaluate -- e.g. a decision other than the first in a saved multi-decision document. When omitted, inline xml falls back to decision_id as its selector and a stored decision evaluates its first decision element. Optional and backwards-compatible.
#[serde(rename = "decision_ref", skip_serializing_if = "Option::is_none")]
pub decision_ref: Option<String>,
}
impl EvaluateRequest {
pub fn new(inputs: std::collections::HashMap<String, serde_json::Value>) -> EvaluateRequest {
EvaluateRequest {
decision_id: None,
inputs,
xml: None,
decision_ref: None,
}
}
}