/* tslint:disable */ /* eslint-disable */ /** * Tandoor * Tandoor API Docs * * The version of the OpenAPI document: 0.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { mapValues } from '../runtime'; import type { Keyword } from './Keyword'; import { KeywordFromJSON, KeywordFromJSONTyped, KeywordToJSON, } from './Keyword'; /** * * @export * @interface ImportLog */ export interface ImportLog { /** * * @type {number} * @memberof ImportLog */ id?: number; /** * * @type {string} * @memberof ImportLog */ type: string; /** * * @type {string} * @memberof ImportLog */ msg?: string; /** * * @type {boolean} * @memberof ImportLog */ running?: boolean; /** * * @type {Keyword} * @memberof ImportLog */ readonly keyword: Keyword; /** * * @type {number} * @memberof ImportLog */ totalRecipes?: number; /** * * @type {number} * @memberof ImportLog */ importedRecipes?: number; /** * * @type {number} * @memberof ImportLog */ readonly createdBy: number; /** * * @type {Date} * @memberof ImportLog */ readonly createdAt: Date; } /** * Check if a given object implements the ImportLog interface. */ export function instanceOfImportLog(value: object): value is ImportLog { if (!('type' in value) || value['type'] === undefined) return false; if (!('keyword' in value) || value['keyword'] === undefined) return false; if (!('createdBy' in value) || value['createdBy'] === undefined) return false; if (!('createdAt' in value) || value['createdAt'] === undefined) return false; return true; } export function ImportLogFromJSON(json: any): ImportLog { return ImportLogFromJSONTyped(json, false); } export function ImportLogFromJSONTyped(json: any, ignoreDiscriminator: boolean): ImportLog { if (json == null) { return json; } return { 'id': json['id'] == null ? undefined : json['id'], 'type': json['type'], 'msg': json['msg'] == null ? undefined : json['msg'], 'running': json['running'] == null ? undefined : json['running'], 'keyword': KeywordFromJSON(json['keyword']), 'totalRecipes': json['total_recipes'] == null ? undefined : json['total_recipes'], 'importedRecipes': json['imported_recipes'] == null ? undefined : json['imported_recipes'], 'createdBy': json['created_by'], 'createdAt': (new Date(json['created_at'])), }; } export function ImportLogToJSON(value?: Omit | null): any { if (value == null) { return value; } return { 'id': value['id'], 'type': value['type'], 'msg': value['msg'], 'running': value['running'], 'total_recipes': value['totalRecipes'], 'imported_recipes': value['importedRecipes'], }; }