Skip to main content

mistral_openapi_client/models/
base_task_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 BaseTaskStatus {
17    #[serde(rename = "RUNNING")]
18    Running,
19    #[serde(rename = "COMPLETED")]
20    Completed,
21    #[serde(rename = "FAILED")]
22    Failed,
23    #[serde(rename = "CANCELED")]
24    Canceled,
25    #[serde(rename = "TERMINATED")]
26    Terminated,
27    #[serde(rename = "CONTINUED_AS_NEW")]
28    ContinuedAsNew,
29    #[serde(rename = "TIMED_OUT")]
30    TimedOut,
31    #[serde(rename = "UNKNOWN")]
32    Unknown,
33
34}
35
36impl std::fmt::Display for BaseTaskStatus {
37    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
38        match self {
39            Self::Running => write!(f, "RUNNING"),
40            Self::Completed => write!(f, "COMPLETED"),
41            Self::Failed => write!(f, "FAILED"),
42            Self::Canceled => write!(f, "CANCELED"),
43            Self::Terminated => write!(f, "TERMINATED"),
44            Self::ContinuedAsNew => write!(f, "CONTINUED_AS_NEW"),
45            Self::TimedOut => write!(f, "TIMED_OUT"),
46            Self::Unknown => write!(f, "UNKNOWN"),
47        }
48    }
49}
50
51impl Default for BaseTaskStatus {
52    fn default() -> BaseTaskStatus {
53        Self::Running
54    }
55}
56