authentik_rust/models/
type_create.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/// TypeCreate : Types of an object that can be created
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct TypeCreate {
16    #[serde(rename = "name")]
17    pub name: String,
18    #[serde(rename = "description")]
19    pub description: String,
20    #[serde(rename = "component")]
21    pub component: String,
22    #[serde(rename = "model_name")]
23    pub model_name: String,
24    #[serde(rename = "requires_enterprise", skip_serializing_if = "Option::is_none")]
25    pub requires_enterprise: Option<bool>,
26}
27
28impl TypeCreate {
29    /// Types of an object that can be created
30    pub fn new(name: String, description: String, component: String, model_name: String) -> TypeCreate {
31        TypeCreate {
32            name,
33            description,
34            component,
35            model_name,
36            requires_enterprise: None,
37        }
38    }
39}
40