fastcomments-sdk 2.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 GetMyNotificationsResponse {
    /// Construct a type with a set of properties K of type T
    #[serde(rename = "translations", skip_serializing_if = "Option::is_none")]
    pub translations: Option<std::collections::HashMap<String, String>>,
    #[serde(rename = "isSubscribed")]
    pub is_subscribed: bool,
    #[serde(rename = "hasMore")]
    pub has_more: bool,
    #[serde(rename = "notifications")]
    pub notifications: Vec<models::RenderableUserNotification>,
    #[serde(rename = "status")]
    pub status: models::ApiStatus,
}

impl GetMyNotificationsResponse {
    pub fn new(is_subscribed: bool, has_more: bool, notifications: Vec<models::RenderableUserNotification>, status: models::ApiStatus) -> GetMyNotificationsResponse {
        GetMyNotificationsResponse {
            translations: None,
            is_subscribed,
            has_more,
            notifications,
            status,
        }
    }
}