/*
 * 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 UpdateCommentAutomationRequest {
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: 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 (1-3). Pass [] to clear all buttons.
    #[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 = "isActive", skip_serializing_if = "Option::is_none")]
    pub is_active: Option<bool>,
}

impl UpdateCommentAutomationRequest {
    pub fn new() -> UpdateCommentAutomationRequest {
        UpdateCommentAutomationRequest {
            name: None,
            keywords: None,
            match_mode: None,
            dm_message: None,
            buttons: None,
            comment_reply: None,
            is_active: None,
        }
    }
}
///
#[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
    }
}
