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
41
42
/*
* Orvanta API
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 3.0.0
* Contact: contact@orvanta.cloud
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// EvaluateServiceRequest : Evaluate one `<decisionService>` -- the whole DRD closure below it -- as a unit (Flowable part2). Deliberately a separate shape from EvaluateRequest: a decision service has no single hit_policy and no single matched_rules, so folding it into EvaluateResponse would leave two of that schema's three required fields meaningless.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct EvaluateServiceRequest {
/// A saved dmn_decision path whose document holds the decision service
#[serde(rename = "decision_id", skip_serializing_if = "Option::is_none")]
pub decision_id: Option<String>,
/// 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>,
/// The in-document `<decisionService id>` to run. Required: a document may hold several decision services, and picking the first would make which one ran depend on element order.
#[serde(rename = "decision_service_ref")]
pub decision_service_ref: String,
/// Input values keyed by FEEL variable name, flattened into dotted keys exactly as for EvaluateRequest. Each decision's result is then bound into the same context twice: under each output column's bare name (Flowable parity -- Flowable merges results flat into one shared variable map and never reads `<variable>`), and under the decision's own `<variable name>` (single output) or `<variable name>.<column>` (several outputs), which cannot collide.
#[serde(rename = "inputs")]
pub inputs: std::collections::HashMap<String, serde_json::Value>,
}
impl EvaluateServiceRequest {
/// Evaluate one `<decisionService>` -- the whole DRD closure below it -- as a unit (Flowable part2). Deliberately a separate shape from EvaluateRequest: a decision service has no single hit_policy and no single matched_rules, so folding it into EvaluateResponse would leave two of that schema's three required fields meaningless.
pub fn new(decision_service_ref: String, inputs: std::collections::HashMap<String, serde_json::Value>) -> EvaluateServiceRequest {
EvaluateServiceRequest {
decision_id: None,
xml: None,
decision_service_ref,
inputs,
}
}
}