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
/*
* 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 CampaignWrite {
/// Audience is the segment or audience selector this campaign targets.
#[serde(rename = "audience", skip_serializing_if = "Option::is_none")]
pub audience: Option<String>,
/// Budget is the campaign's total budget in CENTS. Negative reads as 0.
#[serde(rename = "budget", skip_serializing_if = "Option::is_none")]
pub budget: Option<i32>,
/// Channels are the fan-out targets, at most one per kind (paid, organic, email) and at most 12. A channel's status and provider id are server-owned: whatever the caller sends for them is replaced with \"pending\".
#[serde(rename = "channels", skip_serializing_if = "Option::is_none")]
pub channels: Option<Vec<models::ChannelSpec>>,
/// Content is the ordered creative set. Content[0] is the active creative and the rest are A/B variants; at most 32, empty entries dropped.
#[serde(rename = "content", skip_serializing_if = "Option::is_none")]
pub content: Option<Vec<String>>,
/// Name is the campaign's display name. Required; trimmed and capped at 2048 characters.
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
/// ScheduleAt is when the campaign should run, in unix seconds. Negative reads as 0 (immediately).
#[serde(rename = "scheduleAt", skip_serializing_if = "Option::is_none")]
pub schedule_at: Option<i32>,
}
impl CampaignWrite {
pub fn new() -> CampaignWrite {
CampaignWrite {
audience: None,
budget: None,
channels: None,
content: None,
name: None,
schedule_at: None,
}
}
}