/* tslint:disable */ /* eslint-disable */ /** * authentik * Making authentication simple. * * The version of the OpenAPI document: 2025.6.3 * Contact: hello@goauthentik.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { mapValues } from '../runtime'; import type { SeverityEnum } from './SeverityEnum'; import { SeverityEnumFromJSON, SeverityEnumFromJSONTyped, SeverityEnumToJSON, SeverityEnumToJSONTyped, } from './SeverityEnum'; import type { Event } from './Event'; import { EventFromJSON, EventFromJSONTyped, EventToJSON, EventToJSONTyped, } from './Event'; /** * Notification Serializer * @export * @interface Notification */ export interface Notification { /** * * @type {string} * @memberof Notification */ readonly pk: string; /** * * @type {SeverityEnum} * @memberof Notification */ readonly severity: SeverityEnum; /** * * @type {string} * @memberof Notification */ readonly body: string; /** * * @type {Date} * @memberof Notification */ readonly created: Date; /** * * @type {Event} * @memberof Notification */ event?: Event; /** * * @type {boolean} * @memberof Notification */ seen?: boolean; } /** * Check if a given object implements the Notification interface. */ export function instanceOfNotification(value: object): value is Notification { if (!('pk' in value) || value['pk'] === undefined) return false; if (!('severity' in value) || value['severity'] === undefined) return false; if (!('body' in value) || value['body'] === undefined) return false; if (!('created' in value) || value['created'] === undefined) return false; return true; } export function NotificationFromJSON(json: any): Notification { return NotificationFromJSONTyped(json, false); } export function NotificationFromJSONTyped(json: any, ignoreDiscriminator: boolean): Notification { if (json == null) { return json; } return { 'pk': json['pk'], 'severity': SeverityEnumFromJSON(json['severity']), 'body': json['body'], 'created': (new Date(json['created'])), 'event': json['event'] == null ? undefined : EventFromJSON(json['event']), 'seen': json['seen'] == null ? undefined : json['seen'], }; } export function NotificationToJSON(json: any): Notification { return NotificationToJSONTyped(json, false); } export function NotificationToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'event': EventToJSON(value['event']), 'seen': value['seen'], }; }