late 0.0.297

API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
Documentation
/*
 * 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};

/// GetInboxPostComments200ResponsePost : (Reddit only) Metadata for the target post, returned alongside the comments in Reddit's single round-trip. Lets integrators render a preview of the post the user is commenting on without an additional request. Absent for non-Reddit platforms and when the upstream response is missing the post listing (deleted post, malformed response).
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct GetInboxPostComments200ResponsePost {
    /// Reddit post base36 id (e.g. \"1tjtj26\")
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<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
    #[serde(rename = "author", skip_serializing_if = "Option::is_none")]
    pub author: Option<String>,
    /// Subreddit name
    #[serde(rename = "subreddit", skip_serializing_if = "Option::is_none")]
    pub subreddit: Option<String>,
    /// Absolute URL to the post on reddit.com
    #[serde(rename = "permalink", skip_serializing_if = "Option::is_none")]
    pub permalink: Option<String>,
    /// For link posts
    #[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>,
}

impl GetInboxPostComments200ResponsePost {
    /// (Reddit only) Metadata for the target post, returned alongside the comments in Reddit's single round-trip. Lets integrators render a preview of the post the user is commenting on without an additional request. Absent for non-Reddit platforms and when the upstream response is missing the post listing (deleted post, malformed response).
    pub fn new() -> GetInboxPostComments200ResponsePost {
        GetInboxPostComments200ResponsePost {
            id: None,
            fullname: None,
            title: None,
            selftext: None,
            author: None,
            subreddit: None,
            permalink: None,
            url: None,
            score: None,
            num_comments: None,
            created_utc: None,
            over18: None,
            stickied: None,
            flair_text: None,
            is_gallery: None,
        }
    }
}