authentik_rust/models/
dummy_policy_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/// DummyPolicyRequest : Dummy Policy Serializer
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct DummyPolicyRequest {
16    #[serde(rename = "name")]
17    pub name: String,
18    /// When this option is enabled, all executions of this policy will be logged. By default, only execution errors are logged.
19    #[serde(rename = "execution_logging", skip_serializing_if = "Option::is_none")]
20    pub execution_logging: Option<bool>,
21    #[serde(rename = "result", skip_serializing_if = "Option::is_none")]
22    pub result: Option<bool>,
23    #[serde(rename = "wait_min", skip_serializing_if = "Option::is_none")]
24    pub wait_min: Option<i32>,
25    #[serde(rename = "wait_max", skip_serializing_if = "Option::is_none")]
26    pub wait_max: Option<i32>,
27}
28
29impl DummyPolicyRequest {
30    /// Dummy Policy Serializer
31    pub fn new(name: String) -> DummyPolicyRequest {
32        DummyPolicyRequest {
33            name,
34            execution_logging: None,
35            result: None,
36            wait_min: None,
37            wait_max: None,
38        }
39    }
40}
41