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

/// DomainAuthenticateResponse : A domain identity token
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct DomainAuthenticateResponse {
    #[serde(rename = "token")]
    pub token: String,
    /// the token expiration, in UTC
    #[serde(rename = "expiry")]
    pub expiry: String,
    /// Optional advisory message for the caller. This can be used to indicate that the authenticating client is out of date 
    #[serde(rename = "advisory", skip_serializing_if = "Option::is_none")]
    pub advisory: Option<Vec<String>>,
    /// The public URL of the cell responding to the authentication request
    #[serde(rename = "cellAddress", skip_serializing_if = "Option::is_none")]
    pub cell_address: Option<String>,
    /// Optional message for use if user domain group lookup resolution fails. If this field is populated, it indicates that no capabilities were retrieved that relate to domain group mappings. 
    #[serde(rename = "groupLookupResult", skip_serializing_if = "Option::is_none")]
    pub group_lookup_result: Option<String>,
}

impl DomainAuthenticateResponse {
    /// A domain identity token
    pub fn new(token: String, expiry: String) -> DomainAuthenticateResponse {
        DomainAuthenticateResponse {
            token,
            expiry,
            advisory: None,
            cell_address: None,
            group_lookup_result: None,
        }
    }
}