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(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
14pub enum MovingAverageAggregation {
15    SimpleMovingAverageAggregationValue,
16
17    LinearMovingAverageAggregationValue,
18
19    HoltMovingAverageAggregationValue,
20
21    HoltWintersMovingAverageAggregationValue,
22
23    EwmaMovingAverageAggregationValue,
24}
25
26impl std::fmt::Display for MovingAverageAggregation {
27    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
28        match self {
29            Self::SimpleMovingAverageAggregationValue => write!(f, "0"),
30            Self::LinearMovingAverageAggregationValue => write!(f, "0"),
31            Self::HoltMovingAverageAggregationValue => write!(f, "0"),
32            Self::HoltWintersMovingAverageAggregationValue => write!(f, "0"),
33            Self::EwmaMovingAverageAggregationValue => write!(f, "0"),
34        }
35    }
36}
37
38impl Default for MovingAverageAggregation {
39    fn default() -> MovingAverageAggregation {
40        Self::SimpleMovingAverageAggregationValue
41    }
42}