mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 12:18:45 -05:00
135 lines
3.2 KiB
TypeScript
135 lines
3.2 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';
|
|
import type { ImportLogKeyword } from './ImportLogKeyword';
|
|
import {
|
|
ImportLogKeywordFromJSON,
|
|
ImportLogKeywordFromJSONTyped,
|
|
ImportLogKeywordToJSON,
|
|
} from './ImportLogKeyword';
|
|
|
|
/**
|
|
*
|
|
* @export
|
|
* @interface ImportLog
|
|
*/
|
|
export interface ImportLog {
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof ImportLog
|
|
*/
|
|
readonly id?: number;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof ImportLog
|
|
*/
|
|
type: string;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof ImportLog
|
|
*/
|
|
msg?: string;
|
|
/**
|
|
*
|
|
* @type {boolean}
|
|
* @memberof ImportLog
|
|
*/
|
|
running?: boolean;
|
|
/**
|
|
*
|
|
* @type {ImportLogKeyword}
|
|
* @memberof ImportLog
|
|
*/
|
|
keyword?: ImportLogKeyword;
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof ImportLog
|
|
*/
|
|
totalRecipes?: number;
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof ImportLog
|
|
*/
|
|
importedRecipes?: number;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof ImportLog
|
|
*/
|
|
readonly createdBy?: string;
|
|
/**
|
|
*
|
|
* @type {Date}
|
|
* @memberof ImportLog
|
|
*/
|
|
readonly createdAt?: Date;
|
|
}
|
|
|
|
/**
|
|
* Check if a given object implements the ImportLog interface.
|
|
*/
|
|
export function instanceOfImportLog(value: object): boolean {
|
|
let isInstance = true;
|
|
isInstance = isInstance && "type" in value;
|
|
|
|
return isInstance;
|
|
}
|
|
|
|
export function ImportLogFromJSON(json: any): ImportLog {
|
|
return ImportLogFromJSONTyped(json, false);
|
|
}
|
|
|
|
export function ImportLogFromJSONTyped(json: any, ignoreDiscriminator: boolean): ImportLog {
|
|
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'],
|
|
'keyword': !exists(json, 'keyword') ? undefined : ImportLogKeywordFromJSON(json['keyword']),
|
|
'totalRecipes': !exists(json, 'total_recipes') ? undefined : json['total_recipes'],
|
|
'importedRecipes': !exists(json, 'imported_recipes') ? undefined : json['imported_recipes'],
|
|
'createdBy': !exists(json, 'created_by') ? undefined : json['created_by'],
|
|
'createdAt': !exists(json, 'created_at') ? undefined : (new Date(json['created_at'])),
|
|
};
|
|
}
|
|
|
|
export function ImportLogToJSON(value?: ImportLog | null): any {
|
|
if (value === undefined) {
|
|
return undefined;
|
|
}
|
|
if (value === null) {
|
|
return null;
|
|
}
|
|
return {
|
|
|
|
'type': value.type,
|
|
'msg': value.msg,
|
|
'running': value.running,
|
|
'keyword': ImportLogKeywordToJSON(value.keyword),
|
|
'total_recipes': value.totalRecipes,
|
|
'imported_recipes': value.importedRecipes,
|
|
};
|
|
}
|
|
|