windmill-api 1.864.0

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
Documentation
/*
 * Windmill API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.864.0
 * Contact: contact@windmill.dev
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// HttpStoreSettings : Read-only secret backend for any secret store with an HTTP API. A secret variable saved with an empty value references the store key derived from its workspace and path.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct HttpStoreSettings {
    /// Scheme, host and optional path prefix of the store
    #[serde(rename = "base_url")]
    pub base_url: String,
    #[serde(rename = "read")]
    pub read: Box<models::HttpStoreSettingsRead>,
    /// How a variable path becomes a store key (default url)
    #[serde(rename = "path_encoding", skip_serializing_if = "Option::is_none")]
    pub path_encoding: Option<PathEncoding>,
    #[serde(rename = "extra_headers", skip_serializing_if = "Option::is_none")]
    pub extra_headers: Option<std::collections::HashMap<String, String>>,
    #[serde(rename = "auth")]
    pub auth: Box<models::HttpStoreAuth>,
    /// PEM bundle of additional CA certificates trusted for the store
    #[serde(rename = "ca_bundle_path", skip_serializing_if = "Option::is_none")]
    pub ca_bundle_path: Option<String>,
    #[serde(rename = "timeout_secs", skip_serializing_if = "Option::is_none")]
    pub timeout_secs: Option<i32>,
    #[serde(rename = "skip_ssl_verify", skip_serializing_if = "Option::is_none")]
    pub skip_ssl_verify: Option<bool>,
}

impl HttpStoreSettings {
    /// Read-only secret backend for any secret store with an HTTP API. A secret variable saved with an empty value references the store key derived from its workspace and path.
    pub fn new(base_url: String, read: models::HttpStoreSettingsRead, auth: models::HttpStoreAuth) -> HttpStoreSettings {
        HttpStoreSettings {
            base_url,
            read: Box::new(read),
            path_encoding: None,
            extra_headers: None,
            auth: Box::new(auth),
            ca_bundle_path: None,
            timeout_secs: None,
            skip_ssl_verify: None,
        }
    }
}
/// How a variable path becomes a store key (default url)
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum PathEncoding {
    #[serde(rename = "url")]
    Url,
    #[serde(rename = "double_dash")]
    DoubleDash,
    #[serde(rename = "raw")]
    Raw,
}

impl Default for PathEncoding {
    fn default() -> PathEncoding {
        Self::Url
    }
}