/*
* 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.242.0
* Contact: support@zernio.com
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// RedditComment : One comment of a Reddit thread as returned by GET /v1/reddit/comments/{postId}; the list is flat and in thread order
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct RedditComment {
/// Reddit comment ID (without type prefix)
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
/// Reddit fullname (e.g. t1_abc123)
#[serde(rename = "fullname", skip_serializing_if = "Option::is_none")]
pub fullname: Option<String>,
/// Fullname of what the comment answers: the post (t3_…) or a parent comment (t1_…)
#[serde(rename = "parentId", skip_serializing_if = "Option::is_none")]
pub parent_id: Option<String>,
/// The username, or [deleted]
#[serde(rename = "author", skip_serializing_if = "Option::is_none")]
pub author: Option<String>,
/// Comment text as written (Markdown, not HTML-escaped), or [deleted] / [removed]
#[serde(rename = "body", skip_serializing_if = "Option::is_none")]
pub body: Option<String>,
/// Full permalink to the comment
#[serde(rename = "permalink", skip_serializing_if = "Option::is_none")]
pub permalink: Option<String>,
/// Unix timestamp of the comment
#[serde(rename = "createdUtc", skip_serializing_if = "Option::is_none")]
pub created_utc: Option<f64>,
#[serde(rename = "score", skip_serializing_if = "Option::is_none")]
pub score: Option<i32>,
/// Direct replies included in this response; replies Reddit left out are listed in more
#[serde(rename = "numReplies", skip_serializing_if = "Option::is_none")]
pub num_replies: Option<i32>,
/// 0 for a top-level comment of this response, 1 for a reply to it, and so on
#[serde(rename = "depth", skip_serializing_if = "Option::is_none")]
pub depth: Option<i32>,
/// Whether the author is the post's author
#[serde(rename = "isSubmitter", skip_serializing_if = "Option::is_none")]
pub is_submitter: Option<bool>,
#[serde(rename = "edited", skip_serializing_if = "Option::is_none")]
pub edited: Option<bool>,
#[serde(rename = "stickied", skip_serializing_if = "Option::is_none")]
pub stickied: Option<bool>,
/// \"moderator\" or \"admin\" when the comment is distinguished, else null
#[serde(
rename = "distinguished",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub distinguished: Option<Option<String>>,
}
impl RedditComment {
/// One comment of a Reddit thread as returned by GET /v1/reddit/comments/{postId}; the list is flat and in thread order
pub fn new() -> RedditComment {
RedditComment {
id: None,
fullname: None,
parent_id: None,
author: None,
body: None,
permalink: None,
created_utc: None,
score: None,
num_replies: None,
depth: None,
is_submitter: None,
edited: None,
stickied: None,
distinguished: None,
}
}
}