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 IndexStatus {
    #[serde(
        rename = "bytes_read",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub bytes_read: Option<u32>,
    #[serde(
        rename = "translog_size_bytes",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub translog_size_bytes: Option<u32>,
    #[serde(
        rename = "operations_read_translog",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub operations_read_translog: Option<f64>,
    #[serde(
        rename = "operations_read",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub operations_read: Option<f64>,
    #[serde(
        rename = "operations_read_lucene",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub operations_read_lucene: Option<f64>,
    /// Certain APIs may return values, including numbers such as epoch timestamps, as strings. This setting captures
    /// this behavior while keeping the semantics of the field type.
    ///
    /// Depending on the target language, code generators can keep the union or remove it and leniently parse
    /// strings to the target type.
    #[serde(
        rename = "total_read_time_lucene_millis",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub total_read_time_lucene_millis: Option<common::StringifiedEpochTimeUnitMillis>,
    /// Certain APIs may return values, including numbers such as epoch timestamps, as strings. This setting captures
    /// this behavior while keeping the semantics of the field type.
    ///
    /// Depending on the target language, code generators can keep the union or remove it and leniently parse
    /// strings to the target type.
    #[serde(
        rename = "total_read_time_translog_millis",
        default,
        skip_serializing_if = "Option::is_none"
    )]
    pub total_read_time_translog_millis: Option<common::StringifiedEpochTimeUnitMillis>,
}

impl IndexStatus {
    pub fn new() -> IndexStatus {
        IndexStatus {
            bytes_read: None,
            translog_size_bytes: None,
            operations_read_translog: None,
            operations_read: None,
            operations_read_lucene: None,
            total_read_time_lucene_millis: None,
            total_read_time_translog_millis: None,
        }
    }
}