Skip to main content

opensearch_client/cluster/reroute/
command_cancel_action.rs

1/*
2 * opensearch-client
3 *
4 * Rust Client for OpenSearch
5 *
6 * The version of the OpenAPI document: 3.1.0
7 * Contact: alberto.paro@gmail.com
8 * Generated by Paro OpenAPI Generator
9 */
10
11use 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}