windmill_api/models/set_environment_variable_request.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.792.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 SetEnvironmentVariableRequest {
16 /// Environment variable name. New names must be a plain JS identifier (matching ^[A-Za-z_$][A-Za-z0-9_$]*$) since the name is spliced into the NativeTS/Bun worker prologue; otherwise the request is rejected with 400. Existing names can still be updated regardless of shape.
17 #[serde(rename = "name")]
18 pub name: String,
19 #[serde(rename = "value", skip_serializing_if = "Option::is_none")]
20 pub value: Option<String>,
21}
22
23impl SetEnvironmentVariableRequest {
24 pub fn new(name: String) -> SetEnvironmentVariableRequest {
25 SetEnvironmentVariableRequest {
26 name,
27 value: None,
28 }
29 }
30}
31