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
41
42
43
44
45
46
47
48
/*
* OneSignal
*
* A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
*
* Contact: devrel@onesignal.com
* Generated by: https://openapi-generator.tech
*/
/// EmailWarmUpRequest : Channel: Email Required when `kind` is \"warmup\". The gradual sending schedule for the Auto Warm Up campaign.
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct EmailWarmUpRequest {
/// Required. The ordered stages that make up the campaign's sending schedule.
#[serde(rename = "stages")]
pub stages: Vec<crate::models::EmailWarmUpStage>,
/// How the stage schedule should be treated: * `recommended` - (Default) OneSignal may adjust the provided stages based on past delivery volumes, scheduled Auto Warm Up emails, and the size of the current audience. * `custom` - The stages provided are sent as-is.
#[serde(rename = "strategy", skip_serializing_if = "Option::is_none")]
pub strategy: Option<StrategyType>,
}
impl EmailWarmUpRequest {
/// Channel: Email Required when `kind` is \"warmup\". The gradual sending schedule for the Auto Warm Up campaign.
pub fn new(stages: Vec<crate::models::EmailWarmUpStage>) -> EmailWarmUpRequest {
EmailWarmUpRequest {
stages,
strategy: None,
}
}
}
/// How the stage schedule should be treated: * `recommended` - (Default) OneSignal may adjust the provided stages based on past delivery volumes, scheduled Auto Warm Up emails, and the size of the current audience. * `custom` - The stages provided are sent as-is.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum StrategyType {
#[serde(rename = "recommended")]
Recommended,
#[serde(rename = "custom")]
Custom,
}
impl Default for StrategyType {
fn default() -> StrategyType {
Self::Recommended
}
}