authentik_client/models/
scope_mapping_request.rs

1/*
2 * authentik
3 *
4 * Making authentication simple.
5 *
6 * The version of the OpenAPI document: 2025.10.2
7 * Contact: hello@goauthentik.io
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// ScopeMappingRequest : ScopeMapping Serializer
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct ScopeMappingRequest {
17    /// Objects that are managed by authentik. These objects are created and updated automatically. This flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update.
18    #[serde(
19        rename = "managed",
20        default,
21        with = "::serde_with::rust::double_option",
22        skip_serializing_if = "Option::is_none"
23    )]
24    pub managed: Option<Option<String>>,
25    #[serde(rename = "name")]
26    pub name: String,
27    #[serde(rename = "expression")]
28    pub expression: String,
29    /// Scope name requested by the client
30    #[serde(rename = "scope_name")]
31    pub scope_name: String,
32    /// Description shown to the user when consenting. If left empty, the user won't be informed.
33    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
34    pub description: Option<String>,
35}
36
37impl ScopeMappingRequest {
38    /// ScopeMapping Serializer
39    pub fn new(name: String, expression: String, scope_name: String) -> ScopeMappingRequest {
40        ScopeMappingRequest {
41            managed: None,
42            name,
43            expression,
44            scope_name,
45            description: None,
46        }
47    }
48}