mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2025-12-24 02:39:20 -05:00
105 lines
2.4 KiB
TypeScript
105 lines
2.4 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 { mapValues } from '../runtime';
|
|
/**
|
|
*
|
|
* @export
|
|
* @interface NutritionInformation
|
|
*/
|
|
export interface NutritionInformation {
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof NutritionInformation
|
|
*/
|
|
readonly id: number;
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof NutritionInformation
|
|
*/
|
|
carbohydrates: number;
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof NutritionInformation
|
|
*/
|
|
fats: number;
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof NutritionInformation
|
|
*/
|
|
proteins: number;
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof NutritionInformation
|
|
*/
|
|
calories: number;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof NutritionInformation
|
|
*/
|
|
source?: string;
|
|
}
|
|
|
|
/**
|
|
* Check if a given object implements the NutritionInformation interface.
|
|
*/
|
|
export function instanceOfNutritionInformation(value: object): boolean {
|
|
if (!('id' in value)) return false;
|
|
if (!('carbohydrates' in value)) return false;
|
|
if (!('fats' in value)) return false;
|
|
if (!('proteins' in value)) return false;
|
|
if (!('calories' in value)) return false;
|
|
return true;
|
|
}
|
|
|
|
export function NutritionInformationFromJSON(json: any): NutritionInformation {
|
|
return NutritionInformationFromJSONTyped(json, false);
|
|
}
|
|
|
|
export function NutritionInformationFromJSONTyped(json: any, ignoreDiscriminator: boolean): NutritionInformation {
|
|
if (json == null) {
|
|
return json;
|
|
}
|
|
return {
|
|
|
|
'id': json['id'],
|
|
'carbohydrates': json['carbohydrates'],
|
|
'fats': json['fats'],
|
|
'proteins': json['proteins'],
|
|
'calories': json['calories'],
|
|
'source': json['source'] == null ? undefined : json['source'],
|
|
};
|
|
}
|
|
|
|
export function NutritionInformationToJSON(value?: Omit<NutritionInformation, 'id'> | null): any {
|
|
if (value == null) {
|
|
return value;
|
|
}
|
|
return {
|
|
|
|
'carbohydrates': value['carbohydrates'],
|
|
'fats': value['fats'],
|
|
'proteins': value['proteins'],
|
|
'calories': value['calories'],
|
|
'source': value['source'],
|
|
};
|
|
}
|
|
|