1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
use serde::{self, Deserialize, Serialize};
use crate::helpers::Class;
pub trait Parameter {}
#[derive(Serialize, Deserialize, Debug, Clone)]
#[serde(rename_all = "camelCase")]
pub struct CommonParameter {
#[serde(rename = "_class")]
pub class: Option<String>,
pub name: String,
#[cfg(not(feature = "extra-fields-visibility"))]
#[serde(flatten)]
extra_fields: serde_json::Value,
#[cfg(feature = "extra-fields-visibility")]
#[serde(flatten)]
pub extra_fields: serde_json::Value,
}
specialize!(CommonParameter => Parameter);
impl Parameter for CommonParameter {}
#[derive(Deserialize, Debug)]
#[serde(rename_all = "camelCase")]
pub struct BooleanParameterValue {
pub name: String,
pub value: bool,
}
register_class!("hudson.model.BooleanParameterValue" => BooleanParameterValue);
impl Parameter for BooleanParameterValue {}
#[derive(Deserialize, Debug)]
#[serde(rename_all = "camelCase")]
pub struct FileParameterValue {
pub name: String,
}
register_class!("hudson.model.FileParameterValue" => FileParameterValue);
impl Parameter for FileParameterValue {}
#[derive(Deserialize, Debug)]
#[serde(rename_all = "camelCase")]
pub struct PasswordParameterValue {
pub name: String,
}
register_class!("hudson.model.PasswordParameterValue" => PasswordParameterValue);
impl Parameter for PasswordParameterValue {}
#[derive(Deserialize, Debug)]
#[serde(rename_all = "camelCase")]
pub struct RunParameterValue {
pub name: String,
pub job_name: String,
pub number: String,
}
register_class!("hudson.model.RunParameterValue" => RunParameterValue);
impl Parameter for RunParameterValue {}
#[derive(Deserialize, Debug)]
#[serde(rename_all = "camelCase")]
pub struct StringParameterValue {
pub name: String,
pub value: String,
}
register_class!("hudson.model.StringParameterValue" => StringParameterValue);
impl Parameter for StringParameterValue {}
#[derive(Deserialize, Debug)]
#[serde(rename_all = "camelCase")]
pub struct TextParameterValue {
pub name: String,
pub value: String,
}
register_class!("hudson.model.TextParameterValue" => TextParameterValue);
impl Parameter for TextParameterValue {}