Skip to main content

hanzo_client/models/
settings_req.rs

1/*
2 * Hanzo Cloud API
3 *
4 * The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
5 *
6 * The version of the OpenAPI document: v1
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct SettingsReq {
16    /// Config is the product's non-secret configuration, stored verbatim. Bounded at 64 KiB once serialized. Omit it to store an empty object.
17    #[serde(rename = "config", skip_serializing_if = "Option::is_none")]
18    pub config: Option<std::collections::HashMap<String, serde_json::Value>>,
19    /// Product is the catalog slug, from the PATH. zip binds the path last, so the URL names the product being written whatever a body field claims.
20    #[serde(rename = "product", skip_serializing_if = "Option::is_none")]
21    pub product: Option<String>,
22    /// Secrets are the secret fields, by name. Each VALUE is sealed into KMS and never reaches this deployment's database; a value that is empty or equal to the mask the read path returns means \"unchanged\" and is skipped, so a console round-trip cannot blank a stored secret. A key must match ^[a-z0-9][a-z0-9._-]{0,62}$, a value is bounded at 8 KiB, and an org may hold at most 64 secret fields per product.
23    #[serde(rename = "secrets", skip_serializing_if = "Option::is_none")]
24    pub secrets: Option<std::collections::HashMap<String, String>>,
25}
26
27impl SettingsReq {
28    pub fn new() -> SettingsReq {
29        SettingsReq {
30            config: None,
31            product: None,
32            secrets: None,
33        }
34    }
35}
36