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

/// DomainIdentityProviderInfo : Information about an identity provider. This may be an imported provider or a provider in this domain 
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct DomainIdentityProviderInfo {
    /// An identifier for an identity provider 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,
    /// Type of the identity provider.
    #[serde(rename = "type")]
    pub r#type: String,
    /// Is this identity provider imported from a peer domain
    #[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 = "supportedPrincipals")]
    pub supported_principals: Vec<models::DomainIdentityProviderPrincipalType>,
    #[serde(rename = "details", skip_serializing_if = "Option::is_none")]
    pub details: Option<Box<models::DomainIdentityProviderDetails>>,
}

impl DomainIdentityProviderInfo {
    /// Information about an identity provider. This may be an imported provider or a provider in this domain 
    pub fn new(name: String, r#type: String, imported: bool, supported_principals: Vec<models::DomainIdentityProviderPrincipalType>) -> DomainIdentityProviderInfo {
        DomainIdentityProviderInfo {
            name,
            r#type,
            imported,
            source_domain_id: None,
            source_domain_name: None,
            supported_principals,
            details: None,
        }
    }
}