/*
 * 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};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct GetAccountPosts200ResponsePostsInner {
    #[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 = "picture",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub picture: Option<Option<String>>,
    #[serde(
        rename = "permalink",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub permalink: Option<Option<String>>,
    #[serde(
        rename = "mediaType",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub media_type: Option<Option<String>>,
    #[serde(
        rename = "commentCount",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub comment_count: Option<Option<i32>>,
    #[serde(
        rename = "likeCount",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub like_count: Option<Option<i32>>,
    #[serde(
        rename = "reactionCount",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub reaction_count: Option<Option<i32>>,
    #[serde(
        rename = "shareCount",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub share_count: Option<Option<i32>>,
    #[serde(rename = "platform", skip_serializing_if = "Option::is_none")]
    pub platform: Option<String>,
    /// Bluesky only. Content ID needed for fetching replies.
    #[serde(
        rename = "cid",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub cid: Option<Option<String>>,
    /// Reddit only. Subreddit name, needed for fetching comments.
    #[serde(
        rename = "subreddit",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub subreddit: Option<Option<String>>,
}

impl GetAccountPosts200ResponsePostsInner {
    pub fn new() -> GetAccountPosts200ResponsePostsInner {
        GetAccountPosts200ResponsePostsInner {
            id: None,
            message: None,
            created_time: None,
            picture: None,
            permalink: None,
            media_type: None,
            comment_count: None,
            like_count: None,
            reaction_count: None,
            share_count: None,
            platform: None,
            cid: None,
            subreddit: None,
        }
    }
}
