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 DataPolicyClause {
    #[serde(rename = "operator")]
    pub operator: Operator,
    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
    pub tags: Option<Vec<models::TagExpression>>,
    #[serde(rename = "capabilities", skip_serializing_if = "Option::is_none")]
    pub capabilities: Option<Vec<models::CapabilityExpression>>,
    #[serde(rename = "facts", skip_serializing_if = "Option::is_none")]
    pub facts: Option<Vec<models::FactExpression>>,
    #[serde(rename = "readParameters", skip_serializing_if = "Option::is_none")]
    pub read_parameters: Option<Vec<models::ReadParameterExpression>>,
}

impl DataPolicyClause {
    pub fn new(operator: Operator) -> DataPolicyClause {
        DataPolicyClause {
            operator,
            tags: None,
            capabilities: None,
            facts: None,
            read_parameters: None,
        }
    }
}
/// 
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Operator {
    #[serde(rename = "AllOf")]
    AllOf,
    #[serde(rename = "NotAllOf")]
    NotAllOf,
    #[serde(rename = "AnyOf")]
    AnyOf,
    #[serde(rename = "NotAnyOf")]
    NotAnyOf,
    #[serde(rename = "Always")]
    Always,
}

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