use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct GetIndexerStatus200ResponseJobIndexer {
#[serde(rename = "is_alive", skip_serializing_if = "Option::is_none")]
pub is_alive: Option<bool>,
#[serde(rename = "state", skip_serializing_if = "Option::is_none")]
pub state: Option<State>,
#[serde(rename = "last_locked_at", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub last_locked_at: Option<Option<String>>,
#[serde(rename = "owner", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
pub owner: Option<Option<String>>,
#[serde(rename = "storage", skip_serializing_if = "Option::is_none")]
pub storage: Option<Box<models::GetIndexStorageSizes200ResponseJobIndex>>,
}
impl GetIndexerStatus200ResponseJobIndexer {
pub fn new() -> GetIndexerStatus200ResponseJobIndexer {
GetIndexerStatus200ResponseJobIndexer {
is_alive: None,
state: None,
last_locked_at: None,
owner: None,
storage: None,
}
}
}
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum State {
#[serde(rename = "running")]
Running,
#[serde(rename = "stale")]
Stale,
#[serde(rename = "never_started")]
NeverStarted,
}
impl Default for State {
fn default() -> State {
Self::Running
}
}