fastcomments-sdk 3.0.0

Official FastComments Rust SDK (Typed API Client & Utilities)
Documentation
/*
 * fastcomments
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 0.0.0
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::client::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct SpamRule {
    #[serde(rename = "actions")]
    pub actions: Vec<Actions>,
    #[serde(rename = "commentContains", skip_serializing_if = "Option::is_none")]
    pub comment_contains: Option<String>,
}

impl SpamRule {
    pub fn new(actions: Vec<Actions>) -> SpamRule {
        SpamRule {
            actions,
            comment_contains: None,
        }
    }
}
/// 
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Actions {
    #[serde(rename = "spam")]
    Spam,
    #[serde(rename = "not-spam")]
    NotSpam,
    #[serde(rename = "ignore-repeat")]
    IgnoreRepeat,
}

impl Default for Actions {
    fn default() -> Actions {
        Self::Spam
    }
}