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
use serde::{self, Deserialize, Serialize};
use crate::helpers::Class;
mod browser;
pub use self::browser::*;
#[derive(Default, Deserialize, Debug)]
#[serde(rename_all = "camelCase")]
pub struct MergeOptions {
merge_strategy: String,
fast_forward_mode: String,
merge_target: Option<String>,
remote_branch_name: Option<String>,
}
pub trait SCM {}
#[derive(Serialize, Deserialize, Debug, Clone)]
#[serde(rename_all = "camelCase")]
pub struct CommonSCM {
#[serde(rename = "_class")]
pub class: Option<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!(CommonSCM => SCM);
impl SCM for CommonSCM {}
#[derive(Deserialize, Debug)]
#[serde(rename_all = "camelCase")]
pub struct NullSCM {
pub browser: Option<CommonBrowser>,
}
register_class!("hudson.scm.NullSCM" => NullSCM);
impl SCM for NullSCM {}
#[derive(Deserialize, Debug)]
#[serde(rename_all = "camelCase")]
pub struct GitSCM {
pub browser: Option<CommonBrowser>,
pub merge_options: MergeOptions,
}
register_class!("hudson.plugins.git.GitSCM" => GitSCM);
impl SCM for GitSCM {}