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

/// DataPolicy : Information about a data policy 
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct DataPolicy {
    /// An identifier for a potentially imported policy
    #[serde(rename = "id")]
    pub id: String,
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "description")]
    pub description: String,
    /// true if this policy 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>,
    #[serde(rename = "readOnly")]
    pub read_only: bool,
    /// conveys if this policy comes from an integration
    #[serde(rename = "source")]
    pub source: String,
}

impl DataPolicy {
    /// Information about a data policy 
    pub fn new(id: String, name: String, description: String, imported: bool, read_only: bool, source: String) -> DataPolicy {
        DataPolicy {
            id,
            name,
            description,
            imported,
            source_domain_id: None,
            source_domain_name: None,
            read_only,
            source,
        }
    }
}