Skip to main content

windmill_api/models/
edit_variable.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.896.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 EditVariable {
16    /// The path to the variable
17    #[serde(rename = "path", skip_serializing_if = "Option::is_none")]
18    pub path: Option<String>,
19    /// The new value of the variable. Accepts an `$external:vault://<path>[#<key>]` reference for a secret, as in CreateVariable.
20    #[serde(rename = "value", skip_serializing_if = "Option::is_none")]
21    pub value: Option<String>,
22    /// Whether the variable is a secret
23    #[serde(rename = "is_secret", skip_serializing_if = "Option::is_none")]
24    pub is_secret: Option<bool>,
25    /// The new description of the variable
26    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
27    pub description: Option<String>,
28    /// When the value stored in this variable stops working. Omit to leave it unchanged; send null to clear it. Changing it re-arms the workspace's variable expiration handler. 
29    #[serde(rename = "value_valid_until", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
30    pub value_valid_until: Option<Option<String>>,
31    /// Detach the OAuth account the variable refreshes through, deleting it when no other variable uses it.
32    #[serde(rename = "unlink_account", skip_serializing_if = "Option::is_none")]
33    pub unlink_account: Option<bool>,
34    #[serde(rename = "labels", skip_serializing_if = "Option::is_none")]
35    pub labels: Option<Vec<String>>,
36    #[serde(rename = "ws_specific", skip_serializing_if = "Option::is_none")]
37    pub ws_specific: Option<bool>,
38}
39
40impl EditVariable {
41    pub fn new() -> EditVariable {
42        EditVariable {
43            path: None,
44            value: None,
45            is_secret: None,
46            description: None,
47            value_valid_until: None,
48            unlink_account: None,
49            labels: None,
50            ws_specific: None,
51        }
52    }
53}
54