Files
recipes/vue3/models/ExportLog.ts
2024-03-27 08:34:19 -05:00

136 lines
3.3 KiB
TypeScript

/* tslint:disable */
/* eslint-disable */
/**
* Django Recipes
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document:
*
*
* 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';
/**
*
* @export
* @interface ExportLog
*/
export interface ExportLog {
/**
*
* @type {number}
* @memberof ExportLog
*/
readonly id?: number;
/**
*
* @type {string}
* @memberof ExportLog
*/
type: string;
/**
*
* @type {string}
* @memberof ExportLog
*/
msg?: string;
/**
*
* @type {boolean}
* @memberof ExportLog
*/
running?: boolean;
/**
*
* @type {number}
* @memberof ExportLog
*/
totalRecipes?: number;
/**
*
* @type {number}
* @memberof ExportLog
*/
exportedRecipes?: number;
/**
*
* @type {number}
* @memberof ExportLog
*/
cacheDuration?: number;
/**
*
* @type {boolean}
* @memberof ExportLog
*/
possiblyNotExpired?: boolean;
/**
*
* @type {string}
* @memberof ExportLog
*/
readonly createdBy?: string;
/**
*
* @type {Date}
* @memberof ExportLog
*/
readonly createdAt?: Date;
}
/**
* Check if a given object implements the ExportLog interface.
*/
export function instanceOfExportLog(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "type" in value;
return isInstance;
}
export function ExportLogFromJSON(json: any): ExportLog {
return ExportLogFromJSONTyped(json, false);
}
export function ExportLogFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExportLog {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': !exists(json, 'id') ? undefined : json['id'],
'type': json['type'],
'msg': !exists(json, 'msg') ? undefined : json['msg'],
'running': !exists(json, 'running') ? undefined : json['running'],
'totalRecipes': !exists(json, 'total_recipes') ? undefined : json['total_recipes'],
'exportedRecipes': !exists(json, 'exported_recipes') ? undefined : json['exported_recipes'],
'cacheDuration': !exists(json, 'cache_duration') ? undefined : json['cache_duration'],
'possiblyNotExpired': !exists(json, 'possibly_not_expired') ? undefined : json['possibly_not_expired'],
'createdBy': !exists(json, 'created_by') ? undefined : json['created_by'],
'createdAt': !exists(json, 'created_at') ? undefined : (new Date(json['created_at'])),
};
}
export function ExportLogToJSON(value?: ExportLog | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'type': value.type,
'msg': value.msg,
'running': value.running,
'total_recipes': value.totalRecipes,
'exported_recipes': value.exportedRecipes,
'cache_duration': value.cacheDuration,
'possibly_not_expired': value.possiblyNotExpired,
};
}