manticoresearch 2.0.0

Сlient for Manticore Search.
Documentation
/*
 * Manticore Search Client
 *
 * Сlient for Manticore Search. 
 *
 * The version of the OpenAPI document: 5.0.0
 * Contact: info@manticoresearch.com
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// AggTerms : Object containing term fields to aggregate on
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct AggTerms {
    /// Name of attribute to aggregate by
    #[serde(rename = "field")]
    pub field: String,
    /// Maximum number of buckets in the result
    #[serde(rename = "size", skip_serializing_if = "Option::is_none")]
    pub size: Option<i32>,
}

impl AggTerms {
    /// Object containing term fields to aggregate on
    pub fn new(field: String) -> AggTerms {
        AggTerms {
            field,
            size: None,
        }
    }
}