/* tslint:disable */ /* eslint-disable */ /** * Jellyfin API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 10.8.9 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { exists, mapValues } from '../runtime'; import type { NotificationLevel } from './NotificationLevel'; import { NotificationLevelFromJSON, NotificationLevelFromJSONTyped, NotificationLevelToJSON, } from './NotificationLevel'; /** * The notification DTO. * @export * @interface NotificationDto */ export interface NotificationDto { /** * Gets or sets the notification ID. Defaults to an empty string. * @type {string} * @memberof NotificationDto */ id?: string; /** * Gets or sets the notification's user ID. Defaults to an empty string. * @type {string} * @memberof NotificationDto */ userId?: string; /** * Gets or sets the notification date. * @type {Date} * @memberof NotificationDto */ date?: Date; /** * Gets or sets a value indicating whether the notification has been read. Defaults to false. * @type {boolean} * @memberof NotificationDto */ isRead?: boolean; /** * Gets or sets the notification's name. Defaults to an empty string. * @type {string} * @memberof NotificationDto */ name?: string; /** * Gets or sets the notification's description. Defaults to an empty string. * @type {string} * @memberof NotificationDto */ description?: string; /** * Gets or sets the notification's URL. Defaults to an empty string. * @type {string} * @memberof NotificationDto */ url?: string; /** * * @type {NotificationLevel} * @memberof NotificationDto */ level?: NotificationLevel; } /** * Check if a given object implements the NotificationDto interface. */ export function instanceOfNotificationDto(value: object): boolean { let isInstance = true; return isInstance; } export function NotificationDtoFromJSON(json: any): NotificationDto { return NotificationDtoFromJSONTyped(json, false); } export function NotificationDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): NotificationDto { if ((json === undefined) || (json === null)) { return json; } return { 'id': !exists(json, 'Id') ? undefined : json['Id'], 'userId': !exists(json, 'UserId') ? undefined : json['UserId'], 'date': !exists(json, 'Date') ? undefined : (new Date(json['Date'])), 'isRead': !exists(json, 'IsRead') ? undefined : json['IsRead'], 'name': !exists(json, 'Name') ? undefined : json['Name'], 'description': !exists(json, 'Description') ? undefined : json['Description'], 'url': !exists(json, 'Url') ? undefined : json['Url'], 'level': !exists(json, 'Level') ? undefined : NotificationLevelFromJSON(json['Level']), }; } export function NotificationDtoToJSON(value?: NotificationDto | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'Id': value.id, 'UserId': value.userId, 'Date': value.date === undefined ? undefined : (value.date.toISOString()), 'IsRead': value.isRead, 'Name': value.name, 'Description': value.description, 'Url': value.url, 'Level': NotificationLevelToJSON(value.level), }; }