authentik_rust/models/
plex_authentication_challenge.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/// PlexAuthenticationChallenge : Challenge shown to the user in identification stage
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct PlexAuthenticationChallenge {
16    #[serde(rename = "type")]
17    pub r#type: models::ChallengeChoices,
18    #[serde(rename = "flow_info", skip_serializing_if = "Option::is_none")]
19    pub flow_info: Option<Box<models::ContextualFlowInfo>>,
20    #[serde(rename = "component", skip_serializing_if = "Option::is_none")]
21    pub component: Option<String>,
22    #[serde(rename = "response_errors", skip_serializing_if = "Option::is_none")]
23    pub response_errors: Option<std::collections::HashMap<String, Vec<models::ErrorDetail>>>,
24    #[serde(rename = "client_id")]
25    pub client_id: String,
26    #[serde(rename = "slug")]
27    pub slug: String,
28}
29
30impl PlexAuthenticationChallenge {
31    /// Challenge shown to the user in identification stage
32    pub fn new(r#type: models::ChallengeChoices, client_id: String, slug: String) -> PlexAuthenticationChallenge {
33        PlexAuthenticationChallenge {
34            r#type,
35            flow_info: None,
36            component: None,
37            response_errors: None,
38            client_id,
39            slug,
40        }
41    }
42}
43