opensearch_client/common/aggregations/
moving_average_aggregation.rs1use 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}