windmill_api/models/
create_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.500.2
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 CreateVariable {
16    #[serde(rename = "path")]
17    pub path: String,
18    #[serde(rename = "value")]
19    pub value: String,
20    #[serde(rename = "is_secret")]
21    pub is_secret: bool,
22    #[serde(rename = "description")]
23    pub description: String,
24    #[serde(rename = "account", skip_serializing_if = "Option::is_none")]
25    pub account: Option<i32>,
26    #[serde(rename = "is_oauth", skip_serializing_if = "Option::is_none")]
27    pub is_oauth: Option<bool>,
28    #[serde(rename = "expires_at", skip_serializing_if = "Option::is_none")]
29    pub expires_at: Option<String>,
30}
31
32impl CreateVariable {
33    pub fn new(path: String, value: String, is_secret: bool, description: String) -> CreateVariable {
34        CreateVariable {
35            path,
36            value,
37            is_secret,
38            description,
39            account: None,
40            is_oauth: None,
41            expires_at: None,
42        }
43    }
44}
45