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#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
14pub struct CommandMoveAction {
15    #[serde(rename = "shard")]
16    pub shard: u32,
17    #[serde(rename = "index")]
18    pub index: String,
19    /// The node to move the shard to
20    #[serde(rename = "to_node")]
21    pub to_node: String,
22    /// The node to move the shard from
23    #[serde(rename = "from_node")]
24    pub from_node: String,
25}
26
27impl CommandMoveAction {
28    pub fn new(shard: u32, index: String, to_node: String, from_node: String) -> CommandMoveAction {
29        CommandMoveAction {
30            shard,
31            index,
32            to_node,
33            from_node,
34        }
35    }
36}