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

/// DomainPeerConfig : Configuration of a domain peer. If the import alias is absent, the domain ID, without the initial \"dm-\" prefix, will be used 
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct DomainPeerConfig {
    /// A list of identity providers that this peer domain may import from us. 
    #[serde(rename = "exportIdentityProviders", skip_serializing_if = "Option::is_none")]
    pub export_identity_providers: Option<Vec<String>>,
    /// If present and true, this overrides exportIdentityProviders and exports all identity providers 
    #[serde(rename = "exportAllIdentityProviders", skip_serializing_if = "Option::is_none")]
    pub export_all_identity_providers: Option<bool>,
    /// A list of fact types that this peer domain may import from us. 
    #[serde(rename = "exportFacts", skip_serializing_if = "Option::is_none")]
    pub export_facts: Option<Vec<String>>,
    /// If present and true, this overrides exportFacts and exports all fact types 
    #[serde(rename = "exportAllFacts", skip_serializing_if = "Option::is_none")]
    pub export_all_facts: Option<bool>,
    /// A list of read contexts that this peer domain may import from us. 
    #[serde(rename = "exportReadContexts", skip_serializing_if = "Option::is_none")]
    pub export_read_contexts: Option<Vec<String>>,
    /// If present and true, this overrides exportReadContexts and exports all read contexts 
    #[serde(rename = "exportAllReadContexts", skip_serializing_if = "Option::is_none")]
    pub export_all_read_contexts: Option<bool>,
    /// A list of data policies to export to the peer domain 
    #[serde(rename = "exportDataPolicies", skip_serializing_if = "Option::is_none")]
    pub export_data_policies: Option<Vec<String>>,
    /// If present and true, this overrides exportDataPolicies and exports all available data policies 
    #[serde(rename = "exportAllDataPolicies", skip_serializing_if = "Option::is_none")]
    pub export_all_data_policies: Option<bool>,
    /// A list of write contexts that this peer domain may import from us. 
    #[serde(rename = "exportWriteContexts", skip_serializing_if = "Option::is_none")]
    pub export_write_contexts: Option<Vec<String>>,
    /// If present and true, this overrides exportWriteContexts and exports all write contexts 
    #[serde(rename = "exportAllWriteContexts", skip_serializing_if = "Option::is_none")]
    pub export_all_write_contexts: Option<bool>,
    /// A list of capabilities that this peer may import from us 
    #[serde(rename = "exportCapabilities", skip_serializing_if = "Option::is_none")]
    pub export_capabilities: Option<Vec<String>>,
    /// If present and true, this overrides exportCapabilities and exports all capabilities 
    #[serde(rename = "exportAllCapabilities", skip_serializing_if = "Option::is_none")]
    pub export_all_capabilities: Option<bool>,
    /// Export domain policy to the target domain. Export of individual policy rules can be configured by restricting which capabilities and facts are exported, as rules referencing unexported facts and capabilities will not be exported. 
    #[serde(rename = "exportDomainPolicy", skip_serializing_if = "Option::is_none")]
    pub export_domain_policy: Option<bool>,
    /// Export the root encryption keys to the target domain. Keys can only be exported as a whole, you cannot share individual keys. Additionally, the default encryption keys in a domain cannot be shared (note: default meaning the provider type, the  'active' key can be shared if it is not of type default). 
    #[serde(rename = "exportRootEncryptionKeys", skip_serializing_if = "Option::is_none")]
    pub export_root_encryption_keys: Option<bool>,
    /// Allow the target domain to query the capsule access log for this domain 
    #[serde(rename = "exportCapsuleAccessLog", skip_serializing_if = "Option::is_none")]
    pub export_capsule_access_log: Option<bool>,
    /// Allow the target domain to query the control audit log for this domain 
    #[serde(rename = "exportControlLog", skip_serializing_if = "Option::is_none")]
    pub export_control_log: Option<bool>,
    /// Allow the target domain to query the list of capsules and their tags 
    #[serde(rename = "exportCapsuleManifest", skip_serializing_if = "Option::is_none")]
    pub export_capsule_manifest: Option<bool>,
    /// Let this peer domain bill us for its usage. Admins/users in the peer domain may not see any sensitive billing information, they may just \"forward\" the bill to our domain. 
    #[serde(rename = "exportBilling", skip_serializing_if = "Option::is_none")]
    pub export_billing: Option<bool>,
    /// Let this peer domain forward all admin communications to the admin contact for our domain. Admins/users in the peer domain may not see the admin contact details, they can just \"forward\" communication to the admin contact of our domain. 
    #[serde(rename = "exportAdminContact", skip_serializing_if = "Option::is_none")]
    pub export_admin_contact: Option<bool>,
    /// a list of names for this domain. These can be used to look up this domain later by using domainFromNickname. All nicknames for a peer domain must be unique within a domain. 
    #[serde(rename = "nicknames", skip_serializing_if = "Option::is_none")]
    pub nicknames: Option<Vec<String>>,
    /// An alias for a peer domain. It must be unique within a domain. The alias is used to refer to the peer domain in policies. A peer may have only one alias 
    #[serde(rename = "importAlias", skip_serializing_if = "Option::is_none")]
    pub import_alias: Option<String>,
    /// Forward all charges incurred from operations in our domain to the peer domain. If this is set to true, the configured billing details in our domain have no effect. 
    #[serde(rename = "forwardBilling", skip_serializing_if = "Option::is_none")]
    pub forward_billing: Option<bool>,
    /// Forward all admin communications (account reset, billing, etc) that would be sent to the admin of our domain, to this peer domain instead. If this is set to true, the list of admin contacts configured in our domain is completely ignored. 
    #[serde(rename = "forwardAdminCommunications", skip_serializing_if = "Option::is_none")]
    pub forward_admin_communications: Option<bool>,
    /// A list of identity providers to import from the peer domain. 
    #[serde(rename = "importIdentityProviders", skip_serializing_if = "Option::is_none")]
    pub import_identity_providers: Option<Vec<String>>,
    /// If present and true, this overrides importIdentityProviders and imports all available identityProviders contexts 
    #[serde(rename = "importAllIdentityProviders", skip_serializing_if = "Option::is_none")]
    pub import_all_identity_providers: Option<bool>,
    /// A list of facts types to import from the peer domain. 
    #[serde(rename = "importFacts", skip_serializing_if = "Option::is_none")]
    pub import_facts: Option<Vec<String>>,
    /// If present and true, this overrides importFacts and imports all available facts 
    #[serde(rename = "importAllFacts", skip_serializing_if = "Option::is_none")]
    pub import_all_facts: Option<bool>,
    /// A list of read contexts to import from the peer domain. 
    #[serde(rename = "importReadContexts", skip_serializing_if = "Option::is_none")]
    pub import_read_contexts: Option<Vec<String>>,
    /// If present and true, this overrides importReadContexts and imports all available read contexts 
    #[serde(rename = "importAllReadContexts", skip_serializing_if = "Option::is_none")]
    pub import_all_read_contexts: Option<bool>,
    /// A list of data policies to import from the peer domain 
    #[serde(rename = "importDataPolicies", skip_serializing_if = "Option::is_none")]
    pub import_data_policies: Option<Vec<String>>,
    /// If present and true, this overrides importDataPolicies and imports all available data policies 
    #[serde(rename = "importAllDataPolicies", skip_serializing_if = "Option::is_none")]
    pub import_all_data_policies: Option<bool>,
    /// A list of write contexts to import from the peer domain. 
    #[serde(rename = "importWriteContexts", skip_serializing_if = "Option::is_none")]
    pub import_write_contexts: Option<Vec<String>>,
    /// If present and true, this overrides importWriteContexts and imports all available write contexts 
    #[serde(rename = "importAllWriteContexts", skip_serializing_if = "Option::is_none")]
    pub import_all_write_contexts: Option<bool>,
    /// A list of capabilities to import from the peer domain 
    #[serde(rename = "importCapabilities", skip_serializing_if = "Option::is_none")]
    pub import_capabilities: Option<Vec<String>>,
    /// If present and true, this overrides importCapabilities and imports  all available capabilities 
    #[serde(rename = "importAllCapabilities", skip_serializing_if = "Option::is_none")]
    pub import_all_capabilities: Option<bool>,
    /// Import all domain policy (limited by the imported capabilities and facts) into this domain 
    #[serde(rename = "importDomainPolicy", skip_serializing_if = "Option::is_none")]
    pub import_domain_policy: Option<bool>,
    /// Import all root encryption keys into this domain 
    #[serde(rename = "importRootEncryptionKeys", skip_serializing_if = "Option::is_none")]
    pub import_root_encryption_keys: Option<bool>,
    /// For read contexts and domain policy, is the peer domain higher precedence  (<0) or lower precedence (>0) than the rules configured in the current domain (0). The precedence is also used to order the imported read context rules and domain policy rules with respect to policy imported from other peers. Note  that imported policy is always executed as an atomic unit, so interleaving  of imported rules and rules that exist in this domain is not possible. 
    #[serde(rename = "importPrecedence", skip_serializing_if = "Option::is_none")]
    pub import_precedence: Option<i32>,
    /// When querying the capsule access log, should results from this peer domain automatically be merged in 
    #[serde(rename = "importCapsuleAccessLog", skip_serializing_if = "Option::is_none")]
    pub import_capsule_access_log: Option<bool>,
    /// When querying the control audit log, should results from this peer domain automatically be merged in 
    #[serde(rename = "importControlLog", skip_serializing_if = "Option::is_none")]
    pub import_control_log: Option<bool>,
    /// When querying for capsules, should results from this peer domain automatically be merged in 
    #[serde(rename = "importCapsuleManifest", skip_serializing_if = "Option::is_none")]
    pub import_capsule_manifest: Option<bool>,
    /// The default display name used for this domain. The display name is also treated as a nickname and so can be used from domainFromNickname. 
    #[serde(rename = "displayName")]
    pub display_name: String,
}

