/*
* 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).
*
* The version of the OpenAPI document: 1.9.2
* Contact: support@zernio.com
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// ExternalPostSummary : A post synced from a platform (published directly on the platform, not through Zernio). Returned by GET /v1/posts?source=external and POST /v1/posts/sync-external. Analytics are exposed separately via GET /v1/analytics?source=external.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ExternalPostSummary {
/// Platform the post belongs to (e.g. instagram, youtube, tiktok)
#[serde(rename = "platform", skip_serializing_if = "Option::is_none")]
pub platform: Option<String>,
/// The platform's own post/media/video id
#[serde(rename = "platformPostId", skip_serializing_if = "Option::is_none")]
pub platform_post_id: Option<String>,
/// Canonical URL (permalink) of the post on the platform
#[serde(rename = "platformPostUrl", skip_serializing_if = "Option::is_none")]
pub platform_post_url: Option<String>,
/// Post caption / text
#[serde(rename = "content", skip_serializing_if = "Option::is_none")]
pub content: Option<String>,
/// When the post was published on the platform
#[serde(rename = "publishedAt", skip_serializing_if = "Option::is_none")]
pub published_at: Option<String>,
/// Media type (e.g. image, video, carousel)
#[serde(rename = "mediaType", skip_serializing_if = "Option::is_none")]
pub media_type: Option<String>,
/// Thumbnail URL
#[serde(rename = "thumbnailUrl", skip_serializing_if = "Option::is_none")]
pub thumbnail_url: Option<String>,
/// Per-item media (for carousels / multi-media posts)
#[serde(rename = "mediaItems", skip_serializing_if = "Option::is_none")]
pub media_items: Option<Vec<serde_json::Value>>,
/// Instagram only: the platform media product type (e.g. FEED, REELS, STORY, AD). Absent when the platform did not report it.
#[serde(rename = "mediaProductType", skip_serializing_if = "Option::is_none")]
pub media_product_type: Option<String>,
/// Instagram only: whether Instagram labeled the media as AI-generated. Absent when the platform did not report it.
#[serde(rename = "isAiGenerated", skip_serializing_if = "Option::is_none")]
pub is_ai_generated: Option<bool>,
/// Instagram reels only: whether the reel is also shared to the main feed. Absent when the platform did not report it.
#[serde(rename = "isSharedToFeed", skip_serializing_if = "Option::is_none")]
pub is_shared_to_feed: Option<bool>,
/// Instagram only: audio type of the media (MUSIC or ORIGINAL_SOUND). Absent when the platform did not report it.
#[serde(rename = "mediaAudioType", skip_serializing_if = "Option::is_none")]
pub media_audio_type: Option<String>,
#[serde(rename = "analytics", skip_serializing_if = "Option::is_none")]
pub analytics: Option<Box<models::ExternalPostSummaryAnalytics>>,
}
impl ExternalPostSummary {
/// A post synced from a platform (published directly on the platform, not through Zernio). Returned by GET /v1/posts?source=external and POST /v1/posts/sync-external. Analytics are exposed separately via GET /v1/analytics?source=external.
pub fn new() -> ExternalPostSummary {
ExternalPostSummary {
platform: None,
platform_post_id: None,
platform_post_url: None,
content: None,
published_at: None,
media_type: None,
thumbnail_url: None,
media_items: None,
media_product_type: None,
is_ai_generated: None,
is_shared_to_feed: None,
media_audio_type: None,
analytics: None,
}
}
}