Skip to main content

authentik_client/models/
blueprint_instance.rs

1/*
2 * authentik
3 *
4 * Making authentication simple.
5 *
6 * The version of the OpenAPI document: 2025.10.4
7 * Contact: hello@goauthentik.io
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// BlueprintInstance : Info about a single blueprint instance file
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct BlueprintInstance {
17    #[serde(rename = "pk")]
18    pub pk: uuid::Uuid,
19    #[serde(rename = "name")]
20    pub name: String,
21    #[serde(rename = "path", skip_serializing_if = "Option::is_none")]
22    pub path: Option<String>,
23    #[serde(rename = "context", skip_serializing_if = "Option::is_none")]
24    pub context: Option<std::collections::HashMap<String, serde_json::Value>>,
25    #[serde(rename = "last_applied")]
26    pub last_applied: String,
27    #[serde(rename = "last_applied_hash")]
28    pub last_applied_hash: String,
29    #[serde(rename = "status")]
30    pub status: models::BlueprintInstanceStatusEnum,
31    #[serde(rename = "enabled", skip_serializing_if = "Option::is_none")]
32    pub enabled: Option<bool>,
33    #[serde(rename = "managed_models")]
34    pub managed_models: Vec<String>,
35    #[serde(rename = "metadata")]
36    pub metadata: std::collections::HashMap<String, serde_json::Value>,
37    #[serde(rename = "content", skip_serializing_if = "Option::is_none")]
38    pub content: Option<String>,
39}
40
41impl BlueprintInstance {
42    /// Info about a single blueprint instance file
43    pub fn new(
44        pk: uuid::Uuid,
45        name: String,
46        last_applied: String,
47        last_applied_hash: String,
48        status: models::BlueprintInstanceStatusEnum,
49        managed_models: Vec<String>,
50        metadata: std::collections::HashMap<String, serde_json::Value>,
51    ) -> BlueprintInstance {
52        BlueprintInstance {
53            pk,
54            name,
55            path: None,
56            context: None,
57            last_applied,
58            last_applied_hash,
59            status,
60            enabled: None,
61            managed_models,
62            metadata,
63            content: None,
64        }
65    }
66}