antimatter_api 2.0.13

Interact with the Antimatter Cloud API
Documentation
/*
 * Antimatter Public API
 *
 * Interact with the Antimatter Cloud API
 *
 * The version of the OpenAPI document: 2.0.13
 * Contact: support@antimatter.io
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct FactPolicyRulesInner {
    /// whether this assertion matches when the fact exists or does not exist
    #[serde(rename = "operator")]
    pub operator: Operator,
    /// An identifier for a fact type that might be imported from a peer domain. If it is, it will bear an imported resource prefix (either a domain identifier or an alias, followed by ::) 
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "arguments")]
    pub arguments: Vec<models::FactPolicyRulesInnerArgumentsInner>,
}

impl FactPolicyRulesInner {
    pub fn new(operator: Operator, name: String, arguments: Vec<models::FactPolicyRulesInnerArgumentsInner>) -> FactPolicyRulesInner {
        FactPolicyRulesInner {
            operator,
            name,
            arguments,
        }
    }
}
/// whether this assertion matches when the fact exists or does not exist
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Operator {
    #[serde(rename = "Exists")]
    Exists,
    #[serde(rename = "NotExists")]
    NotExists,
}

impl Default for Operator {
    fn default() -> Operator {
        Self::Exists
    }
}