authentik_rust/models/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/// PolicyRequest : Policy Serializer
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct PolicyRequest {
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}
22
23impl PolicyRequest {
24 /// Policy Serializer
25 pub fn new(name: String) -> PolicyRequest {
26 PolicyRequest {
27 name,
28 execution_logging: None,
29 }
30 }
31}
32