authentik_rust/models/
transaction_application_request.rs

1/*
2 * authentik
3 *
4 * Making authentication simple.
5 *
6 * The version of the OpenAPI document: 2024.2.1
7 * Contact: hello@goauthentik.io
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12
13/// TransactionApplicationRequest : Serializer for creating a provider and an application in one transaction
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct TransactionApplicationRequest {
16    #[serde(rename = "app")]
17    pub app: Box<models::ApplicationRequest>,
18    #[serde(rename = "provider_model")]
19    pub provider_model: models::ProviderModelEnum,
20    #[serde(rename = "provider")]
21    pub provider: Box<models::ModelRequest>,
22}
23
24impl TransactionApplicationRequest {
25    /// Serializer for creating a provider and an application in one transaction
26    pub fn new(app: models::ApplicationRequest, provider_model: models::ProviderModelEnum, provider: models::ModelRequest) -> TransactionApplicationRequest {
27        TransactionApplicationRequest {
28            app: Box::new(app),
29            provider_model,
30            provider: Box::new(provider),
31        }
32    }
33}
34