Skip to main content

opensearch_client/common/aggregations/
moving_average_aggregation.rs

1/*
2 * opensearch-client
3 *
4 * Rust Client for OpenSearch
5 *
6 * The version of the OpenAPI document: 3.1.0
7 * Contact: alberto.paro@gmail.com
8 * Generated by Paro OpenAPI Generator
9 */
10
11use serde::{Deserialize, Serialize};
12
13#[derive(
14    Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize, Default,
15)]
16pub enum MovingAverageAggregation {
17    #[default]
18    SimpleMovingAverageAggregationValue,
19
20    LinearMovingAverageAggregationValue,
21
22    HoltMovingAverageAggregationValue,
23
24    HoltWintersMovingAverageAggregationValue,
25
26    EwmaMovingAverageAggregationValue,
27}
28
29impl std::fmt::Display for MovingAverageAggregation {
30    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
31        match self {
32            Self::SimpleMovingAverageAggregationValue => write!(f, "0"),
33            Self::LinearMovingAverageAggregationValue => write!(f, "0"),
34            Self::HoltMovingAverageAggregationValue => write!(f, "0"),
35            Self::HoltWintersMovingAverageAggregationValue => write!(f, "0"),
36            Self::EwmaMovingAverageAggregationValue => write!(f, "0"),
37        }
38    }
39}