authentik_client/models/
provider_request.rs1use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ProviderRequest {
17 #[serde(rename = "name")]
18 pub name: String,
19 #[serde(
21 rename = "authentication_flow",
22 default,
23 with = "::serde_with::rust::double_option",
24 skip_serializing_if = "Option::is_none"
25 )]
26 pub authentication_flow: Option<Option<uuid::Uuid>>,
27 #[serde(rename = "authorization_flow")]
29 pub authorization_flow: uuid::Uuid,
30 #[serde(rename = "invalidation_flow")]
32 pub invalidation_flow: uuid::Uuid,
33 #[serde(rename = "property_mappings", skip_serializing_if = "Option::is_none")]
34 pub property_mappings: Option<Vec<uuid::Uuid>>,
35}
36
37impl ProviderRequest {
38 pub fn new(name: String, authorization_flow: uuid::Uuid, invalidation_flow: uuid::Uuid) -> ProviderRequest {
40 ProviderRequest {
41 name,
42 authentication_flow: None,
43 authorization_flow,
44 invalidation_flow,
45 property_mappings: None,
46 }
47 }
48}