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
*/
/// UpdateJourneyRequest : Partial update applied with JSON Merge Patch (RFC 7396). Send only the fields you want to change. A null value clears a nullable field. Arrays such as nodes are replaced wholesale.
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct UpdateJourneyRequest {
/// Journey name.
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
/// Journey description. Send null to clear it.
#[serde(rename = "description", skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "audience", skip_serializing_if = "Option::is_none")]
pub audience: Option<Box<crate::models::JourneyAudience>>,
#[serde(rename = "early_exit", skip_serializing_if = "Option::is_none")]
pub early_exit: Option<Box<crate::models::JourneyEarlyExit>>,
#[serde(rename = "reentry_rules", skip_serializing_if = "Option::is_none")]
pub reentry_rules: Option<Box<crate::models::JourneyReentryRules>>,
#[serde(rename = "schedule", skip_serializing_if = "Option::is_none")]
pub schedule: Option<Box<crate::models::JourneySchedule>>,
/// Full ordered list of nodes, which replaces the existing graph wholesale. Preserve each node's server-assigned id from a prior fetch to keep in-flight users on that node; omit id to add a new node.
#[serde(rename = "nodes", skip_serializing_if = "Option::is_none")]
pub nodes: Option<Vec<crate::models::JourneyNode>>,
/// Target state. Set active to activate a draft journey, or scheduled together with a future schedule.start_at to activate it later. Set archived to stop a running journey; archiving is permanent. Only scheduled and processing journeys can return to draft.
#[serde(rename = "state", skip_serializing_if = "Option::is_none")]
pub state: Option<StateType>,
/// Optional optimistic-concurrency token. Pass the concurrency_key from a prior fetch to reject the update with 409 if the journey changed. Omit to skip the check.
#[serde(rename = "concurrency_key", skip_serializing_if = "Option::is_none")]
pub concurrency_key: Option<String>,
}
impl UpdateJourneyRequest {
/// Partial update applied with JSON Merge Patch (RFC 7396). Send only the fields you want to change. A null value clears a nullable field. Arrays such as nodes are replaced wholesale.
pub fn new() -> UpdateJourneyRequest {
UpdateJourneyRequest {
name: None,
description: None,
audience: None,
early_exit: None,
reentry_rules: None,
schedule: None,
nodes: None,
state: None,
concurrency_key: None,
}
}
}
/// Target state. Set active to activate a draft journey, or scheduled together with a future schedule.start_at to activate it later. Set archived to stop a running journey; archiving is permanent. Only scheduled and processing journeys can return to draft.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum StateType {
#[serde(rename = "draft")]
Draft,
#[serde(rename = "scheduled")]
Scheduled,
#[serde(rename = "active")]
Active,
#[serde(rename = "archived")]
Archived,
}
impl Default for StateType {
fn default() -> StateType {
Self::Draft
}
}