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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
/*
* Zernio API
*
* API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
*
* The version of the OpenAPI document: 1.0.4
* Contact: support@zernio.com
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// LinkedInAdsPlatformData : LinkedIn campaign bidding and delivery controls for POST /v1/ads/boost and POST /v1/ads/create. Unknown keys are rejected.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct LinkedInAdsPlatformData {
/// Campaign cost model (billing event). Defaults to `CPM`. Required when `unitCost` is set so the manual bid applies to an explicit cost model.
#[serde(rename = "costType", skip_serializing_if = "Option::is_none")]
pub cost_type: Option<CostType>,
/// Manual bid in WHOLE account-currency units (e.g. 2.5 = $2.50). Requires `costType`. Omit for LinkedIn's automated (max delivery) bidding. LinkedIn enforces its own per-audience min/max bid bounds.
#[serde(rename = "unitCost", skip_serializing_if = "Option::is_none")]
pub unit_cost: Option<f64>,
/// Campaign `optimizationTargetType` (e.g. `MAX_CLICK`, `TARGET_COST_PER_CLICK`, `MAX_IMPRESSION`). Forwarded verbatim — LinkedIn validates compatibility with the objective and `costType`. Omit for the objective-derived default.
#[serde(
rename = "optimizationTargetType",
skip_serializing_if = "Option::is_none"
)]
pub optimization_target_type: Option<String>,
/// How LinkedIn rotates creatives within the campaign. Defaults to `OPTIMIZED`.
#[serde(rename = "creativeSelection", skip_serializing_if = "Option::is_none")]
pub creative_selection: Option<CreativeSelection>,
/// Enable LinkedIn audience expansion. Defaults to false.
#[serde(
rename = "audienceExpansionEnabled",
skip_serializing_if = "Option::is_none"
)]
pub audience_expansion_enabled: Option<bool>,
/// Deliver on the LinkedIn Audience Network. Defaults to false.
#[serde(
rename = "offsiteDeliveryEnabled",
skip_serializing_if = "Option::is_none"
)]
pub offsite_delivery_enabled: Option<bool>,
/// Restrict delivery to Connected TV inventory.
#[serde(
rename = "connectedTelevisionOnly",
skip_serializing_if = "Option::is_none"
)]
pub connected_television_only: Option<bool>,
}
impl LinkedInAdsPlatformData {
/// LinkedIn campaign bidding and delivery controls for POST /v1/ads/boost and POST /v1/ads/create. Unknown keys are rejected.
pub fn new() -> LinkedInAdsPlatformData {
LinkedInAdsPlatformData {
cost_type: None,
unit_cost: None,
optimization_target_type: None,
creative_selection: None,
audience_expansion_enabled: None,
offsite_delivery_enabled: None,
connected_television_only: None,
}
}
}
/// Campaign cost model (billing event). Defaults to `CPM`. Required when `unitCost` is set so the manual bid applies to an explicit cost model.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum CostType {
#[serde(rename = "CPM")]
Cpm,
#[serde(rename = "CPC")]
Cpc,
#[serde(rename = "CPV")]
Cpv,
}
impl Default for CostType {
fn default() -> CostType {
Self::Cpm
}
}
/// How LinkedIn rotates creatives within the campaign. Defaults to `OPTIMIZED`.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum CreativeSelection {
#[serde(rename = "OPTIMIZED")]
Optimized,
#[serde(rename = "ROUND_ROBIN")]
RoundRobin,
}
impl Default for CreativeSelection {
fn default() -> CreativeSelection {
Self::Optimized
}
}