/*
* Zernio API
*
* API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema). Request ids: responses carry an X-Request-Id header with the id we log the request under. Quote it when reporting a problem. A valid x-request-id you send is reused as that id.
*
* The version of the OpenAPI document: 1.563.0
* Contact: support@zernio.com
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// GetInboxPostComments200ResponsePost : (Reddit, Facebook and Instagram) Metadata for the target post, returned with the comments so you can render a preview without another request. **Facebook and Instagram** return the Meta shape: post thumbnail, text and permalink, for any post the account can read, including hidden dark posts Meta publishes per ad variant (dynamic creative, placement asset customization, Advantage+). - Facebook posts need the Facebook Page connection; Instagram media the Instagram connection. - `thumbnailUrl` and `mediaUrl` are expiring Meta CDN URLs: store a copy to render them later. - On Instagram, `productType` tells an ad (`AD`) from organic media (`FEED`, `REELS`, `STORY`). **Absent** on other platforms, when the connection's token cannot read the post, and on Reddit when the upstream response lacks the post listing (deleted post, malformed response).
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct GetInboxPostComments200ResponsePost {
/// Facebook post id ({pageId}_{postId}) or Instagram media id
#[serde(rename = "id")]
pub id: String,
/// Fullname with type prefix (e.g. \"t3_1tjtj26\")
#[serde(rename = "fullname", skip_serializing_if = "Option::is_none")]
pub fullname: Option<String>,
#[serde(rename = "title", skip_serializing_if = "Option::is_none")]
pub title: Option<String>,
/// Body text for self-posts (empty for link posts)
#[serde(rename = "selftext", skip_serializing_if = "Option::is_none")]
pub selftext: Option<String>,
/// Reddit username, without the u/ prefix
#[serde(rename = "author", skip_serializing_if = "Option::is_none")]
pub author: Option<String>,
/// Subreddit name, without the r/ prefix
#[serde(rename = "subreddit", skip_serializing_if = "Option::is_none")]
pub subreddit: Option<String>,
#[serde(rename = "permalink")]
pub permalink: String,
/// For link posts, the external URL; for self-posts, the Reddit permalink
#[serde(rename = "url", skip_serializing_if = "Option::is_none")]
pub url: Option<String>,
/// Net upvotes (upvotes minus downvotes)
#[serde(rename = "score", skip_serializing_if = "Option::is_none")]
pub score: Option<i32>,
#[serde(rename = "numComments", skip_serializing_if = "Option::is_none")]
pub num_comments: Option<i32>,
/// Unix timestamp in seconds
#[serde(rename = "createdUtc", skip_serializing_if = "Option::is_none")]
pub created_utc: Option<i32>,
#[serde(rename = "over18", skip_serializing_if = "Option::is_none")]
pub over18: Option<bool>,
#[serde(rename = "stickied", skip_serializing_if = "Option::is_none")]
pub stickied: Option<bool>,
/// Link flair text if any
#[serde(rename = "flairText", skip_serializing_if = "Option::is_none")]
pub flair_text: Option<String>,
/// True if the post is a Reddit gallery (multiple images)
#[serde(rename = "isGallery", skip_serializing_if = "Option::is_none")]
pub is_gallery: Option<bool>,
/// Facebook post message or Instagram caption
#[serde(rename = "text")]
pub text: String,
/// Facebook `full_picture` (or the first attachment image); Instagram `thumbnail_url` for videos, `media_url` for images. Expiring Meta CDN URL.
#[serde(rename = "thumbnailUrl")]
pub thumbnail_url: String,
/// Instagram `media_url` (the video file for videos). Always null on Facebook. Expiring Meta CDN URL.
#[serde(rename = "mediaUrl")]
pub media_url: String,
/// Instagram `media_type` (IMAGE, VIDEO, CAROUSEL_ALBUM) or the Facebook attachment type (photo, video_inline, link, ...)
#[serde(rename = "mediaType")]
pub media_type: String,
/// Instagram `media_product_type`: AD, FEED, REELS or STORY. Always null on Facebook.
#[serde(rename = "productType")]
pub product_type: String,
/// Creation time as Meta returns it (e.g. 2026-05-27T17:15:51+0000)
#[serde(rename = "createdAt")]
pub created_at: String,
}
impl GetInboxPostComments200ResponsePost {
/// (Reddit, Facebook and Instagram) Metadata for the target post, returned with the comments so you can render a preview without another request. **Facebook and Instagram** return the Meta shape: post thumbnail, text and permalink, for any post the account can read, including hidden dark posts Meta publishes per ad variant (dynamic creative, placement asset customization, Advantage+). - Facebook posts need the Facebook Page connection; Instagram media the Instagram connection. - `thumbnailUrl` and `mediaUrl` are expiring Meta CDN URLs: store a copy to render them later. - On Instagram, `productType` tells an ad (`AD`) from organic media (`FEED`, `REELS`, `STORY`). **Absent** on other platforms, when the connection's token cannot read the post, and on Reddit when the upstream response lacks the post listing (deleted post, malformed response).
pub fn new(
id: String,
permalink: String,
text: String,
thumbnail_url: String,
media_url: String,
media_type: String,
product_type: String,
created_at: String,
) -> GetInboxPostComments200ResponsePost {
GetInboxPostComments200ResponsePost {
id,
fullname: None,
title: None,
selftext: None,
author: None,
subreddit: None,
permalink,
url: None,
score: None,
num_comments: None,
created_utc: None,
over18: None,
stickied: None,
flair_text: None,
is_gallery: None,
text,
thumbnail_url,
media_url,
media_type,
product_type,
created_at,
}
}
}