windmill-api 1.683.1

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.683.1
 * Contact: contact@windmill.dev
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CreateVariable {
    /// The path to the variable
    #[serde(rename = "path")]
    pub path: String,
    /// The value of the variable
    #[serde(rename = "value")]
    pub value: String,
    /// Whether the variable is a secret
    #[serde(rename = "is_secret")]
    pub is_secret: bool,
    /// The description of the variable
    #[serde(rename = "description")]
    pub description: String,
    /// The account identifier
    #[serde(rename = "account", skip_serializing_if = "Option::is_none")]
    pub account: Option<i32>,
    /// Whether the variable is an OAuth variable
    #[serde(rename = "is_oauth", skip_serializing_if = "Option::is_none")]
    pub is_oauth: Option<bool>,
    /// The expiration date of the variable
    #[serde(rename = "expires_at", skip_serializing_if = "Option::is_none")]
    pub expires_at: Option<String>,
    #[serde(rename = "labels", skip_serializing_if = "Option::is_none")]
    pub labels: Option<Vec<String>>,
}

impl CreateVariable {
    pub fn new(path: String, value: String, is_secret: bool, description: String) -> CreateVariable {
        CreateVariable {
            path,
            value,
            is_secret,
            description,
            account: None,
            is_oauth: None,
            expires_at: None,
            labels: None,
        }
    }
}