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};

/// RemoteStoreUploadDownloadStats
/// The amount of data, in bytes, uploaded or downloaded to/from the remote segment store.


#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct RemoteStoreUploadDownloadStats {
    #[serde(rename = "failed", default, skip_serializing_if = "Option::is_none")]
    pub failed: Option<String>,
    #[serde(rename = "started", default, skip_serializing_if = "Option::is_none")]
    pub started: Option<String>,
    #[serde(rename = "failed_bytes")]
    pub failed_bytes: u32,
    #[serde(rename = "started_bytes")]
    pub started_bytes: u32,
    #[serde(rename = "succeeded", default, skip_serializing_if = "Option::is_none")]
    pub succeeded: Option<String>,
    #[serde(rename = "succeeded_bytes")]
    pub succeeded_bytes: u32,
}

impl RemoteStoreUploadDownloadStats {
      /// The amount of data, in bytes, uploaded or downloaded to/from the remote segment store.
    pub fn new(failed_bytes: u32, started_bytes: u32, succeeded_bytes: u32) -> RemoteStoreUploadDownloadStats {
        RemoteStoreUploadDownloadStats {
            failed: None,
            started: None,
            failed_bytes,
            started_bytes,
            succeeded: None,
            succeeded_bytes,
        }
    }
}