authentik_rust/models/
provider_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/// ProviderRequest : Provider Serializer
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct ProviderRequest {
16    #[serde(rename = "name")]
17    pub name: String,
18    /// Flow used for authentication when the associated application is accessed by an un-authenticated user.
19    #[serde(rename = "authentication_flow", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
20    pub authentication_flow: Option<Option<uuid::Uuid>>,
21    /// Flow used when authorizing this provider.
22    #[serde(rename = "authorization_flow")]
23    pub authorization_flow: uuid::Uuid,
24    #[serde(rename = "property_mappings", skip_serializing_if = "Option::is_none")]
25    pub property_mappings: Option<Vec<uuid::Uuid>>,
26}
27
28impl ProviderRequest {
29    /// Provider Serializer
30    pub fn new(name: String, authorization_flow: uuid::Uuid) -> ProviderRequest {
31        ProviderRequest {
32            name,
33            authentication_flow: None,
34            authorization_flow,
35            property_mappings: None,
36        }
37    }
38}
39