/*
 * 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 GetCommentAutomation200ResponseAutomation {
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    #[serde(rename = "platform", skip_serializing_if = "Option::is_none")]
    pub platform: Option<String>,
    #[serde(rename = "trigger", skip_serializing_if = "Option::is_none")]
    pub trigger: Option<Trigger>,
    #[serde(rename = "accountId", skip_serializing_if = "Option::is_none")]
    pub account_id: Option<String>,
    #[serde(rename = "platformPostId", skip_serializing_if = "Option::is_none")]
    pub platform_post_id: Option<String>,
    #[serde(rename = "postId", skip_serializing_if = "Option::is_none")]
    pub post_id: Option<String>,
    #[serde(rename = "postTitle", skip_serializing_if = "Option::is_none")]
    pub post_title: Option<String>,
    #[serde(rename = "keywords", skip_serializing_if = "Option::is_none")]
    pub keywords: Option<Vec<String>>,
    #[serde(rename = "matchMode", skip_serializing_if = "Option::is_none")]
    pub match_mode: Option<MatchMode>,
    #[serde(rename = "dmMessage", skip_serializing_if = "Option::is_none")]
    pub dm_message: Option<String>,
    /// Inline DM buttons (up to 3). Omitted when none are set.
    #[serde(rename = "buttons", skip_serializing_if = "Option::is_none")]
    pub buttons: Option<Vec<models::DmButton>>,
    #[serde(rename = "commentReply", skip_serializing_if = "Option::is_none")]
    pub comment_reply: Option<String>,
    #[serde(rename = "linkTracking", skip_serializing_if = "Option::is_none")]
    pub link_tracking: Option<bool>,
    #[serde(rename = "clickTag", skip_serializing_if = "Option::is_none")]
    pub click_tag: Option<String>,
    #[serde(rename = "isActive", skip_serializing_if = "Option::is_none")]
    pub is_active: Option<bool>,
    #[serde(rename = "stats", skip_serializing_if = "Option::is_none")]
    pub stats: Option<Box<models::CreateCommentAutomation200ResponseAutomationStats>>,
    #[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
    pub created_at: Option<String>,
    #[serde(rename = "updatedAt", skip_serializing_if = "Option::is_none")]
    pub updated_at: Option<String>,
}

impl GetCommentAutomation200ResponseAutomation {
    pub fn new() -> GetCommentAutomation200ResponseAutomation {
        GetCommentAutomation200ResponseAutomation {
            id: None,
            name: None,
            platform: None,
            trigger: None,
            account_id: None,
            platform_post_id: None,
            post_id: None,
            post_title: None,
            keywords: None,
            match_mode: None,
            dm_message: None,
            buttons: None,
            comment_reply: None,
            link_tracking: None,
            click_tag: None,
            is_active: None,
            stats: None,
            created_at: None,
            updated_at: None,
        }
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Trigger {
    #[serde(rename = "comment")]
    Comment,
    #[serde(rename = "story_reply")]
    StoryReply,
}

impl Default for Trigger {
    fn default() -> Trigger {
        Self::Comment
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum MatchMode {
    #[serde(rename = "exact")]
    Exact,
    #[serde(rename = "contains")]
    Contains,
}

impl Default for MatchMode {
    fn default() -> MatchMode {
        Self::Exact
    }
}
