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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Aggregation {
    #[serde(rename = "max", default, skip_serializing_if = "Option::is_none")]
    pub max: Option<Box<ml::Aggregation>>,
    /// The field name.
    #[serde(rename = "field", default, skip_serializing_if = "Option::is_none")]
    pub field: Option<String>,
    #[serde(rename = "sum", default, skip_serializing_if = "Option::is_none")]
    pub sum: Option<Box<ml::Aggregation>>,
}

impl Aggregation {
    pub fn new() -> Aggregation {
        Aggregation {
            max: None,
            field: None,
            sum: None,
        }
    }
}