gitea_client/models/update_variable_option.rs
1/*
2 * Gitea API
3 *
4 * This documentation describes the Gitea API.
5 *
6 * The version of the OpenAPI document: 1.22.1
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// UpdateVariableOption : UpdateVariableOption the option when updating variable
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct UpdateVariableOption {
17 /// New name for the variable. If the field is empty, the variable name won't be updated.
18 #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
19 pub name: Option<String>,
20 /// Value of the variable to update
21 #[serde(rename = "value")]
22 pub value: String,
23}
24
25impl UpdateVariableOption {
26 /// UpdateVariableOption the option when updating variable
27 pub fn new(value: String) -> UpdateVariableOption {
28 UpdateVariableOption {
29 name: None,
30 value,
31 }
32 }
33}
34