impl DomainPeerConfig {
    /// Configuration of a domain peer. If the import alias is absent, the domain ID, without the initial \"dm-\" prefix, will be used 
    pub fn new(display_name: String) -> DomainPeerConfig {
        DomainPeerConfig {
            export_identity_providers: None,
            export_all_identity_providers: None,
            export_facts: None,
            export_all_facts: None,
            export_read_contexts: None,
            export_all_read_contexts: None,
            export_data_policies: None,
            export_all_data_policies: None,
            export_write_contexts: None,
            export_all_write_contexts: None,
            export_capabilities: None,
            export_all_capabilities: None,
            export_domain_policy: None,
            export_root_encryption_keys: None,
            export_capsule_access_log: None,
            export_control_log: None,
            export_capsule_manifest: None,
            export_billing: None,
            export_admin_contact: None,
            nicknames: None,
            import_alias: None,
            forward_billing: None,
            forward_admin_communications: None,
            import_identity_providers: None,
            import_all_identity_providers: None,
            import_facts: None,
            import_all_facts: None,
            import_read_contexts: None,
            import_all_read_contexts: None,
            import_data_policies: None,
            import_all_data_policies: None,
            import_write_contexts: None,
            import_all_write_contexts: None,
            import_capabilities: None,
            import_all_capabilities: None,
            import_domain_policy: None,
            import_root_encryption_keys: None,
            import_precedence: None,
            import_capsule_access_log: None,
            import_control_log: None,
            import_capsule_manifest: None,
            display_name,
        }
    }
}