orvanta-api 1.6.0

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
Documentation
/*
 * 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 EvaluateResponse {
    #[serde(rename = "hit_policy")]
    pub hit_policy: String,
    /// 1-based rule numbers, in the order the hit policy selected them
    #[serde(rename = "matched_rules")]
    pub matched_rules: Vec<i32>,
    /// Output values keyed by output column name (COLLECT yields an array per key)
    #[serde(rename = "outputs")]
    pub outputs: std::collections::HashMap<String, serde_json::Value>,
}

impl EvaluateResponse {
    pub fn new(hit_policy: String, matched_rules: Vec<i32>, outputs: std::collections::HashMap<String, serde_json::Value>) -> EvaluateResponse {
        EvaluateResponse {
            hit_policy,
            matched_rules,
            outputs,
        }
    }
}