Skip to main content

mistral_openapi_client/models/
batch_job_status.rs

1/*
2 * Mistral AI API
3 *
4 * Our Chat Completion and Embeddings APIs specification. Create your account on [La Plateforme](https://console.mistral.ai) to get access and read the [docs](https://docs.mistral.ai) to learn how to use it.
5 *
6 * The version of the OpenAPI document: 1.0.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// 
15#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
16pub enum BatchJobStatus {
17    #[serde(rename = "QUEUED")]
18    Queued,
19    #[serde(rename = "RUNNING")]
20    Running,
21    #[serde(rename = "SUCCESS")]
22    Success,
23    #[serde(rename = "FAILED")]
24    Failed,
25    #[serde(rename = "TIMEOUT_EXCEEDED")]
26    TimeoutExceeded,
27    #[serde(rename = "CANCELLATION_REQUESTED")]
28    CancellationRequested,
29    #[serde(rename = "CANCELLED")]
30    Cancelled,
31
32}
33
34impl std::fmt::Display for BatchJobStatus {
35    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
36        match self {
37            Self::Queued => write!(f, "QUEUED"),
38            Self::Running => write!(f, "RUNNING"),
39            Self::Success => write!(f, "SUCCESS"),
40            Self::Failed => write!(f, "FAILED"),
41            Self::TimeoutExceeded => write!(f, "TIMEOUT_EXCEEDED"),
42            Self::CancellationRequested => write!(f, "CANCELLATION_REQUESTED"),
43            Self::Cancelled => write!(f, "CANCELLED"),
44        }
45    }
46}
47
48impl Default for BatchJobStatus {
49    fn default() -> BatchJobStatus {
50        Self::Queued
51    }
52}
53