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

129 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 { TaskCompletionStatus } from './TaskCompletionStatus';
import {
TaskCompletionStatusFromJSON,
TaskCompletionStatusFromJSONTyped,
TaskCompletionStatusToJSON,
} from './TaskCompletionStatus';
/**
* Gets or sets the last execution result.
* @export
* @interface TaskInfoLastExecutionResult
*/
export interface TaskInfoLastExecutionResult {
/**
* Gets or sets the start time UTC.
* @type {Date}
* @memberof TaskInfoLastExecutionResult
*/
startTimeUtc?: Date;
/**
* Gets or sets the end time UTC.
* @type {Date}
* @memberof TaskInfoLastExecutionResult
*/
endTimeUtc?: Date;
/**
*
* @type {TaskCompletionStatus}
* @memberof TaskInfoLastExecutionResult
*/
status?: TaskCompletionStatus;
/**
* Gets or sets the name.
* @type {string}
* @memberof TaskInfoLastExecutionResult
*/
name?: string | null;
/**
* Gets or sets the key.
* @type {string}
* @memberof TaskInfoLastExecutionResult
*/
key?: string | null;
/**
* Gets or sets the id.
* @type {string}
* @memberof TaskInfoLastExecutionResult
*/
id?: string | null;
/**
* Gets or sets the error message.
* @type {string}
* @memberof TaskInfoLastExecutionResult
*/
errorMessage?: string | null;
/**
* Gets or sets the long error message.
* @type {string}
* @memberof TaskInfoLastExecutionResult
*/
longErrorMessage?: string | null;
}
/**
* Check if a given object implements the TaskInfoLastExecutionResult interface.
*/
export function instanceOfTaskInfoLastExecutionResult(value: object): boolean {
let isInstance = true;
return isInstance;
}
export function TaskInfoLastExecutionResultFromJSON(json: any): TaskInfoLastExecutionResult {
return TaskInfoLastExecutionResultFromJSONTyped(json, false);
}
export function TaskInfoLastExecutionResultFromJSONTyped(json: any, ignoreDiscriminator: boolean): TaskInfoLastExecutionResult {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'startTimeUtc': !exists(json, 'StartTimeUtc') ? undefined : (new Date(json['StartTimeUtc'])),
'endTimeUtc': !exists(json, 'EndTimeUtc') ? undefined : (new Date(json['EndTimeUtc'])),
'status': !exists(json, 'Status') ? undefined : TaskCompletionStatusFromJSON(json['Status']),
'name': !exists(json, 'Name') ? undefined : json['Name'],
'key': !exists(json, 'Key') ? undefined : json['Key'],
'id': !exists(json, 'Id') ? undefined : json['Id'],
'errorMessage': !exists(json, 'ErrorMessage') ? undefined : json['ErrorMessage'],
'longErrorMessage': !exists(json, 'LongErrorMessage') ? undefined : json['LongErrorMessage'],
};
}
export function TaskInfoLastExecutionResultToJSON(value?: TaskInfoLastExecutionResult | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'StartTimeUtc': value.startTimeUtc === undefined ? undefined : (value.startTimeUtc.toISOString()),
'EndTimeUtc': value.endTimeUtc === undefined ? undefined : (value.endTimeUtc.toISOString()),
'Status': TaskCompletionStatusToJSON(value.status),
'Name': value.name,
'Key': value.key,
'Id': value.id,
'ErrorMessage': value.errorMessage,
'LongErrorMessage': value.longErrorMessage,
};
}