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 RootEncryptionKeyItem {
    /// The root encryption key's provider source.
    #[serde(rename = "source")]
    pub source: String,
    /// The cloud provider's resource path/alias.
    #[serde(rename = "resourcePath")]
    pub resource_path: String,
    /// A UUID or reference used for identifying root encryption keys. May also be \"default\" or \"active\" to refer to the default or active key. Note that it is not permitted to use the default key in a different domain. 
    #[serde(rename = "rekID")]
    pub rek_id: String,
    /// The user defined description for the root encryption key.
    #[serde(rename = "description")]
    pub description: String,
    /// true if this root encryption key is imported
    #[serde(rename = "imported")]
    pub imported: bool,
    /// A globally unique identifier for a domain
    #[serde(rename = "sourceDomainID", skip_serializing_if = "Option::is_none")]
    pub source_domain_id: Option<String>,
    #[serde(rename = "sourceDomainName", skip_serializing_if = "Option::is_none")]
    pub source_domain_name: Option<String>,
}

impl RootEncryptionKeyItem {
    pub fn new(source: String, resource_path: String, rek_id: String, description: String, imported: bool) -> RootEncryptionKeyItem {
        RootEncryptionKeyItem {
            source,
            resource_path,
            rek_id,
            description,
            imported,
            source_domain_id: None,
            source_domain_name: None,
        }
    }
}