mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2025-12-24 02:39:20 -05:00
201 lines
4.8 KiB
TypeScript
201 lines
4.8 KiB
TypeScript
/* 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 { exists, mapValues } from '../runtime';
|
|
import type { KeywordLabel } from './KeywordLabel';
|
|
import {
|
|
KeywordLabelFromJSON,
|
|
KeywordLabelFromJSONTyped,
|
|
KeywordLabelToJSON,
|
|
} from './KeywordLabel';
|
|
|
|
/**
|
|
* Adds nested create feature
|
|
* @export
|
|
* @interface RecipeOverview
|
|
*/
|
|
export interface RecipeOverview {
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof RecipeOverview
|
|
*/
|
|
readonly id: number;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof RecipeOverview
|
|
*/
|
|
readonly name: string;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof RecipeOverview
|
|
*/
|
|
readonly description: string | null;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof RecipeOverview
|
|
*/
|
|
readonly image: string | null;
|
|
/**
|
|
*
|
|
* @type {Array<KeywordLabel>}
|
|
* @memberof RecipeOverview
|
|
*/
|
|
readonly keywords: Array<KeywordLabel>;
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof RecipeOverview
|
|
*/
|
|
readonly workingTime: number;
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof RecipeOverview
|
|
*/
|
|
readonly waitingTime: number;
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof RecipeOverview
|
|
*/
|
|
readonly createdBy: number;
|
|
/**
|
|
*
|
|
* @type {Date}
|
|
* @memberof RecipeOverview
|
|
*/
|
|
readonly createdAt: Date;
|
|
/**
|
|
*
|
|
* @type {Date}
|
|
* @memberof RecipeOverview
|
|
*/
|
|
readonly updatedAt: Date;
|
|
/**
|
|
*
|
|
* @type {boolean}
|
|
* @memberof RecipeOverview
|
|
*/
|
|
readonly internal: boolean;
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof RecipeOverview
|
|
*/
|
|
readonly servings: number;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof RecipeOverview
|
|
*/
|
|
readonly servingsText: string;
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof RecipeOverview
|
|
*/
|
|
readonly rating: number | null;
|
|
/**
|
|
*
|
|
* @type {Date}
|
|
* @memberof RecipeOverview
|
|
*/
|
|
readonly lastCooked: Date | null;
|
|
/**
|
|
*
|
|
* @type {boolean}
|
|
* @memberof RecipeOverview
|
|
*/
|
|
readonly _new: boolean;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof RecipeOverview
|
|
*/
|
|
readonly recent: string;
|
|
}
|
|
|
|
/**
|
|
* Check if a given object implements the RecipeOverview interface.
|
|
*/
|
|
export function instanceOfRecipeOverview(value: object): boolean {
|
|
let isInstance = true;
|
|
isInstance = isInstance && "id" in value;
|
|
isInstance = isInstance && "name" in value;
|
|
isInstance = isInstance && "description" in value;
|
|
isInstance = isInstance && "image" in value;
|
|
isInstance = isInstance && "keywords" in value;
|
|
isInstance = isInstance && "workingTime" in value;
|
|
isInstance = isInstance && "waitingTime" in value;
|
|
isInstance = isInstance && "createdBy" in value;
|
|
isInstance = isInstance && "createdAt" in value;
|
|
isInstance = isInstance && "updatedAt" in value;
|
|
isInstance = isInstance && "internal" in value;
|
|
isInstance = isInstance && "servings" in value;
|
|
isInstance = isInstance && "servingsText" in value;
|
|
isInstance = isInstance && "rating" in value;
|
|
isInstance = isInstance && "lastCooked" in value;
|
|
isInstance = isInstance && "_new" in value;
|
|
isInstance = isInstance && "recent" in value;
|
|
|
|
return isInstance;
|
|
}
|
|
|
|
export function RecipeOverviewFromJSON(json: any): RecipeOverview {
|
|
return RecipeOverviewFromJSONTyped(json, false);
|
|
}
|
|
|
|
export function RecipeOverviewFromJSONTyped(json: any, ignoreDiscriminator: boolean): RecipeOverview {
|
|
if ((json === undefined) || (json === null)) {
|
|
return json;
|
|
}
|
|
return {
|
|
|
|
'id': json['id'],
|
|
'name': json['name'],
|
|
'description': json['description'],
|
|
'image': json['image'],
|
|
'keywords': ((json['keywords'] as Array<any>).map(KeywordLabelFromJSON)),
|
|
'workingTime': json['working_time'],
|
|
'waitingTime': json['waiting_time'],
|
|
'createdBy': json['created_by'],
|
|
'createdAt': (new Date(json['created_at'])),
|
|
'updatedAt': (new Date(json['updated_at'])),
|
|
'internal': json['internal'],
|
|
'servings': json['servings'],
|
|
'servingsText': json['servings_text'],
|
|
'rating': json['rating'],
|
|
'lastCooked': (json['last_cooked'] === null ? null : new Date(json['last_cooked'])),
|
|
'_new': json['new'],
|
|
'recent': json['recent'],
|
|
};
|
|
}
|
|
|
|
export function RecipeOverviewToJSON(value?: RecipeOverview | null): any {
|
|
if (value === undefined) {
|
|
return undefined;
|
|
}
|
|
if (value === null) {
|
|
return null;
|
|
}
|
|
return {
|
|
|
|
};
|
|
}
|
|
|