Skip to main content

orvanta_api/models/
evaluate_request.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.5.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 EvaluateRequest {
16    /// A saved dmn_decision path to load and evaluate
17    #[serde(rename = "decision_id", skip_serializing_if = "Option::is_none")]
18    pub decision_id: Option<String>,
19    /// Input values keyed by FEEL variable name
20    #[serde(rename = "inputs")]
21    pub inputs: std::collections::HashMap<String, serde_json::Value>,
22    /// Inline DMN 1.3 XML to evaluate instead of a saved decision_id
23    #[serde(rename = "xml", skip_serializing_if = "Option::is_none")]
24    pub xml: Option<String>,
25}
26
27impl EvaluateRequest {
28    pub fn new(inputs: std::collections::HashMap<String, serde_json::Value>) -> EvaluateRequest {
29        EvaluateRequest {
30            decision_id: None,
31            inputs,
32            xml: None,
33        }
34    }
35}
36