sonarr_api_rs/models/
health_check_result.rs1use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
16pub enum HealthCheckResult {
17 #[serde(rename = "ok")]
18 Ok,
19 #[serde(rename = "notice")]
20 Notice,
21 #[serde(rename = "warning")]
22 Warning,
23 #[serde(rename = "error")]
24 Error,
25
26}
27
28impl std::fmt::Display for HealthCheckResult {
29 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
30 match self {
31 Self::Ok => write!(f, "ok"),
32 Self::Notice => write!(f, "notice"),
33 Self::Warning => write!(f, "warning"),
34 Self::Error => write!(f, "error"),
35 }
36 }
37}
38
39impl Default for HealthCheckResult {
40 fn default() -> HealthCheckResult {
41 Self::Ok
42 }
43}
44