opensearch_client/cluster/reroute/
command_cancel_action.rs1use serde::{Deserialize, Serialize};
12
13
14
15
16#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
17pub struct CommandCancelAction {
18 #[serde(rename = "index")]
19 pub index: String,
20 #[serde(rename = "node")]
21 pub node: String,
22 #[serde(rename = "shard")]
23 pub shard: u32,
24 #[serde(rename = "allow_primary", default, skip_serializing_if = "Option::is_none")]
25 pub allow_primary: Option<bool>,
26}
27
28impl CommandCancelAction {
29
30 pub fn new(index: String, node: String, shard: u32) -> CommandCancelAction {
31 CommandCancelAction {
32 index,
33 node,
34 shard,
35 allow_primary: None,
36 }
37 }
38}