Skip to main content

hanzo_client/models/
campaign_write.rs

1/*
2 * Hanzo Cloud API
3 *
4 * 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/.
5 *
6 * The version of the OpenAPI document: v1
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct CampaignWrite {
16    /// Audience is the segment or audience selector this campaign targets.
17    #[serde(rename = "audience", skip_serializing_if = "Option::is_none")]
18    pub audience: Option<String>,
19    /// Budget is the campaign's total budget in CENTS. Negative reads as 0.
20    #[serde(rename = "budget", skip_serializing_if = "Option::is_none")]
21    pub budget: Option<i32>,
22    /// 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\".
23    #[serde(rename = "channels", skip_serializing_if = "Option::is_none")]
24    pub channels: Option<Vec<models::ChannelSpec>>,
25    /// 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.
26    #[serde(rename = "content", skip_serializing_if = "Option::is_none")]
27    pub content: Option<Vec<String>>,
28    /// Name is the campaign's display name. Required; trimmed and capped at 2048 characters.
29    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
30    pub name: Option<String>,
31    /// ScheduleAt is when the campaign should run, in unix seconds. Negative reads as 0 (immediately).
32    #[serde(rename = "scheduleAt", skip_serializing_if = "Option::is_none")]
33    pub schedule_at: Option<i32>,
34}
35
36impl CampaignWrite {
37    pub fn new() -> CampaignWrite {
38        CampaignWrite {
39            audience: None,
40            budget: None,
41            channels: None,
42            content: None,
43            name: None,
44            schedule_at: None,
45        }
46    }
47}
48