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 FactExpression {
    /// 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 = "type")]
    pub r#type: String,
    #[serde(rename = "operator")]
    pub operator: Operator,
    #[serde(rename = "arguments")]
    pub arguments: Vec<models::FactExpressionArgumentsInner>,
    #[serde(rename = "variables", skip_serializing_if = "Option::is_none")]
    pub variables: Option<Vec<models::VariableDefinition>>,
}

impl FactExpression {
    pub fn new(r#type: String, operator: Operator, arguments: Vec<models::FactExpressionArgumentsInner>) -> FactExpression {
        FactExpression {
            r#type,
            operator,
            arguments,
            variables: None,
        }
    }
}
/// 
#[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
    }
}