Skip to main content

orvanta_api/models/
evaluate_response.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 EvaluateResponse {
16    #[serde(rename = "hit_policy")]
17    pub hit_policy: String,
18    /// 1-based rule numbers, in the order the hit policy selected them
19    #[serde(rename = "matched_rules")]
20    pub matched_rules: Vec<i32>,
21    /// Output values keyed by output column name (COLLECT yields an array per key)
22    #[serde(rename = "outputs")]
23    pub outputs: std::collections::HashMap<String, serde_json::Value>,
24}
25
26impl EvaluateResponse {
27    pub fn new(hit_policy: String, matched_rules: Vec<i32>, outputs: std::collections::HashMap<String, serde_json::Value>) -> EvaluateResponse {
28        EvaluateResponse {
29            hit_policy,
30            matched_rules,
31            outputs,
32        }
33    }
34}
35