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

/// WebhookPayloadComment : Webhook payload for comment received events (Instagram, Facebook, Twitter/X, YouTube, LinkedIn, Bluesky, Reddit)
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct WebhookPayloadComment {
    #[serde(rename = "event", skip_serializing_if = "Option::is_none")]
    pub event: Option<Event>,
    #[serde(rename = "comment", skip_serializing_if = "Option::is_none")]
    pub comment: Option<Box<models::WebhookPayloadCommentComment>>,
    #[serde(rename = "post", skip_serializing_if = "Option::is_none")]
    pub post: Option<Box<models::WebhookPayloadCommentPost>>,
    #[serde(rename = "account", skip_serializing_if = "Option::is_none")]
    pub account: Option<Box<models::WebhookPayloadCommentAccount>>,
    #[serde(rename = "timestamp", skip_serializing_if = "Option::is_none")]
    pub timestamp: Option<String>,
}

impl WebhookPayloadComment {
    /// Webhook payload for comment received events (Instagram, Facebook, Twitter/X, YouTube, LinkedIn, Bluesky, Reddit)
    pub fn new() -> WebhookPayloadComment {
        WebhookPayloadComment {
            event: None,
            comment: None,
            post: None,
            account: None,
            timestamp: None,
        }
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Event {
    #[serde(rename = "comment.received")]
    CommentReceived,
}

impl Default for Event {
    fn default() -> Event {
        Self::CommentReceived
    }
}
