antimatter_api/models/
data_policy_clause.rs

1/*
2 * Antimatter Public API
3 *
4 * Interact with the Antimatter Cloud API
5 *
6 * The version of the OpenAPI document: 2.0.13
7 * Contact: support@antimatter.io
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 DataPolicyClause {
16    #[serde(rename = "operator")]
17    pub operator: Operator,
18    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
19    pub tags: Option<Vec<models::TagExpression>>,
20    #[serde(rename = "capabilities", skip_serializing_if = "Option::is_none")]
21    pub capabilities: Option<Vec<models::CapabilityExpression>>,
22    #[serde(rename = "facts", skip_serializing_if = "Option::is_none")]
23    pub facts: Option<Vec<models::FactExpression>>,
24    #[serde(rename = "readParameters", skip_serializing_if = "Option::is_none")]
25    pub read_parameters: Option<Vec<models::ReadParameterExpression>>,
26}
27
28impl DataPolicyClause {
29    pub fn new(operator: Operator) -> DataPolicyClause {
30        DataPolicyClause {
31            operator,
32            tags: None,
33            capabilities: None,
34            facts: None,
35            read_parameters: None,
36        }
37    }
38}
39/// 
40#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
41pub enum Operator {
42    #[serde(rename = "AllOf")]
43    AllOf,
44    #[serde(rename = "NotAllOf")]
45    NotAllOf,
46    #[serde(rename = "AnyOf")]
47    AnyOf,
48    #[serde(rename = "NotAnyOf")]
49    NotAnyOf,
50    #[serde(rename = "Always")]
51    Always,
52}
53
54impl Default for Operator {
55    fn default() -> Operator {
56        Self::AllOf
57    }
58}
59