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

/// DomainSettings : Additional configuration options for a domain
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct DomainSettings {
    /// A list of admin contact details that have been validated.
    #[serde(rename = "activeAdminContacts", skip_serializing_if = "Option::is_none")]
    pub active_admin_contacts: Option<Vec<String>>,
    /// A list of admin contact details that are pending validation.
    #[serde(rename = "pendingAdminContacts", skip_serializing_if = "Option::is_none")]
    pub pending_admin_contacts: Option<Vec<String>>,
    /// User friendly custom display name.
    #[serde(rename = "defaultDisplayName")]
    pub default_display_name: String,
    /// The default lifetime in seconds of a domain authentication token generated for this domain.
    #[serde(rename = "defaultTokenLifetime", skip_serializing_if = "Option::is_none")]
    pub default_token_lifetime: Option<i32>,
    /// The maximum lifetime in seconds that a domain authentication token can be generated for.
    #[serde(rename = "maximumTokenLifetime", skip_serializing_if = "Option::is_none")]
    pub maximum_token_lifetime: Option<i32>,
}

impl DomainSettings {
    /// Additional configuration options for a domain
    pub fn new(default_display_name: String) -> DomainSettings {
        DomainSettings {
            active_admin_contacts: None,
            pending_admin_contacts: None,
            default_display_name,
            default_token_lifetime: None,
            maximum_token_lifetime: None,
        }
    }
}