Skip to main content

nautobot_openapi/models/
job_variable.rs

1/*
2 * API Documentation
3 *
4 * Source of truth and network automation platform
5 *
6 * The version of the OpenAPI document: 3.1.0 (3.1)
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11/// JobVariable : Serializer used for responses from the JobModelViewSet.variables() detail endpoint.
12
13#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct JobVariable {
15    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
16    pub name: Option<String>,
17    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
18    pub r#type: Option<String>,
19    #[serde(rename = "label", skip_serializing_if = "Option::is_none")]
20    pub label: Option<String>,
21    #[serde(rename = "help_text", skip_serializing_if = "Option::is_none")]
22    pub help_text: Option<String>,
23    #[serde(
24        rename = "default",
25        default,
26        with = "::serde_with::rust::double_option",
27        skip_serializing_if = "Option::is_none"
28    )]
29    pub default: Option<Option<serde_json::Value>>,
30    #[serde(rename = "required", skip_serializing_if = "Option::is_none")]
31    pub required: Option<bool>,
32    #[serde(rename = "min_length", skip_serializing_if = "Option::is_none")]
33    pub min_length: Option<i32>,
34    #[serde(rename = "max_length", skip_serializing_if = "Option::is_none")]
35    pub max_length: Option<i32>,
36    #[serde(rename = "min_value", skip_serializing_if = "Option::is_none")]
37    pub min_value: Option<i32>,
38    #[serde(rename = "max_value", skip_serializing_if = "Option::is_none")]
39    pub max_value: Option<i32>,
40    #[serde(
41        rename = "choices",
42        default,
43        with = "::serde_with::rust::double_option",
44        skip_serializing_if = "Option::is_none"
45    )]
46    pub choices: Option<Option<serde_json::Value>>,
47    #[serde(rename = "model", skip_serializing_if = "Option::is_none")]
48    pub model: Option<String>,
49}
50
51impl JobVariable {
52    /// Serializer used for responses from the JobModelViewSet.variables() detail endpoint.
53    pub fn new() -> JobVariable {
54        JobVariable {
55            name: None,
56            r#type: None,
57            label: None,
58            help_text: None,
59            default: None,
60            required: None,
61            min_length: None,
62            max_length: None,
63            min_value: None,
64            max_value: None,
65            choices: None,
66            model: None,
67        }
68    }
69}