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};

/// DomainPolicy : A domain's policy. These rules govern who can view, edit or use which parts of a domain's configuration. Rules are executed in order of ascending priority number, and the execution stops with the first matching rule. If no rules match, the default action is 'deny'. If domain edit policy rules are imported from other domains in the peering configuration, the rules in those domains are independently evaluated to yield an allow/deny result and the final result from every domain, including this one, will be ANDed together. Thus, a deny in any domain yields an overall deny, and allow is only returned if all domains return allow. 
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct DomainPolicy {
    #[serde(rename = "rules")]
    pub rules: Vec<models::DomainPolicyRule>,
}

impl DomainPolicy {
    /// A domain's policy. These rules govern who can view, edit or use which parts of a domain's configuration. Rules are executed in order of ascending priority number, and the execution stops with the first matching rule. If no rules match, the default action is 'deny'. If domain edit policy rules are imported from other domains in the peering configuration, the rules in those domains are independently evaluated to yield an allow/deny result and the final result from every domain, including this one, will be ANDed together. Thus, a deny in any domain yields an overall deny, and allow is only returned if all domains return allow. 
    pub fn new(rules: Vec<models::DomainPolicyRule>) -> DomainPolicy {
        DomainPolicy {
            rules,
        }
    }
}