jellyfin-discord-bot/server/jellyfin/models/CreateAdminNotificationRequ...

97 lines
2.8 KiB
TypeScript

/* 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 admin notification dto.
* @export
* @interface CreateAdminNotificationRequest
*/
export interface CreateAdminNotificationRequest {
/**
* Gets or sets the notification name.
* @type {string}
* @memberof CreateAdminNotificationRequest
*/
name?: string | null;
/**
* Gets or sets the notification description.
* @type {string}
* @memberof CreateAdminNotificationRequest
*/
description?: string | null;
/**
*
* @type {NotificationLevel}
* @memberof CreateAdminNotificationRequest
*/
notificationLevel?: NotificationLevel | null;
/**
* Gets or sets the notification url.
* @type {string}
* @memberof CreateAdminNotificationRequest
*/
url?: string | null;
}
/**
* Check if a given object implements the CreateAdminNotificationRequest interface.
*/
export function instanceOfCreateAdminNotificationRequest(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function CreateAdminNotificationRequestFromJSON(json: any): CreateAdminNotificationRequest {
return CreateAdminNotificationRequestFromJSONTyped(json, false);
}
export function CreateAdminNotificationRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateAdminNotificationRequest {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'name': !exists(json, 'Name') ? undefined : json['Name'],
'description': !exists(json, 'Description') ? undefined : json['Description'],
'notificationLevel': !exists(json, 'NotificationLevel') ? undefined : NotificationLevelFromJSON(json['NotificationLevel']),
'url': !exists(json, 'Url') ? undefined : json['Url'],
};
}
export function CreateAdminNotificationRequestToJSON(value?: CreateAdminNotificationRequest | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'Name': value.name,
'Description': value.description,
'NotificationLevel': NotificationLevelToJSON(value.notificationLevel),
'Url': value.url,
};
}