mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 04:10:06 -05:00
97 lines
2.2 KiB
TypeScript
97 lines
2.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';
|
|
/**
|
|
*
|
|
* @export
|
|
* @interface RecipeBookEntry
|
|
*/
|
|
export interface RecipeBookEntry {
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof RecipeBookEntry
|
|
*/
|
|
readonly id?: number;
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof RecipeBookEntry
|
|
*/
|
|
book: number;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof RecipeBookEntry
|
|
*/
|
|
readonly bookContent?: string;
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof RecipeBookEntry
|
|
*/
|
|
recipe: number;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof RecipeBookEntry
|
|
*/
|
|
readonly recipeContent?: string;
|
|
}
|
|
|
|
/**
|
|
* Check if a given object implements the RecipeBookEntry interface.
|
|
*/
|
|
export function instanceOfRecipeBookEntry(value: object): boolean {
|
|
let isInstance = true;
|
|
isInstance = isInstance && "book" in value;
|
|
isInstance = isInstance && "recipe" in value;
|
|
|
|
return isInstance;
|
|
}
|
|
|
|
export function RecipeBookEntryFromJSON(json: any): RecipeBookEntry {
|
|
return RecipeBookEntryFromJSONTyped(json, false);
|
|
}
|
|
|
|
export function RecipeBookEntryFromJSONTyped(json: any, ignoreDiscriminator: boolean): RecipeBookEntry {
|
|
if ((json === undefined) || (json === null)) {
|
|
return json;
|
|
}
|
|
return {
|
|
|
|
'id': !exists(json, 'id') ? undefined : json['id'],
|
|
'book': json['book'],
|
|
'bookContent': !exists(json, 'book_content') ? undefined : json['book_content'],
|
|
'recipe': json['recipe'],
|
|
'recipeContent': !exists(json, 'recipe_content') ? undefined : json['recipe_content'],
|
|
};
|
|
}
|
|
|
|
export function RecipeBookEntryToJSON(value?: RecipeBookEntry | null): any {
|
|
if (value === undefined) {
|
|
return undefined;
|
|
}
|
|
if (value === null) {
|
|
return null;
|
|
}
|
|
return {
|
|
|
|
'book': value.book,
|
|
'recipe': value.recipe,
|
|
};
|
|
}
|
|
|