fastcomments-sdk 3.0.1

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 CommentUserMentionInfo {
    #[serde(rename = "id")]
    pub id: String,
    #[serde(rename = "tag")]
    pub tag: String,
    #[serde(rename = "rawTag", skip_serializing_if = "Option::is_none")]
    pub raw_tag: Option<String>,
    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
    pub r#type: Option<Type>,
    #[serde(rename = "sent", skip_serializing_if = "Option::is_none")]
    pub sent: Option<bool>,
}

impl CommentUserMentionInfo {
    pub fn new(id: String, tag: String) -> CommentUserMentionInfo {
        CommentUserMentionInfo {
            id,
            tag,
            raw_tag: None,
            r#type: None,
            sent: None,
        }
    }
}
/// 
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Type {
    #[serde(rename = "user")]
    User,
    #[serde(rename = "sso")]
    Sso,
}

impl Default for Type {
    fn default() -> Type {
        Self::User
    }
}