use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CommandAllocatePrimaryAction {
#[serde(rename = "index")]
pub index: String,
#[serde(rename = "node")]
pub node: String, #[serde(rename = "accept_data_loss")]
pub accept_data_loss: bool,
#[serde(rename = "shard")]
pub shard: u32,
}
impl CommandAllocatePrimaryAction {
pub fn new(index: String, node: String, accept_data_loss: bool, shard: u32) -> CommandAllocatePrimaryAction {
CommandAllocatePrimaryAction {
index,
node,
accept_data_loss,
shard,
}
}
}