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




#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ShardIndexingPressurePerShardStats {
    #[serde(rename = "indexing")]
    pub indexing: nodes::stats::ShardIndexingPressurePerShardIndexingStats,
    #[serde(rename = "memory")]
    pub memory: nodes::stats::ShardIndexingPressurePerShardMemoryStats,
    #[serde(rename = "memory_allocation")]
    pub memory_allocation: nodes::stats::ShardIndexingPressurePerShardMemoryAllocationStats,
    #[serde(rename = "rejection")]
    pub rejection: nodes::stats::ShardIndexingPressurePerShardRejectionStats,
    #[serde(rename = "last_successful_timestamp")]
    pub last_successful_timestamp: nodes::stats::ShardIndexingPressurePerShardLastSuccessfulTimestamp,
}

impl ShardIndexingPressurePerShardStats {
    
    pub fn new(indexing: nodes::stats::ShardIndexingPressurePerShardIndexingStats, memory: nodes::stats::ShardIndexingPressurePerShardMemoryStats, memory_allocation: nodes::stats::ShardIndexingPressurePerShardMemoryAllocationStats, rejection: nodes::stats::ShardIndexingPressurePerShardRejectionStats, last_successful_timestamp: nodes::stats::ShardIndexingPressurePerShardLastSuccessfulTimestamp) -> ShardIndexingPressurePerShardStats {
        ShardIndexingPressurePerShardStats {
            indexing,
            memory,
            memory_allocation,
            rejection,
            last_successful_timestamp,
        }
    }
}