authentik_rust/models/
patched_prompt_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/// PatchedPromptRequest : Prompt Serializer
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct PatchedPromptRequest {
16    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
17    pub name: Option<String>,
18    /// Name of the form field, also used to store the value
19    #[serde(rename = "field_key", skip_serializing_if = "Option::is_none")]
20    pub field_key: Option<String>,
21    #[serde(rename = "label", skip_serializing_if = "Option::is_none")]
22    pub label: Option<String>,
23    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
24    pub r#type: Option<models::PromptTypeEnum>,
25    #[serde(rename = "required", skip_serializing_if = "Option::is_none")]
26    pub required: Option<bool>,
27    /// Optionally provide a short hint that describes the expected input value. When creating a fixed choice field, enable interpreting as expression and return a list to return multiple choices.
28    #[serde(rename = "placeholder", skip_serializing_if = "Option::is_none")]
29    pub placeholder: Option<String>,
30    /// Optionally pre-fill the input with an initial value. When creating a fixed choice field, enable interpreting as expression and return a list to return multiple default choices.
31    #[serde(rename = "initial_value", skip_serializing_if = "Option::is_none")]
32    pub initial_value: Option<String>,
33    #[serde(rename = "order", skip_serializing_if = "Option::is_none")]
34    pub order: Option<i32>,
35    #[serde(rename = "promptstage_set", skip_serializing_if = "Option::is_none")]
36    pub promptstage_set: Option<Vec<models::StageRequest>>,
37    #[serde(rename = "sub_text", skip_serializing_if = "Option::is_none")]
38    pub sub_text: Option<String>,
39    #[serde(rename = "placeholder_expression", skip_serializing_if = "Option::is_none")]
40    pub placeholder_expression: Option<bool>,
41    #[serde(rename = "initial_value_expression", skip_serializing_if = "Option::is_none")]
42    pub initial_value_expression: Option<bool>,
43}
44
45impl PatchedPromptRequest {
46    /// Prompt Serializer
47    pub fn new() -> PatchedPromptRequest {
48        PatchedPromptRequest {
49            name: None,
50            field_key: None,
51            label: None,
52            r#type: None,
53            required: None,
54            placeholder: None,
55            initial_value: None,
56            order: None,
57            promptstage_set: None,
58            sub_text: None,
59            placeholder_expression: None,
60            initial_value_expression: None,
61        }
62    }
63}
64