authentik_rust/models/
policy_test_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/// PolicyTestRequest : Test policy execution for a user with context
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct PolicyTestRequest {
16    #[serde(rename = "user")]
17    pub user: i32,
18    #[serde(rename = "context", skip_serializing_if = "Option::is_none")]
19    pub context: Option<std::collections::HashMap<String, serde_json::Value>>,
20}
21
22impl PolicyTestRequest {
23    /// Test policy execution for a user with context
24    pub fn new(user: i32) -> PolicyTestRequest {
25        PolicyTestRequest {
26            user,
27            context: None,
28        }
29    }
30}
31