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
/*
* Hanzo Cloud API
*
* The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
*
* The version of the OpenAPI document: v1
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Enrollment {
/// Address is the normalized (lower-cased, trimmed) recipient.
#[serde(rename = "address", skip_serializing_if = "Option::is_none")]
pub address: Option<String>,
/// Channel is the delivery surface the steps go out on.
#[serde(rename = "channel", skip_serializing_if = "Option::is_none")]
pub channel: Option<String>,
/// CurrentStep is the index of the step that sends next.
#[serde(rename = "currentStep", skip_serializing_if = "Option::is_none")]
pub current_step: Option<i32>,
/// EnrolledAt is unix seconds when the contact joined the walk, and orders the enrollment list (newest first).
#[serde(rename = "enrolledAt", skip_serializing_if = "Option::is_none")]
pub enrolled_at: Option<i32>,
/// ID is the server-assigned enrollment id (\"enr_\" + 128 random bits).
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
/// NextRunAt is the unix time the current step comes due; 0 once the walk has ended. It IS the schedule — durable in SQLite, so it survives restarts.
#[serde(rename = "nextRunAt", skip_serializing_if = "Option::is_none")]
pub next_run_at: Option<i32>,
/// SequenceID is the sequence being walked.
#[serde(rename = "sequenceId", skip_serializing_if = "Option::is_none")]
pub sequence_id: Option<String>,
/// Status is active, completed or canceled.
#[serde(rename = "status", skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
/// UpdatedAt is unix seconds of the last move: the drip engine writes it each time it advances the walk a step, completes it or cancels it. Together with Status it says when the walk last did anything, which is how a stalled enrollment is told from a finished one.
#[serde(rename = "updatedAt", skip_serializing_if = "Option::is_none")]
pub updated_at: Option<i32>,
}
impl Enrollment {
pub fn new() -> Enrollment {
Enrollment {
address: None,
channel: None,
current_step: None,
enrolled_at: None,
id: None,
next_run_at: None,
sequence_id: None,
status: None,
updated_at: None,
}
}
}