mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-02 12:49:02 -05:00
109 lines
2.5 KiB
TypeScript
109 lines
2.5 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 RecipeNutrition
|
|
*/
|
|
export interface RecipeNutrition {
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof RecipeNutrition
|
|
*/
|
|
readonly id?: number;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof RecipeNutrition
|
|
*/
|
|
carbohydrates: string;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof RecipeNutrition
|
|
*/
|
|
fats: string;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof RecipeNutrition
|
|
*/
|
|
proteins: string;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof RecipeNutrition
|
|
*/
|
|
calories: string;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof RecipeNutrition
|
|
*/
|
|
source?: string | null;
|
|
}
|
|
|
|
/**
|
|
* Check if a given object implements the RecipeNutrition interface.
|
|
*/
|
|
export function instanceOfRecipeNutrition(value: object): boolean {
|
|
let isInstance = true;
|
|
isInstance = isInstance && "carbohydrates" in value;
|
|
isInstance = isInstance && "fats" in value;
|
|
isInstance = isInstance && "proteins" in value;
|
|
isInstance = isInstance && "calories" in value;
|
|
|
|
return isInstance;
|
|
}
|
|
|
|
export function RecipeNutritionFromJSON(json: any): RecipeNutrition {
|
|
return RecipeNutritionFromJSONTyped(json, false);
|
|
}
|
|
|
|
export function RecipeNutritionFromJSONTyped(json: any, ignoreDiscriminator: boolean): RecipeNutrition {
|
|
if ((json === undefined) || (json === null)) {
|
|
return json;
|
|
}
|
|
return {
|
|
|
|
'id': !exists(json, 'id') ? undefined : json['id'],
|
|
'carbohydrates': json['carbohydrates'],
|
|
'fats': json['fats'],
|
|
'proteins': json['proteins'],
|
|
'calories': json['calories'],
|
|
'source': !exists(json, 'source') ? undefined : json['source'],
|
|
};
|
|
}
|
|
|
|
export function RecipeNutritionToJSON(value?: RecipeNutrition | null): any {
|
|
if (value === undefined) {
|
|
return undefined;
|
|
}
|
|
if (value === null) {
|
|
return null;
|
|
}
|
|
return {
|
|
|
|
'carbohydrates': value.carbohydrates,
|
|
'fats': value.fats,
|
|
'proteins': value.proteins,
|
|
'calories': value.calories,
|
|
'source': value.source,
|
|
};
|
|
}
|
|
|