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
/*
* 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 WebhookPayloadCommentPost {
/// Internal post ID (null for posts not published through Zernio)
#[serde(rename = "id", deserialize_with = "Option::deserialize")]
pub id: Option<String>,
/// Platform's post ID
#[serde(rename = "platformPostId")]
pub platform_post_id: String,
/// Post text, from our synced copy — no platform call is made on the comment path, so null when the post was never synced.
#[serde(rename = "content", deserialize_with = "Option::deserialize")]
pub content: Option<String>,
/// Post thumbnail or first media item URL. Platform CDN URLs expire, fetch promptly.
#[serde(rename = "imageUrl", deserialize_with = "Option::deserialize")]
pub image_url: Option<String>,
/// Public URL of the post. Null for posts published through Zernio that were never re-synced.
#[serde(rename = "permalink", deserialize_with = "Option::deserialize")]
pub permalink: Option<String>,
}
impl WebhookPayloadCommentPost {
pub fn new(
id: Option<String>,
platform_post_id: String,
content: Option<String>,
image_url: Option<String>,
permalink: Option<String>,
) -> WebhookPayloadCommentPost {
WebhookPayloadCommentPost {
id,
platform_post_id,
content,
image_url,
permalink,
}
}
}