amazon_spapi/models/notifications/aggregation_time_period.rs
1/*
2 * Selling Partner API for Notifications
3 *
4 * The Selling Partner API for Notifications lets you subscribe to notifications that are relevant to a selling partner's business. Using this API you can create a destination to receive notifications, subscribe to notifications, delete notification subscriptions, and more. For more information, refer to the [Notifications Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/notifications-api-v1-use-case-guide).
5 *
6 * The version of the OpenAPI document: v1
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// AggregationTimePeriod : The supported aggregation time periods. For example, if FiveMinutes is the value chosen, and 50 price updates occur for an ASIN within 5 minutes, Amazon will send only two notifications; one for the first event, and then a subsequent notification 5 minutes later with the final end state of the data. The 48 interim events will be dropped.
15/// The supported aggregation time periods. For example, if FiveMinutes is the value chosen, and 50 price updates occur for an ASIN within 5 minutes, Amazon will send only two notifications; one for the first event, and then a subsequent notification 5 minutes later with the final end state of the data. The 48 interim events will be dropped.
16#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17pub enum AggregationTimePeriod {
18 #[serde(rename = "FiveMinutes")]
19 FiveMinutes,
20 #[serde(rename = "TenMinutes")]
21 TenMinutes,
22
23}
24
25impl std::fmt::Display for AggregationTimePeriod {
26 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
27 match self {
28 Self::FiveMinutes => write!(f, "FiveMinutes"),
29 Self::TenMinutes => write!(f, "TenMinutes"),
30 }
31 }
32}
33
34impl Default for AggregationTimePeriod {
35 fn default() -> AggregationTimePeriod {
36 Self::FiveMinutes
37 }
38}
39