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
96
97
98
99
100
101
102
/*
* 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};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct GetAdComments200ResponseMeta {
/// Which side these comments are on (same as `placement`).
#[serde(rename = "platform")]
pub platform: Platform,
/// The placement these comments are for — useful when you didn't pass ?placement= and want to know which one you got.
#[serde(rename = "placement")]
pub placement: Placement,
/// Internal Zernio ad ID.
#[serde(rename = "adId")]
pub ad_id: String,
/// Meta ad ID.
#[serde(rename = "platformAdId")]
pub platform_ad_id: String,
/// Underlying post ID the comments belong to. effective_object_story_id for the Facebook side, effective_instagram_media_id for the Instagram side.
#[serde(rename = "effectiveStoryId")]
pub effective_story_id: String,
/// Facebook-only. The connected Facebook Page SocialAccount these comments were read through — pass it as `accountId` (with `effectiveStoryId` as the postId) to /v1/inbox/comments to reply/hide/delete. Null when no connected Page was used (then moderation isn't possible).
#[serde(rename = "facebookAccountId", skip_serializing_if = "Option::is_none")]
pub facebook_account_id: Option<String>,
/// Instagram-only. The Instagram-scoped business ID that owns the boosted media (creative.instagram_user_id).
#[serde(rename = "instagramUserId", skip_serializing_if = "Option::is_none")]
pub instagram_user_id: Option<String>,
/// Instagram-only. Public permalink of the boosted IG post (creative.instagram_permalink_url).
#[serde(rename = "instagramPermalink", skip_serializing_if = "Option::is_none")]
pub instagram_permalink: Option<String>,
/// Instagram-only. The connected Instagram SocialAccount these comments were read through — pass it as `accountId` (with `effectiveStoryId` as the postId) to /v1/inbox/comments to reply/hide/delete.
#[serde(rename = "instagramAccountId", skip_serializing_if = "Option::is_none")]
pub instagram_account_id: Option<String>,
/// Social account ID (ads SocialAccount).
#[serde(rename = "accountId")]
pub account_id: String,
#[serde(rename = "lastUpdated")]
pub last_updated: String,
}
impl GetAdComments200ResponseMeta {
pub fn new(
platform: Platform,
placement: Placement,
ad_id: String,
platform_ad_id: String,
effective_story_id: String,
account_id: String,
last_updated: String,
) -> GetAdComments200ResponseMeta {
GetAdComments200ResponseMeta {
platform,
placement,
ad_id,
platform_ad_id,
effective_story_id,
facebook_account_id: None,
instagram_user_id: None,
instagram_permalink: None,
instagram_account_id: None,
account_id,
last_updated,
}
}
}
/// Which side these comments are on (same as `placement`).
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Platform {
#[serde(rename = "facebook")]
Facebook,
#[serde(rename = "instagram")]
Instagram,
}
impl Default for Platform {
fn default() -> Platform {
Self::Facebook
}
}
/// The placement these comments are for — useful when you didn't pass ?placement= and want to know which one you got.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Placement {
#[serde(rename = "facebook")]
Facebook,
#[serde(rename = "instagram")]
Instagram,
}
impl Default for Placement {
fn default() -> Placement {
Self::Facebook
}
}