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#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
14pub struct CommandCancelAction {
15    #[serde(rename = "index")]
16    pub index: String,
17    #[serde(rename = "node")]
18    pub node: String,
19    #[serde(rename = "shard")]
20    pub shard: u32,
21    #[serde(
22        rename = "allow_primary",
23        default,
24        skip_serializing_if = "Option::is_none"
25    )]
26    pub allow_primary: Option<bool>,
27}
28
29impl CommandCancelAction {
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}