Skip to main content

orvanta_api/models/
process_status_value.rs

1/*
2 * Orvanta API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 1.7.1
7 * Contact: contact@orvanta.cloud
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// ProcessStatusValue : overall status of one process instance, as surfaced to the frontend
15/// overall status of one process instance, as surfaced to the frontend
16#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17pub enum ProcessStatusValue {
18    #[serde(rename = "running")]
19    Running,
20    #[serde(rename = "completed")]
21    Completed,
22    #[serde(rename = "failed")]
23    Failed,
24    #[serde(rename = "suspended")]
25    Suspended,
26    #[serde(rename = "canceled")]
27    Canceled,
28
29}
30
31impl std::fmt::Display for ProcessStatusValue {
32    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
33        match self {
34            Self::Running => write!(f, "running"),
35            Self::Completed => write!(f, "completed"),
36            Self::Failed => write!(f, "failed"),
37            Self::Suspended => write!(f, "suspended"),
38            Self::Canceled => write!(f, "canceled"),
39        }
40    }
41}
42
43impl Default for ProcessStatusValue {
44    fn default() -> ProcessStatusValue {
45        Self::Running
46    }
47}
48