hanzo_client/models/campaign_input.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 CampaignInput {
16 /// Account is the provider ad-account this campaign runs on (Meta act_<id>). Optional.
17 #[serde(rename = "account", skip_serializing_if = "Option::is_none")]
18 pub account: Option<String>,
19 /// Budget is the campaign budget in MINOR units (cents). Negative values clamp to 0.
20 #[serde(rename = "budget", skip_serializing_if = "Option::is_none")]
21 pub budget: Option<i32>,
22 /// Name is the campaign's display label. Required; trimmed and bounded to 1024 bytes.
23 #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
24 pub name: Option<String>,
25 /// Objective is the campaign goal as the provider names it. Optional, bounded to 1024 bytes.
26 #[serde(rename = "objective", skip_serializing_if = "Option::is_none")]
27 pub objective: Option<String>,
28 /// Platform is the ad network: meta, google, tiktok or x. Empty defaults to meta.
29 #[serde(rename = "platform", skip_serializing_if = "Option::is_none")]
30 pub platform: Option<String>,
31 /// Spend is the amount spent so far in MINOR units (cents). Negative values clamp to 0.
32 #[serde(rename = "spend", skip_serializing_if = "Option::is_none")]
33 pub spend: Option<i32>,
34 /// Status is the lifecycle state: draft, active, paused or completed. Empty defaults to draft.
35 #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
36 pub status: Option<String>,
37}
38
39impl CampaignInput {
40 pub fn new() -> CampaignInput {
41 CampaignInput {
42 account: None,
43 budget: None,
44 name: None,
45 objective: None,
46 platform: None,
47 spend: None,
48 status: None,
49 }
50 }
51}
52