static_tr_plugin/
config.rs1use serde::Deserialize;
4use tenant_resolver_sdk::TenantStatus;
5use uuid::Uuid;
6
7#[derive(Debug, Clone, Deserialize)]
9#[serde(default, deny_unknown_fields)]
10pub struct StaticTrPluginConfig {
11 pub vendor: String,
13
14 pub priority: i16,
16
17 pub tenants: Vec<TenantConfig>,
19}
20
21impl Default for StaticTrPluginConfig {
22 fn default() -> Self {
23 Self {
24 vendor: "hyperspot".to_owned(),
25 priority: 100,
26 tenants: Vec::new(),
27 }
28 }
29}
30
31#[derive(Debug, Clone, Deserialize)]
33#[serde(deny_unknown_fields)]
34pub struct TenantConfig {
35 pub id: Uuid,
37
38 pub name: String,
40
41 #[serde(default)]
43 pub status: TenantStatus,
44
45 #[serde(rename = "type", default)]
47 pub tenant_type: Option<String>,
48
49 #[serde(default)]
51 pub parent_id: Option<Uuid>,
52
53 #[serde(default)]
57 pub self_managed: bool,
58}