Skip to main content

opensearch_client/cluster/allocation_explain/
current_node.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 crate::common;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct CurrentNode {
16    #[serde(rename = "transport_address")]
17    pub transport_address: String,
18    #[serde(rename = "attributes")]
19    pub attributes: serde_json::Value,
20    #[serde(rename = "name")]
21    pub name: String,
22    #[serde(rename = "id")]
23    pub id: String,
24    #[serde(rename = "weight_ranking")]
25    pub weight_ranking: u32,
26}
27
28impl CurrentNode {
29    pub fn new(
30        transport_address: String,
31        attributes: serde_json::Value,
32        name: String,
33        id: String,
34        weight_ranking: u32,
35    ) -> CurrentNode {
36        CurrentNode {
37            transport_address,
38            attributes,
39            name,
40            id,
41            weight_ranking,
42        }
43    }
44}