antimatter_api/models/
data_policy_rule_effect.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/// DataPolicyRuleEffect : The effect that is applied if a rule matches
15/// The effect that is applied if a rule matches
16#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17pub enum DataPolicyRuleEffect {
18    #[serde(rename = "DenyCapsule")]
19    DenyCapsule,
20    #[serde(rename = "DenyRecord")]
21    DenyRecord,
22    #[serde(rename = "Redact")]
23    Redact,
24    #[serde(rename = "Tokenize")]
25    Tokenize,
26    #[serde(rename = "Allow")]
27    Allow,
28
29}
30
31impl std::fmt::Display for DataPolicyRuleEffect {
32    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
33        match self {
34            Self::DenyCapsule => write!(f, "DenyCapsule"),
35            Self::DenyRecord => write!(f, "DenyRecord"),
36            Self::Redact => write!(f, "Redact"),
37            Self::Tokenize => write!(f, "Tokenize"),
38            Self::Allow => write!(f, "Allow"),
39        }
40    }
41}
42
43impl Default for DataPolicyRuleEffect {
44    fn default() -> DataPolicyRuleEffect {
45        Self::DenyCapsule
46    }
47}
48