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