/*
* 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.522.1
* 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 GetInboxPostComments200ResponseCommentsInner {
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[serde(rename = "message", skip_serializing_if = "Option::is_none")]
pub message: Option<String>,
#[serde(rename = "createdTime", skip_serializing_if = "Option::is_none")]
pub created_time: Option<String>,
#[serde(rename = "from", skip_serializing_if = "Option::is_none")]
pub from: Option<Box<models::GetInboxPostComments200ResponseCommentsInnerFrom>>,
#[serde(rename = "likeCount", skip_serializing_if = "Option::is_none")]
pub like_count: Option<i32>,
/// The platform's own reply count, which includes hidden and deleted replies. Can exceed replies[].length even when repliesHasMore is false or absent.
#[serde(rename = "replyCount", skip_serializing_if = "Option::is_none")]
pub reply_count: Option<i32>,
/// The platform this comment is from
#[serde(rename = "platform", skip_serializing_if = "Option::is_none")]
pub platform: Option<String>,
/// Direct link to the comment on the platform (if available)
#[serde(
rename = "url",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub url: Option<Option<String>>,
#[serde(rename = "replies", skip_serializing_if = "Option::is_none")]
pub replies: Option<Vec<serde_json::Value>>,
/// Facebook only. True when replies[] (capped at 10) does not hold the comment's full reply thread. Fetch the rest by passing the comment id as the `commentId` query parameter to GET /v1/inbox/comments/{postId} (or, for backwards compatibility, as `postId`). Absent (not false) on every other platform, including Instagram, which has no equivalent signal.
#[serde(rename = "repliesHasMore", skip_serializing_if = "Option::is_none")]
pub replies_has_more: Option<bool>,
/// Whether this comment can be replied to. Always present.
#[serde(rename = "canReply", skip_serializing_if = "Option::is_none")]
pub can_reply: Option<bool>,
/// Whether DELETE is expected to work on this comment. True for the account's own comments, and for anyone's comment on Facebook, Instagram, YouTube and LinkedIn organization accounts. On TikTok, TikTok's own flag decides. False does not block the call: the platform decides. Always present.
#[serde(rename = "canDelete", skip_serializing_if = "Option::is_none")]
pub can_delete: Option<bool>,
/// Whether hide is supported for this comment's platform (Facebook, Instagram, Threads, X, TikTok). It does not check each comment: X needs a conversation started by the account, and Threads only hides top-level replies. Always present.
#[serde(rename = "canHide", skip_serializing_if = "Option::is_none")]
pub can_hide: Option<bool>,
/// Whether this comment can be liked (Facebook, X, Bluesky, Reddit, LinkedIn, TikTok). Always present.
#[serde(rename = "canLike", skip_serializing_if = "Option::is_none")]
pub can_like: Option<bool>,
/// Whether the comment is currently hidden. On Instagram accounts connected through Facebook Login, Meta leaves hidden comments (and their replies) out of the list entirely, so they never appear with isHidden true; Instagram Login accounts and Facebook Pages return them with isHidden true.
#[serde(rename = "isHidden", skip_serializing_if = "Option::is_none")]
pub is_hidden: Option<bool>,
/// Whether the current user has liked this comment
#[serde(rename = "isLiked", skip_serializing_if = "Option::is_none")]
pub is_liked: Option<bool>,
/// The comment's media, whenever the platform returns one (replies included). Supported on Facebook, TikTok, X, Threads and Bluesky; absent when the comment has no media and on every other platform. See CommentAttachment for each platform's `type` values.
#[serde(rename = "attachment", skip_serializing_if = "Option::is_none")]
pub attachment: Option<Box<models::CommentAttachment>>,
/// Bluesky like URI for unliking
#[serde(
rename = "likeUri",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub like_uri: Option<Option<String>>,
/// Bluesky content identifier
#[serde(
rename = "cid",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub cid: Option<Option<String>>,
/// ID of the parent comment. - Facebook and Instagram: present on entries inside replies[]; omitted on top-level entries. - X: present inside replies[] and on top-level entries, where it holds the ID of the post replied to. - Every other platform: omitted; the parent relationship is expressed only through replies[] nesting. When omitted, the key is absent, not null.
#[serde(
rename = "parentId",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub parent_id: Option<Option<String>>,
/// Bluesky root post URI
#[serde(
rename = "rootUri",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub root_uri: Option<Option<String>>,
/// Bluesky root post CID
#[serde(
rename = "rootCid",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub root_cid: Option<Option<String>>,
}
impl GetInboxPostComments200ResponseCommentsInner {
pub fn new() -> GetInboxPostComments200ResponseCommentsInner {
GetInboxPostComments200ResponseCommentsInner {
id: None,
message: None,
created_time: None,
from: None,
like_count: None,
reply_count: None,
platform: None,
url: None,
replies: None,
replies_has_more: None,
can_reply: None,
can_delete: None,
can_hide: None,
can_like: None,
is_hidden: None,
is_liked: None,
attachment: None,
like_uri: None,
cid: None,
parent_id: None,
root_uri: None,
root_cid: None,
}
}
}