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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/*
* 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
*/
/// EmailWarmUp : Channel: Email Present only when this notification's `kind` is \"warmup\". The Auto Warm Up campaign's stage schedule, scheduling strategy, and live status.
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct EmailWarmUp {
/// The campaign's sending schedule, stage by stage.
#[serde(rename = "stages", skip_serializing_if = "Option::is_none")]
pub stages: Option<Vec<crate::models::EmailWarmUpStage>>,
/// How the stage schedule was produced: * `recommended` - OneSignal generated (and may still adjust) the schedule based on past delivery volumes, scheduled Auto Warm Up emails, and the size of the current audience. * `custom` - The stages were provided as-is in the create request.
#[serde(rename = "strategy", skip_serializing_if = "Option::is_none")]
pub strategy: Option<StrategyType>,
/// Current status of the campaign: * `initializing` - The stages have been submitted and the schedule is being set up. * `draft` - The campaign has been created but has not started sending. * `active` - The campaign is currently working through its stages. * `finished` - All stages have completed. * `canceled` - The campaign was canceled before finishing.
#[serde(rename = "status", skip_serializing_if = "Option::is_none")]
pub status: Option<StatusType>,
/// Whether the campaign is currently live (actively sending).
#[serde(rename = "is_live", skip_serializing_if = "Option::is_none")]
pub is_live: Option<bool>,
}
impl EmailWarmUp {
/// Channel: Email Present only when this notification's `kind` is \"warmup\". The Auto Warm Up campaign's stage schedule, scheduling strategy, and live status.
pub fn new() -> EmailWarmUp {
EmailWarmUp {
stages: None,
strategy: None,
status: None,
is_live: None,
}
}
}
/// How the stage schedule was produced: * `recommended` - OneSignal generated (and may still adjust) the schedule based on past delivery volumes, scheduled Auto Warm Up emails, and the size of the current audience. * `custom` - The stages were provided as-is in the create request.
#[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
}
}
/// Current status of the campaign: * `initializing` - The stages have been submitted and the schedule is being set up. * `draft` - The campaign has been created but has not started sending. * `active` - The campaign is currently working through its stages. * `finished` - All stages have completed. * `canceled` - The campaign was canceled before finishing.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum StatusType {
#[serde(rename = "initializing")]
Initializing,
#[serde(rename = "draft")]
Draft,
#[serde(rename = "active")]
Active,
#[serde(rename = "finished")]
Finished,
#[serde(rename = "canceled")]
Canceled,
}
impl Default for StatusType {
fn default() -> StatusType {
Self::Initializing
}
}