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

146 lines
3.9 KiB
TypeScript
Raw Normal View History

2023-05-04 23:34:53 +02:00
/* 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 { LogLevel } from './LogLevel';
import {
LogLevelFromJSON,
LogLevelFromJSONTyped,
LogLevelToJSON,
} from './LogLevel';
/**
* An activity log entry.
* @export
* @interface ActivityLogEntry
*/
export interface ActivityLogEntry {
/**
* Gets or sets the identifier.
* @type {number}
* @memberof ActivityLogEntry
*/
id?: number;
/**
* Gets or sets the name.
* @type {string}
* @memberof ActivityLogEntry
*/
name?: string;
/**
* Gets or sets the overview.
* @type {string}
* @memberof ActivityLogEntry
*/
overview?: string | null;
/**
* Gets or sets the short overview.
* @type {string}
* @memberof ActivityLogEntry
*/
shortOverview?: string | null;
/**
* Gets or sets the type.
* @type {string}
* @memberof ActivityLogEntry
*/
type?: string;
/**
* Gets or sets the item identifier.
* @type {string}
* @memberof ActivityLogEntry
*/
itemId?: string | null;
/**
* Gets or sets the date.
* @type {Date}
* @memberof ActivityLogEntry
*/
date?: Date;
/**
* Gets or sets the user identifier.
* @type {string}
* @memberof ActivityLogEntry
*/
userId?: string;
/**
* Gets or sets the user primary image tag.
* @type {string}
* @memberof ActivityLogEntry
* @deprecated
*/
userPrimaryImageTag?: string | null;
/**
*
* @type {LogLevel}
* @memberof ActivityLogEntry
*/
severity?: LogLevel;
}
/**
* Check if a given object implements the ActivityLogEntry interface.
*/
export function instanceOfActivityLogEntry(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function ActivityLogEntryFromJSON(json: any): ActivityLogEntry {
return ActivityLogEntryFromJSONTyped(json, false);
}
export function ActivityLogEntryFromJSONTyped(json: any, ignoreDiscriminator: boolean): ActivityLogEntry {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': !exists(json, 'Id') ? undefined : json['Id'],
'name': !exists(json, 'Name') ? undefined : json['Name'],
'overview': !exists(json, 'Overview') ? undefined : json['Overview'],
'shortOverview': !exists(json, 'ShortOverview') ? undefined : json['ShortOverview'],
'type': !exists(json, 'Type') ? undefined : json['Type'],
'itemId': !exists(json, 'ItemId') ? undefined : json['ItemId'],
'date': !exists(json, 'Date') ? undefined : (new Date(json['Date'])),
'userId': !exists(json, 'UserId') ? undefined : json['UserId'],
'userPrimaryImageTag': !exists(json, 'UserPrimaryImageTag') ? undefined : json['UserPrimaryImageTag'],
'severity': !exists(json, 'Severity') ? undefined : LogLevelFromJSON(json['Severity']),
};
}
export function ActivityLogEntryToJSON(value?: ActivityLogEntry | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'Id': value.id,
'Name': value.name,
'Overview': value.overview,
'ShortOverview': value.shortOverview,
'Type': value.type,
'ItemId': value.itemId,
'Date': value.date === undefined ? undefined : (value.date.toISOString()),
'UserId': value.userId,
'UserPrimaryImageTag': value.userPrimaryImageTag,
'Severity': LogLevelToJSON(value.severity),
};
}