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 ThreadCount {  /// Number of tasks in queue for the thread pool.
    #[serde(rename = "queue", default, skip_serializing_if = "Option::is_none")]
    pub queue: Option<u32>,  /// Number of tasks rejected by the thread pool executor.
    #[serde(rename = "rejected", default, skip_serializing_if = "Option::is_none")]
    pub rejected: Option<u32>,  /// Highest number of active threads in the thread pool.
    #[serde(rename = "largest", default, skip_serializing_if = "Option::is_none")]
    pub largest: Option<u32>,  /// Number of active threads in the thread pool.
    #[serde(rename = "active", default, skip_serializing_if = "Option::is_none")]
    pub active: Option<u32>,  /// Number of threads in the thread pool.
    #[serde(rename = "threads", default, skip_serializing_if = "Option::is_none")]
    pub threads: Option<u32>,
    #[serde(rename = "total_wait_time_in_nanos", default, skip_serializing_if = "Option::is_none")]
    pub total_wait_time_in_nanos: Option<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 = "total_wait_time", default, skip_serializing_if = "Option::is_none")]
    pub total_wait_time: Option<String>,  /// Number of tasks completed by the thread pool executor.
    #[serde(rename = "completed", default, skip_serializing_if = "Option::is_none")]
    pub completed: Option<u32>,
}

impl ThreadCount {
    
    pub fn new() -> ThreadCount {
        ThreadCount {
            queue: None,
            rejected: None,
            largest: None,
            active: None,
            threads: None,
            total_wait_time_in_nanos: None,
            total_wait_time: None,
            completed: None,
        }
    }
}