authentik_rust/models/
reputation_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/// ReputationPolicyRequest : Reputation Policy Serializer
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct ReputationPolicyRequest {
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 = "check_ip", skip_serializing_if = "Option::is_none")]
22    pub check_ip: Option<bool>,
23    #[serde(rename = "check_username", skip_serializing_if = "Option::is_none")]
24    pub check_username: Option<bool>,
25    #[serde(rename = "threshold", skip_serializing_if = "Option::is_none")]
26    pub threshold: Option<i32>,
27}
28
29impl ReputationPolicyRequest {
30    /// Reputation Policy Serializer
31    pub fn new(name: String) -> ReputationPolicyRequest {
32        ReputationPolicyRequest {
33            name,
34            execution_logging: None,
35            check_ip: None,
36            check_username: None,
37            threshold: None,
38        }
39    }
40}
41