Skip to main content

windmill_api/models/
azure_key_vault_settings.rs

1/*
2 * Windmill API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 1.677.0
7 * Contact: contact@windmill.dev
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 AzureKeyVaultSettings {
16    /// Azure Key Vault URL (e.g., https://myvault.vault.azure.net)
17    #[serde(rename = "vault_url")]
18    pub vault_url: String,
19    /// Azure AD tenant ID
20    #[serde(rename = "tenant_id")]
21    pub tenant_id: String,
22    /// Azure AD application (client) ID
23    #[serde(rename = "client_id")]
24    pub client_id: String,
25    /// Azure AD client secret
26    #[serde(rename = "client_secret", skip_serializing_if = "Option::is_none")]
27    pub client_secret: Option<String>,
28    /// Static Bearer token for testing/development (optional, if provided this is used instead of OAuth2 authentication)
29    #[serde(rename = "token", skip_serializing_if = "Option::is_none")]
30    pub token: Option<String>,
31}
32
33impl AzureKeyVaultSettings {
34    pub fn new(vault_url: String, tenant_id: String, client_id: String) -> AzureKeyVaultSettings {
35        AzureKeyVaultSettings {
36            vault_url,
37            tenant_id,
38            client_id,
39            client_secret: None,
40            token: None,
41        }
42    }
43}
44