immich_api_rs 1.137.3

Immich API
Documentation
/*
 * Immich
 *
 * Immich API
 *
 * The version of the OpenAPI document: 1.137.3
 * 
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct NotificationDto {
    #[serde(rename = "createdAt")]
    pub created_at: String,
    #[serde(rename = "data", skip_serializing_if = "Option::is_none")]
    pub data: Option<serde_json::Value>,
    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    #[serde(rename = "id")]
    pub id: String,
    #[serde(rename = "level")]
    pub level: models::NotificationLevel,
    #[serde(rename = "readAt", skip_serializing_if = "Option::is_none")]
    pub read_at: Option<String>,
    #[serde(rename = "title")]
    pub title: String,
    #[serde(rename = "type")]
    pub r#type: models::NotificationType,
}

impl NotificationDto {
    pub fn new(created_at: String, id: String, level: models::NotificationLevel, title: String, r#type: models::NotificationType) -> NotificationDto {
        NotificationDto {
            created_at,
            data: None,
            description: None,
            id,
            level,
            read_at: None,
            title,
            r#type,
        }
    }
}