authentik_rust/models/
outpost_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/// OutpostRequest : Outpost Serializer
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct OutpostRequest {
16    #[serde(rename = "name")]
17    pub name: String,
18    #[serde(rename = "type")]
19    pub r#type: models::OutpostTypeEnum,
20    #[serde(rename = "providers")]
21    pub providers: Vec<i32>,
22    /// Select Service-Connection authentik should use to manage this outpost. Leave empty if authentik should not handle the deployment.
23    #[serde(rename = "service_connection", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
24    pub service_connection: Option<Option<uuid::Uuid>>,
25    #[serde(rename = "config")]
26    pub config: std::collections::HashMap<String, serde_json::Value>,
27    /// 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.
28    #[serde(rename = "managed", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
29    pub managed: Option<Option<String>>,
30}
31
32impl OutpostRequest {
33    /// Outpost Serializer
34    pub fn new(name: String, r#type: models::OutpostTypeEnum, providers: Vec<i32>, config: std::collections::HashMap<String, serde_json::Value>) -> OutpostRequest {
35        OutpostRequest {
36            name,
37            r#type,
38            providers,
39            service_connection: None,
40            config,
41            managed: None,
42        }
43    }
44}
45