use crate::common;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct DanglingIndex {
#[serde(rename = "node_ids")]
pub node_ids: common::Ids,
#[serde(rename = "index_uuid")]
pub index_uuid: String,
#[serde(rename = "index_name")]
pub index_name: String,
#[serde(rename = "creation_date_millis")]
pub creation_date_millis: String, #[serde(rename = "creation_date", default, skip_serializing_if = "Option::is_none")]
pub creation_date: Option<common::DateTime>,
}
impl DanglingIndex {
pub fn new(node_ids: common::Ids, index_uuid: String, index_name: String, creation_date_millis: String) -> DanglingIndex {
DanglingIndex {
node_ids,
index_uuid,
index_name,
creation_date_millis,
creation_date: None,
}
}
}