use clap::Parser;
use mogh_resolver::Resolve;
use serde::{Deserialize, Serialize};
use typeshare::typeshare;
use crate::entities::update::Update;
use super::{BatchExecutionResponse, KomodoExecuteRequest};
#[cfg(feature = "utoipa")]
#[utoipa::path(
post,
path = "/RunBuild",
description = "Runs the target build.",
request_body(content = RunBuild),
responses(
(status = 200, description = "The update", body = Update),
),
)]
pub fn run_build() {}
#[typeshare]
#[derive(
Debug, Clone, PartialEq, Serialize, Deserialize, Resolve, Parser,
)]
#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
#[empty_traits(KomodoExecuteRequest)]
#[response(Update)]
#[error(mogh_error::Error)]
pub struct RunBuild {
pub build: String,
}
#[cfg(feature = "utoipa")]
#[utoipa::path(
post,
path = "/BatchRunBuild",
description = "Runs multiple builds in parallel that match pattern.",
request_body(content = BatchRunBuild),
responses(
(status = 200, description = "The batch execution response", body = BatchExecutionResponse),
),
)]
pub fn batch_run_build() {}
#[typeshare]
#[derive(
Debug, Clone, PartialEq, Serialize, Deserialize, Resolve, Parser,
)]
#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
#[empty_traits(KomodoExecuteRequest)]
#[response(BatchExecutionResponse)]
#[error(mogh_error::Error)]
pub struct BatchRunBuild {
pub pattern: String,
}
#[cfg(feature = "utoipa")]
#[utoipa::path(
post,
path = "/CancelBuild",
description = "Cancels the target build.",
request_body(content = CancelBuild),
responses(
(status = 200, description = "The update", body = Update),
),
)]
pub fn cancel_build() {}
#[typeshare]
#[derive(
Serialize, Deserialize, Debug, Clone, PartialEq, Resolve, Parser,
)]
#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
#[empty_traits(KomodoExecuteRequest)]
#[response(Update)]
#[error(mogh_error::Error)]
pub struct CancelBuild {
pub build: String,
}