mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-06 14:48:02 -05:00
some basic views
This commit is contained in:
108
vue3/models/RecipeNutrition.ts
Normal file
108
vue3/models/RecipeNutrition.ts
Normal file
@@ -0,0 +1,108 @@
|
||||
/* 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,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user