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 DataPolicyBindingInfoReadContextsInner {
    /// A human readable name for a read context
    #[serde(rename = "name")]
    pub name: String,
    /// This is the configuration of this policy binding in our domain
    #[serde(rename = "configuration")]
    pub configuration: Configuration,
    /// This is the actual status of this binding, looking at our config, the peer config, and the actual  availability of the policy 
    #[serde(rename = "status")]
    pub status: Status,
    /// This defines where the status is coming from 
    #[serde(rename = "source")]
    pub source: Source,
    /// This is the configuration of this policy binding in the peer domain (for imported policies)
    #[serde(rename = "peerConfiguration", skip_serializing_if = "Option::is_none")]
    pub peer_configuration: Option<PeerConfiguration>,
}

impl DataPolicyBindingInfoReadContextsInner {
    pub fn new(name: String, configuration: Configuration, status: Status, source: Source) -> DataPolicyBindingInfoReadContextsInner {
        DataPolicyBindingInfoReadContextsInner {
            name,
            configuration,
            status,
            source,
            peer_configuration: None,
        }
    }
}
/// This is the configuration of this policy binding in our domain
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Configuration {
    #[serde(rename = "Inherit")]
    Inherit,
    #[serde(rename = "NotAttached")]
    NotAttached,
    #[serde(rename = "Attached")]
    Attached,
    #[serde(rename = "NoConfiguration")]
    NoConfiguration,
}

impl Default for Configuration {
    fn default() -> Configuration {
        Self::Inherit
    }
}
/// This is the actual status of this binding, looking at our config, the peer config, and the actual  availability of the policy 
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Status {
    #[serde(rename = "Attached")]
    Attached,
    #[serde(rename = "NotAttached")]
    NotAttached,
    #[serde(rename = "Unavailable")]
    Unavailable,
}

impl Default for Status {
    fn default() -> Status {
        Self::Attached
    }
}
/// This defines where the status is coming from 
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Source {
    #[serde(rename = "Default")]
    Default,
    #[serde(rename = "PeerDefault")]
    PeerDefault,
    #[serde(rename = "PeerContextConfiguration")]
    PeerContextConfiguration,
    #[serde(rename = "ContextConfiguration")]
    ContextConfiguration,
    #[serde(rename = "NoConfiguration")]
    NoConfiguration,
}

impl Default for Source {
    fn default() -> Source {
        Self::Default
    }
}
/// This is the configuration of this policy binding in the peer domain (for imported policies)
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum PeerConfiguration {
    #[serde(rename = "Attached")]
    Attached,
    #[serde(rename = "NotAttached")]
    NotAttached,
    #[serde(rename = "NoConfiguration")]
    NoConfiguration,
}

impl Default for PeerConfiguration {
    fn default() -> PeerConfiguration {
        Self::Attached
    }
}