authentik-rust 0.0.1

Making authentication simple.
Documentation
/*
 * authentik
 *
 * Making authentication simple.
 *
 * The version of the OpenAPI document: 2024.2.1
 * Contact: hello@goauthentik.io
 * Generated by: https://openapi-generator.tech
 */

use crate::models;

/// TransactionApplicationRequest : Serializer for creating a provider and an application in one transaction
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct TransactionApplicationRequest {
    #[serde(rename = "app")]
    pub app: Box<models::ApplicationRequest>,
    #[serde(rename = "provider_model")]
    pub provider_model: models::ProviderModelEnum,
    #[serde(rename = "provider")]
    pub provider: Box<models::ModelRequest>,
}

impl TransactionApplicationRequest {
    /// Serializer for creating a provider and an application in one transaction
    pub fn new(app: models::ApplicationRequest, provider_model: models::ProviderModelEnum, provider: models::ModelRequest) -> TransactionApplicationRequest {
        TransactionApplicationRequest {
            app: Box::new(app),
            provider_model,
            provider: Box::new(provider),
        }
    }
}