opensearch-client 0.3.2

Strongly typed OpenSearch Client
Documentation
/*
 * 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 crate::common;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CurrentNode {
    #[serde(rename = "transport_address")]
    pub transport_address: String,
    #[serde(rename = "attributes")]
    pub attributes: serde_json::Value,
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "id")]
    pub id: String,
    #[serde(rename = "weight_ranking")]
    pub weight_ranking: u32,
}

impl CurrentNode {
    pub fn new(
        transport_address: String,
        attributes: serde_json::Value,
        name: String,
        id: String,
        weight_ranking: u32,
    ) -> CurrentNode {
        CurrentNode {
            transport_address,
            attributes,
            name,
            id,
            weight_ranking,
        }
    }
}