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

/// WriteContextDetails : Details about a write context 
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct WriteContextDetails {
    /// An identifier for a write context that might be imported from a peer domain. If it is, it will bear an imported resource prefix (either a domain identifier or an alias, followed by ::) 
    #[serde(rename = "name")]
    pub name: String,
    /// A short, single sentence description of this write context
    #[serde(rename = "summary")]
    pub summary: String,
    /// A longer form description of this write context
    #[serde(rename = "description")]
    pub description: String,
    #[serde(rename = "config")]
    pub config: Box<models::WriteContextConfigInfo>,
    /// true if this write context 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 WriteContextDetails {
    /// Details about a write context 
    pub fn new(name: String, summary: String, description: String, config: models::WriteContextConfigInfo, imported: bool) -> WriteContextDetails {
        WriteContextDetails {
            name,
            summary,
            description,
            config: Box::new(config),
            imported,
            source_domain_id: None,
            source_domain_name: None,
        }
    }
}