vrchatapi 1.20.7

VRChat API Client for Rust
Documentation
/*
 * VRChat API Documentation
 *
 *
 * Contact: vrchatapi.lpv0t@aries.fyi
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct NotificationV2Response {
    #[serde(rename = "data")]
    pub data: String,
    #[serde(rename = "icon")]
    pub icon: String,
    #[serde(rename = "text")]
    pub text: String,
    #[serde(rename = "textKey", deserialize_with = "Option::deserialize")]
    pub text_key: Option<String>,
    #[serde(rename = "type")]
    pub r#type: String,
}

impl NotificationV2Response {
    pub fn new(
        data: String,
        icon: String,
        text: String,
        text_key: Option<String>,
        r#type: String,
    ) -> NotificationV2Response {
        NotificationV2Response {
            data,
            icon,
            text,
            text_key,
            r#type,
        }
    }
}