/*
 * 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.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 WebhookPayloadCommentComment {
    /// Platform comment ID
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    /// Internal post ID
    #[serde(rename = "postId", skip_serializing_if = "Option::is_none")]
    pub post_id: Option<String>,
    /// Platform's post ID
    #[serde(rename = "platformPostId", skip_serializing_if = "Option::is_none")]
    pub platform_post_id: Option<String>,
    #[serde(rename = "platform", skip_serializing_if = "Option::is_none")]
    pub platform: Option<Platform>,
    /// Comment text content
    #[serde(rename = "text", skip_serializing_if = "Option::is_none")]
    pub text: Option<String>,
    #[serde(rename = "author", skip_serializing_if = "Option::is_none")]
    pub author: Option<Box<models::WebhookPayloadCommentCommentAuthor>>,
    #[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
    pub created_at: Option<String>,
    /// Whether this is a reply to another comment
    #[serde(rename = "isReply", skip_serializing_if = "Option::is_none")]
    pub is_reply: Option<bool>,
    /// Parent comment ID if this is a reply
    #[serde(rename = "parentCommentId", skip_serializing_if = "Option::is_none")]
    pub parent_comment_id: Option<String>,
}

impl WebhookPayloadCommentComment {
    pub fn new() -> WebhookPayloadCommentComment {
        WebhookPayloadCommentComment {
            id: None,
            post_id: None,
            platform_post_id: None,
            platform: None,
            text: None,
            author: None,
            created_at: None,
            is_reply: None,
            parent_comment_id: None,
        }
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Platform {
    #[serde(rename = "instagram")]
    Instagram,
    #[serde(rename = "facebook")]
    Facebook,
    #[serde(rename = "twitter")]
    Twitter,
    #[serde(rename = "youtube")]
    Youtube,
    #[serde(rename = "linkedin")]
    Linkedin,
    #[serde(rename = "bluesky")]
    Bluesky,
    #[serde(rename = "reddit")]
    Reddit,
}

impl Default for Platform {
    fn default() -> Platform {
        Self::Instagram
    }
}
