use serde::{Deserialize, Serialize};
use utoipa::ToSchema;
#[derive(Debug, Serialize, Deserialize, ToSchema)]
pub struct CompletionTokenResponse {
pub token: String,
}
impl CompletionTokenResponse {
pub fn new(token: String) -> Self {
Self { token }
}
}
#[derive(Clone, Debug, PartialEq, Deserialize, ToSchema)]
pub struct CompletionStatusArgs {
pub token: String,
}
#[derive(Debug, Serialize, Deserialize, ToSchema, PartialEq, Eq)]
pub enum CompletionStatus {
#[serde(rename = "complete")]
Complete,
#[serde(rename = "inprogress")]
InProgress,
}
#[derive(Debug, Serialize, Deserialize, ToSchema)]
pub struct CompletionStatusResponse {
pub status: CompletionStatus,
}
impl CompletionStatusResponse {
pub fn complete() -> Self {
Self {
status: CompletionStatus::Complete,
}
}
pub fn inprogress() -> Self {
Self {
status: CompletionStatus::InProgress,
}
}
}