nomy_data_models/enums/
processing_state.rs

1#![allow(clippy::too_many_arguments, unused_imports, non_camel_case_types)]
2//! ProcessingState enum definition.
3//!
4//! This file is generated automatically from the Python enum.
5//! Do not edit this file manually.
6
7use serde::{Deserialize, Serialize};
8
9/// Enum for service processing states.
10#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
11pub enum ProcessingState {
12    #[serde(rename = "pending")]
13    PENDING,
14    #[serde(rename = "running")]
15    RUNNING,
16    #[serde(rename = "completed")]
17    COMPLETED,
18    #[serde(rename = "failed")]
19    FAILED,
20}
21
22impl ProcessingState {
23    /// Convert to string representation.
24    pub fn as_str(&self) -> &'static str {
25        match self {
26            ProcessingState::PENDING => "pending",
27            ProcessingState::RUNNING => "running",
28            ProcessingState::COMPLETED => "completed",
29            ProcessingState::FAILED => "failed",
30        }
31    }
32}