Skip to main content

orvanta_api/models/
process_activity_runtime_state.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.6.0
7 * Contact: contact@orvanta.cloud
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// ProcessActivityRuntimeState : runtime state of one BPMN element, as surfaced to the frontend overlay
15/// runtime state of one BPMN element, as surfaced to the frontend overlay
16#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17pub enum ProcessActivityRuntimeState {
18    #[serde(rename = "active")]
19    Active,
20    #[serde(rename = "completed")]
21    Completed,
22    #[serde(rename = "failed")]
23    Failed,
24    #[serde(rename = "terminated")]
25    Terminated,
26
27}
28
29impl std::fmt::Display for ProcessActivityRuntimeState {
30    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
31        match self {
32            Self::Active => write!(f, "active"),
33            Self::Completed => write!(f, "completed"),
34            Self::Failed => write!(f, "failed"),
35            Self::Terminated => write!(f, "terminated"),
36        }
37    }
38}
39
40impl Default for ProcessActivityRuntimeState {
41    fn default() -> ProcessActivityRuntimeState {
42        Self::Active
43    }
44}
45