use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ReservedSize {
#[serde(rename = "total")]
pub total: u32,
#[serde(rename = "path")]
pub path: String,
#[serde(rename = "shards")]
pub shards: Vec<String>,
#[serde(rename = "node_id")]
pub node_id: String,
}
impl ReservedSize {
pub fn new(total: u32, path: String, shards: Vec<String>, node_id: String) -> ReservedSize {
ReservedSize {
total,
path,
shards,
node_id,
}
}
}