1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*
* opensearch-client
*
* Rust Client for OpenSearch
*
* The version of the OpenAPI document: 3.1.0
* Contact: alberto.paro@gmail.com
* Generated by Paro OpenAPI Generator
*/
use serde::{Deserialize, Serialize};
/// AllocationExplainRequestBodyJson
/// The index, shard, and primary flag for which to generate an explanation. Leave this empty to generate an explanation for the first unassigned shard.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct AllocationExplainRequestBodyJson { /// When `true`, returns a routing explanation for the primary shard based on the node ID.
#[serde(rename = "primary", default, skip_serializing_if = "Option::is_none")]
pub primary: Option<bool>, /// Specifies the node ID or the name of the node to only explain a shard that is currently located on the specified node.
#[serde(rename = "current_node", default, skip_serializing_if = "Option::is_none")]
pub current_node: Option<String>, /// Specifies the ID of the shard that you would like an explanation for.
#[serde(rename = "shard", default, skip_serializing_if = "Option::is_none")]
pub shard: Option<u32>,
#[serde(rename = "index", default, skip_serializing_if = "Option::is_none")]
pub index: Option<String>,
}
impl AllocationExplainRequestBodyJson {
/// The index, shard, and primary flag for which to generate an explanation. Leave this empty to generate an explanation for the first unassigned shard.
pub fn new() -> AllocationExplainRequestBodyJson {
AllocationExplainRequestBodyJson {
primary: None,
current_node: None,
shard: None,
index: None,
}
}
}