jellyfin-discord-bot/server/jellyfin/models/NotificationOption.ts

113 lines
3.3 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 { SendToUserType } from './SendToUserType';
import {
SendToUserTypeFromJSON,
SendToUserTypeFromJSONTyped,
SendToUserTypeToJSON,
} from './SendToUserType';
/**
*
* @export
* @interface NotificationOption
*/
export interface NotificationOption {
/**
*
* @type {string}
* @memberof NotificationOption
*/
type?: string | null;
/**
* Gets or sets user Ids to not monitor (it's opt out).
* @type {Array<string>}
* @memberof NotificationOption
*/
disabledMonitorUsers?: Array<string>;
/**
* Gets or sets user Ids to send to (if SendToUserMode == Custom).
* @type {Array<string>}
* @memberof NotificationOption
*/
sendToUsers?: Array<string>;
/**
* Gets or sets a value indicating whether this MediaBrowser.Model.Notifications.NotificationOption is enabled.
* @type {boolean}
* @memberof NotificationOption
*/
enabled?: boolean;
/**
* Gets or sets the disabled services.
* @type {Array<string>}
* @memberof NotificationOption
*/
disabledServices?: Array<string>;
/**
*
* @type {SendToUserType}
* @memberof NotificationOption
*/
sendToUserMode?: SendToUserType;
}
/**
* Check if a given object implements the NotificationOption interface.
*/
export function instanceOfNotificationOption(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function NotificationOptionFromJSON(json: any): NotificationOption {
return NotificationOptionFromJSONTyped(json, false);
}
export function NotificationOptionFromJSONTyped(json: any, ignoreDiscriminator: boolean): NotificationOption {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'type': !exists(json, 'Type') ? undefined : json['Type'],
'disabledMonitorUsers': !exists(json, 'DisabledMonitorUsers') ? undefined : json['DisabledMonitorUsers'],
'sendToUsers': !exists(json, 'SendToUsers') ? undefined : json['SendToUsers'],
'enabled': !exists(json, 'Enabled') ? undefined : json['Enabled'],
'disabledServices': !exists(json, 'DisabledServices') ? undefined : json['DisabledServices'],
'sendToUserMode': !exists(json, 'SendToUserMode') ? undefined : SendToUserTypeFromJSON(json['SendToUserMode']),
};
}
export function NotificationOptionToJSON(value?: NotificationOption | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'Type': value.type,
'DisabledMonitorUsers': value.disabledMonitorUsers,
'SendToUsers': value.sendToUsers,
'Enabled': value.enabled,
'DisabledServices': value.disabledServices,
'SendToUserMode': SendToUserTypeToJSON(value.sendToUserMode),
};
}