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
use helpers::Class;

use super::{BuildableJob, Job, SCMPollable, ShortJob};
use action::CommonAction;
use build::ShortBuild;
use property::CommonProperty;
use queue::ShortQueueItem;
use scm::CommonSCM;

use build::{MatrixBuild, MatrixRun};

use super::{BallColor, HealthReport};

job_build_with_common_fields_and_impl!(/// A matrix project
#[derive(Deserialize, Debug)]
#[serde(rename_all = "camelCase")]
pub struct MatrixProject<BuildType = MatrixBuild> {
    /// Description of the job
    pub description: String,
    /// Is concurrent build enabled for the job?
    pub concurrent_build: bool,
    /// SCM configured for the job
    pub scm: CommonSCM,
    /// Configurations for the job
    pub active_configurations: Vec<ShortJob<MatrixConfiguration>>,
    /// List of the upstream projects
    pub upstream_projects: Vec<ShortJob>,
    /// List of the downstream projects
    pub downstream_projects: Vec<ShortJob>,
    /// Label expression
    pub label_expression: Option<String>,
});
register_class!("hudson.matrix.MatrixProject" => MatrixProject);

impl BuildableJob for MatrixProject {}
impl SCMPollable for MatrixProject {}

job_build_with_common_fields_and_impl!(/// A matrix configuration
#[derive(Deserialize, Debug)]
#[serde(rename_all = "camelCase")]
pub struct MatrixConfiguration<BuildType = MatrixRun> {
    /// Description of the job
    pub description: Option<String>,
    /// Is concurrent build enabled for the job?
    pub concurrent_build: bool,
    /// SCM configured for the job
    pub scm: CommonSCM,
    /// List of the upstream projects
    pub upstream_projects: Vec<ShortJob>,
    /// List of the downstream projects
    pub downstream_projects: Vec<ShortJob>,
    /// Label expression
    pub label_expression: Option<String>,
});
register_class!("hudson.matrix.MatrixConfiguration" => MatrixConfiguration);

impl MatrixConfiguration {}