authentik_rust/models/
autosubmit_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/// AutosubmitChallenge : Autosubmit challenge used to send and navigate a POST request
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct AutosubmitChallenge {
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 = "url")]
25    pub url: String,
26    #[serde(rename = "attrs")]
27    pub attrs: std::collections::HashMap<String, String>,
28    #[serde(rename = "title", skip_serializing_if = "Option::is_none")]
29    pub title: Option<String>,
30}
31
32impl AutosubmitChallenge {
33    /// Autosubmit challenge used to send and navigate a POST request
34    pub fn new(r#type: models::ChallengeChoices, url: String, attrs: std::collections::HashMap<String, String>) -> AutosubmitChallenge {
35        AutosubmitChallenge {
36            r#type,
37            flow_info: None,
38            component: None,
39            response_errors: None,
40            url,
41            attrs,
42            title: None,
43        }
44    }
45}
46