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';
|
|
/**
|
|
* Adds nested create feature
|
|
* @export
|
|
* @interface RecipeSimple
|
|
*/
|
|
export interface RecipeSimple {
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof RecipeSimple
|
|
*/
|
|
readonly id: number;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof RecipeSimple
|
|
*/
|
|
name: string;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof RecipeSimple
|
|
*/
|
|
readonly url: string;
|
|
}
|
|
|
|
/**
|
|
* Check if a given object implements the RecipeSimple interface.
|
|
*/
|
|
export function instanceOfRecipeSimple(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 RecipeSimpleFromJSON(json: any): RecipeSimple {
|
|
return RecipeSimpleFromJSONTyped(json, false);
|
|
}
|
|
|
|
export function RecipeSimpleFromJSONTyped(json: any, ignoreDiscriminator: boolean): RecipeSimple {
|
|
if ((json === undefined) || (json === null)) {
|
|
return json;
|
|
}
|
|
return {
|
|
|
|
'id': json['id'],
|
|
'name': json['name'],
|
|
'url': json['url'],
|
|
};
|
|
}
|
|
|
|
export function RecipeSimpleToJSON(value?: RecipeSimple | null): any {
|
|
if (value === undefined) {
|
|
return undefined;
|
|
}
|
|
if (value === null) {
|
|
return null;
|
|
}
|
|
return {
|
|
|
|
'name': value.name,
|
|
};
|
|
}
|
|
|