Skip to main content

opensearch_client/cluster/reroute/
command_move_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 CommandMoveAction {
18    #[serde(rename = "shard")]
19    pub shard: u32,
20    #[serde(rename = "index")]
21    pub index: String,  /// The node to move the shard to
22    #[serde(rename = "to_node")]
23    pub to_node: String,  /// The node to move the shard from
24    #[serde(rename = "from_node")]
25    pub from_node: String,
26}
27
28impl CommandMoveAction {
29    
30    pub fn new(shard: u32, index: String, to_node: String, from_node: String) -> CommandMoveAction {
31        CommandMoveAction {
32            shard,
33            index,
34            to_node,
35            from_node,
36        }
37    }
38}