opensearch-client 0.3.1

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 serde::{Deserialize, Serialize};




#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ClusterRemoteProxyInfoValue {
    #[serde(rename = "num_proxy_sockets_connected")]
    pub num_proxy_sockets_connected: u32,
    #[serde(rename = "server_name")]
    pub server_name: String,
    #[serde(rename = "connected")]
    pub connected: bool,
    #[serde(rename = "mode")]
    pub mode: String,  /// A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and
  /// `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
    #[serde(rename = "initial_connect_timeout")]
    pub initial_connect_timeout: String,
    #[serde(rename = "proxy_address")]
    pub proxy_address: String,
    #[serde(rename = "max_proxy_socket_connections")]
    pub max_proxy_socket_connections: u32,
    #[serde(rename = "skip_unavailable")]
    pub skip_unavailable: bool,
}

impl ClusterRemoteProxyInfoValue {
    
    pub fn new(num_proxy_sockets_connected: u32, server_name: String, connected: bool, mode: String, initial_connect_timeout: String, proxy_address: String, max_proxy_socket_connections: u32, skip_unavailable: bool) -> ClusterRemoteProxyInfoValue {
        ClusterRemoteProxyInfoValue {
            num_proxy_sockets_connected,
            server_name,
            connected,
            mode,
            initial_connect_timeout,
            proxy_address,
            max_proxy_socket_connections,
            skip_unavailable,
        }
    }
}