use serde::{self, Deserialize, Serialize};
use crate::helpers::Class;
pub mod causes;
pub mod git;
pub mod maven;
pub mod parameters;
pub mod pipeline;
pub trait Action {}
#[derive(Serialize, Deserialize, Debug, Clone)]
#[serde(rename_all = "camelCase")]
pub struct CommonAction {
#[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!(CommonAction => Action);
impl Action for CommonAction {}
#[derive(Deserialize, Debug)]
#[serde(rename_all = "camelCase")]
pub struct ParametersAction {
pub parameters: Vec<parameters::CommonParameter>,
}
register_class!("hudson.model.ParametersAction" => ParametersAction);
impl Action for ParametersAction {}
#[derive(Deserialize, Debug)]
#[serde(rename_all = "camelCase")]
pub struct CauseAction {
pub causes: Vec<causes::CommonCause>,
}
register_class!("hudson.model.CauseAction" => CauseAction);
impl Action for CauseAction {}
#[derive(Deserialize, Debug)]
#[serde(rename_all = "camelCase")]
pub struct GitBuildData {
pub scm_name: String,
pub last_built_revision: git::Revision,
pub remote_urls: Vec<String>,
pub builds_by_branch_name: git::BuildsByBranch,
}
register_class!("hudson.plugins.git.util.BuildData" => GitBuildData);
impl Action for GitBuildData {}
#[derive(Deserialize, Debug, Copy, Clone)]
#[serde(rename_all = "camelCase")]
pub struct GitTagAction {}
register_class!("hudson.plugins.git.GitTagAction" => GitTagAction);
impl Action for GitTagAction {}
#[derive(Deserialize, Debug, Copy, Clone)]
#[serde(rename_all = "camelCase")]
pub struct RepoTagAction {}
register_class!("hudson.plugins.repo.TagAction" => RepoTagAction);
impl Action for RepoTagAction {}
#[derive(Deserialize, Debug, Copy, Clone)]
#[serde(rename_all = "camelCase")]
pub struct TimeInQueueAction {
pub queuing_duration_millis: u64,
pub total_duration_millis: u64,
}
register_class!("jenkins.metrics.impl.TimeInQueueAction" => TimeInQueueAction);
impl Action for TimeInQueueAction {}
#[derive(Deserialize, Debug, Copy, Clone)]
#[serde(rename_all = "camelCase")]
pub struct EnvActionImpl {}
register_class!("org.jenkinsci.plugins.workflow.cps.EnvActionImpl" => EnvActionImpl);
impl Action for EnvActionImpl {}
#[derive(Deserialize, Debug)]
#[serde(rename_all = "camelCase")]
pub struct FlowGraphAction {
pub nodes: Vec<pipeline::CommonPipelineNode>,
}
register_class!("org.jenkinsci.plugins.workflow.job.views.FlowGraphAction" => FlowGraphAction);
impl Action for FlowGraphAction {}
#[derive(Deserialize, Debug)]
#[serde(rename_all = "camelCase")]
pub struct MavenArtifactRecord {
pub url: String,
pub attached_artifacts: Vec<maven::Artifact>,
pub main_artifact: maven::Artifact,
pub parent: crate::build::ShortBuild,
pub pom_artifact: maven::Artifact,
}
register_class!("hudson.maven.reporters.MavenArtifactRecord" => MavenArtifactRecord);
impl Action for MavenArtifactRecord {}
#[derive(Deserialize, Debug)]
#[serde(rename_all = "camelCase")]
pub struct MavenAggregatedArtifactRecord {
pub module_records: Vec<maven::MavenArtifactRecord>,
}
register_class!("hudson.maven.reporters.MavenAggregatedArtifactRecord" => MavenAggregatedArtifactRecord);
impl Action for MavenAggregatedArtifactRecord {}
#[derive(Deserialize, Debug)]
#[serde(rename_all = "camelCase")]
pub struct SurefireReport {
pub fail_count: u32,
pub skip_count: u32,
pub total_count: u32,
pub url_name: String,
}
register_class!("hudson.maven.reporters.SurefireReport" => SurefireReport);
impl Action for SurefireReport {}
#[derive(Deserialize, Debug)]
#[serde(rename_all = "camelCase")]
pub struct SurefireAggregatedReport {
pub fail_count: u32,
pub skip_count: u32,
pub total_count: u32,
pub url_name: String,
}
register_class!("hudson.maven.reporters.SurefireAggregatedReport" => SurefireAggregatedReport);
impl Action for SurefireAggregatedReport {}
#[derive(Deserialize, Debug)]
#[serde(rename_all = "camelCase")]
pub struct PipelineApproverAction {
pub user_id: String,
}
register_class!("org.jenkinsci.plugins.workflow.support.steps.input.ApproverAction" => PipelineApproverAction);
impl Action for PipelineApproverAction {}