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

146 lines
4.5 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';
/**
* Class UserItemDataDto.
* @export
* @interface UserItemDataDto
*/
export interface UserItemDataDto {
/**
* Gets or sets the rating.
* @type {number}
* @memberof UserItemDataDto
*/
rating?: number | null;
/**
* Gets or sets the played percentage.
* @type {number}
* @memberof UserItemDataDto
*/
playedPercentage?: number | null;
/**
* Gets or sets the unplayed item count.
* @type {number}
* @memberof UserItemDataDto
*/
unplayedItemCount?: number | null;
/**
* Gets or sets the playback position ticks.
* @type {number}
* @memberof UserItemDataDto
*/
playbackPositionTicks?: number;
/**
* Gets or sets the play count.
* @type {number}
* @memberof UserItemDataDto
*/
playCount?: number;
/**
* Gets or sets a value indicating whether this instance is favorite.
* @type {boolean}
* @memberof UserItemDataDto
*/
isFavorite?: boolean;
/**
* Gets or sets a value indicating whether this MediaBrowser.Model.Dto.UserItemDataDto is likes.
* @type {boolean}
* @memberof UserItemDataDto
*/
likes?: boolean | null;
/**
* Gets or sets the last played date.
* @type {Date}
* @memberof UserItemDataDto
*/
lastPlayedDate?: Date | null;
/**
* Gets or sets a value indicating whether this MediaBrowser.Model.Dto.UserItemDataDto is played.
* @type {boolean}
* @memberof UserItemDataDto
*/
played?: boolean;
/**
* Gets or sets the key.
* @type {string}
* @memberof UserItemDataDto
*/
key?: string | null;
/**
* Gets or sets the item identifier.
* @type {string}
* @memberof UserItemDataDto
*/
itemId?: string | null;
}
/**
* Check if a given object implements the UserItemDataDto interface.
*/
export function instanceOfUserItemDataDto(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function UserItemDataDtoFromJSON(json: any): UserItemDataDto {
return UserItemDataDtoFromJSONTyped(json, false);
}
export function UserItemDataDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserItemDataDto {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'rating': !exists(json, 'Rating') ? undefined : json['Rating'],
'playedPercentage': !exists(json, 'PlayedPercentage') ? undefined : json['PlayedPercentage'],
'unplayedItemCount': !exists(json, 'UnplayedItemCount') ? undefined : json['UnplayedItemCount'],
'playbackPositionTicks': !exists(json, 'PlaybackPositionTicks') ? undefined : json['PlaybackPositionTicks'],
'playCount': !exists(json, 'PlayCount') ? undefined : json['PlayCount'],
'isFavorite': !exists(json, 'IsFavorite') ? undefined : json['IsFavorite'],
'likes': !exists(json, 'Likes') ? undefined : json['Likes'],
'lastPlayedDate': !exists(json, 'LastPlayedDate') ? undefined : (json['LastPlayedDate'] === null ? null : new Date(json['LastPlayedDate'])),
'played': !exists(json, 'Played') ? undefined : json['Played'],
'key': !exists(json, 'Key') ? undefined : json['Key'],
'itemId': !exists(json, 'ItemId') ? undefined : json['ItemId'],
};
}
export function UserItemDataDtoToJSON(value?: UserItemDataDto | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'Rating': value.rating,
'PlayedPercentage': value.playedPercentage,
'UnplayedItemCount': value.unplayedItemCount,
'PlaybackPositionTicks': value.playbackPositionTicks,
'PlayCount': value.playCount,
'IsFavorite': value.isFavorite,
'Likes': value.likes,
'LastPlayedDate': value.lastPlayedDate === undefined ? undefined : (value.lastPlayedDate === null ? null : value.lastPlayedDate.toISOString()),
'Played': value.played,
'Key': value.key,
'ItemId': value.itemId,
};
}