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 PrincipalSummary {
    /// A unique identifier for a principal in an identity provider
    #[serde(rename = "principalID")]
    pub principal_id: String,
    #[serde(rename = "principalType")]
    pub principal_type: models::DomainIdentityProviderPrincipalType,
    /// An optional comment for the principal
    #[serde(rename = "comment")]
    pub comment: String,
    /// Principal email address if provided.
    #[serde(rename = "email", skip_serializing_if = "Option::is_none")]
    pub email: Option<String>,
}

impl PrincipalSummary {
    pub fn new(principal_id: String, principal_type: models::DomainIdentityProviderPrincipalType, comment: String) -> PrincipalSummary {
        PrincipalSummary {
            principal_id,
            principal_type,
            comment,
            email: None,
        }
    }
}