use crate::{
model::artifacts::ArtifactChecksumRecord, policy::execution_progress::ExecutionProgressView,
};
use serde::Serialize;
#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
pub struct ExecutionWorkflowProgressView {
pub workflow: ArtifactChecksumRecord,
pub stages: Vec<ExecutionStageProgressView>,
}
#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
pub struct ExecutionStageProgressView {
pub stage_sequence: u64,
pub state: ExecutionStageProgressState,
}
#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
#[serde(tag = "state", rename_all = "snake_case")]
pub enum ExecutionStageProgressState {
Unprepared,
Prepared {
binding: ArtifactChecksumRecord,
progress: Box<ExecutionProgressView>,
},
}