1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
* fastcomments
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 0.0.0
*
* Generated by: https://openapi-generator.tech
*/
use crate::client::models;
use serde::{Deserialize, Serialize};
/// AggregationOperation : An operation that will be applied on a field
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct AggregationOperation {
/// The field to operate on
#[serde(rename = "field")]
pub field: String,
#[serde(rename = "op")]
pub op: models::AggregationOpType,
/// Optional alias for the output; if not provided, a default alias is computed
#[serde(rename = "alias", skip_serializing_if = "Option::is_none")]
pub alias: Option<String>,
#[serde(rename = "expandArray", skip_serializing_if = "Option::is_none")]
pub expand_array: Option<bool>,
}
impl AggregationOperation {
/// An operation that will be applied on a field
pub fn new(field: String, op: models::AggregationOpType) -> AggregationOperation {
AggregationOperation {
field,
op,
alias: None,
expand_array: None,
}
}
}