mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2025-12-24 02:39:20 -05:00
83 lines
1.7 KiB
TypeScript
83 lines
1.7 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';
|
|
/**
|
|
*
|
|
* @export
|
|
* @interface FoodRecipe
|
|
*/
|
|
export interface FoodRecipe {
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof FoodRecipe
|
|
*/
|
|
readonly id: number;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof FoodRecipe
|
|
*/
|
|
name: string;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof FoodRecipe
|
|
*/
|
|
readonly url: string;
|
|
}
|
|
|
|
/**
|
|
* Check if a given object implements the FoodRecipe interface.
|
|
*/
|
|
export function instanceOfFoodRecipe(value: object): boolean {
|
|
let isInstance = true;
|
|
isInstance = isInstance && "id" in value;
|
|
isInstance = isInstance && "name" in value;
|
|
isInstance = isInstance && "url" in value;
|
|
|
|
return isInstance;
|
|
}
|
|
|
|
export function FoodRecipeFromJSON(json: any): FoodRecipe {
|
|
return FoodRecipeFromJSONTyped(json, false);
|
|
}
|
|
|
|
export function FoodRecipeFromJSONTyped(json: any, ignoreDiscriminator: boolean): FoodRecipe {
|
|
if ((json === undefined) || (json === null)) {
|
|
return json;
|
|
}
|
|
return {
|
|
|
|
'id': json['id'],
|
|
'name': json['name'],
|
|
'url': json['url'],
|
|
};
|
|
}
|
|
|
|
export function FoodRecipeToJSON(value?: FoodRecipe | null): any {
|
|
if (value === undefined) {
|
|
return undefined;
|
|
}
|
|
if (value === null) {
|
|
return null;
|
|
}
|
|
return {
|
|
|
|
'name': value.name,
|
|
};
|
|
}
|
|
|