authentik_rust/models/
provider_request.rs1use crate::models;
12
13#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct ProviderRequest {
16 #[serde(rename = "name")]
17 pub name: String,
18 #[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 #[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 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