mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 04:10:06 -05:00
175 lines
5.0 KiB
TypeScript
175 lines
5.0 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';
|
|
import type { FoodPropertiesFoodUnit } from './FoodPropertiesFoodUnit';
|
|
import {
|
|
FoodPropertiesFoodUnitFromJSON,
|
|
FoodPropertiesFoodUnitFromJSONTyped,
|
|
FoodPropertiesFoodUnitToJSON,
|
|
} from './FoodPropertiesFoodUnit';
|
|
import type { IngredientFood } from './IngredientFood';
|
|
import {
|
|
IngredientFoodFromJSON,
|
|
IngredientFoodFromJSONTyped,
|
|
IngredientFoodToJSON,
|
|
} from './IngredientFood';
|
|
|
|
/**
|
|
*
|
|
* @export
|
|
* @interface RecipeStepsInnerIngredientsInner
|
|
*/
|
|
export interface RecipeStepsInnerIngredientsInner {
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof RecipeStepsInnerIngredientsInner
|
|
*/
|
|
readonly id?: number;
|
|
/**
|
|
*
|
|
* @type {IngredientFood}
|
|
* @memberof RecipeStepsInnerIngredientsInner
|
|
*/
|
|
food: IngredientFood | null;
|
|
/**
|
|
*
|
|
* @type {FoodPropertiesFoodUnit}
|
|
* @memberof RecipeStepsInnerIngredientsInner
|
|
*/
|
|
unit: FoodPropertiesFoodUnit | null;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof RecipeStepsInnerIngredientsInner
|
|
*/
|
|
amount: string;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof RecipeStepsInnerIngredientsInner
|
|
*/
|
|
readonly conversions?: string;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof RecipeStepsInnerIngredientsInner
|
|
*/
|
|
note?: string | null;
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof RecipeStepsInnerIngredientsInner
|
|
*/
|
|
order?: number;
|
|
/**
|
|
*
|
|
* @type {boolean}
|
|
* @memberof RecipeStepsInnerIngredientsInner
|
|
*/
|
|
isHeader?: boolean;
|
|
/**
|
|
*
|
|
* @type {boolean}
|
|
* @memberof RecipeStepsInnerIngredientsInner
|
|
*/
|
|
noAmount?: boolean;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof RecipeStepsInnerIngredientsInner
|
|
*/
|
|
originalText?: string | null;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof RecipeStepsInnerIngredientsInner
|
|
*/
|
|
readonly usedInRecipes?: string;
|
|
/**
|
|
*
|
|
* @type {boolean}
|
|
* @memberof RecipeStepsInnerIngredientsInner
|
|
*/
|
|
alwaysUsePluralUnit?: boolean;
|
|
/**
|
|
*
|
|
* @type {boolean}
|
|
* @memberof RecipeStepsInnerIngredientsInner
|
|
*/
|
|
alwaysUsePluralFood?: boolean;
|
|
}
|
|
|
|
/**
|
|
* Check if a given object implements the RecipeStepsInnerIngredientsInner interface.
|
|
*/
|
|
export function instanceOfRecipeStepsInnerIngredientsInner(value: object): boolean {
|
|
let isInstance = true;
|
|
isInstance = isInstance && "food" in value;
|
|
isInstance = isInstance && "unit" in value;
|
|
isInstance = isInstance && "amount" in value;
|
|
|
|
return isInstance;
|
|
}
|
|
|
|
export function RecipeStepsInnerIngredientsInnerFromJSON(json: any): RecipeStepsInnerIngredientsInner {
|
|
return RecipeStepsInnerIngredientsInnerFromJSONTyped(json, false);
|
|
}
|
|
|
|
export function RecipeStepsInnerIngredientsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): RecipeStepsInnerIngredientsInner {
|
|
if ((json === undefined) || (json === null)) {
|
|
return json;
|
|
}
|
|
return {
|
|
|
|
'id': !exists(json, 'id') ? undefined : json['id'],
|
|
'food': IngredientFoodFromJSON(json['food']),
|
|
'unit': FoodPropertiesFoodUnitFromJSON(json['unit']),
|
|
'amount': json['amount'],
|
|
'conversions': !exists(json, 'conversions') ? undefined : json['conversions'],
|
|
'note': !exists(json, 'note') ? undefined : json['note'],
|
|
'order': !exists(json, 'order') ? undefined : json['order'],
|
|
'isHeader': !exists(json, 'is_header') ? undefined : json['is_header'],
|
|
'noAmount': !exists(json, 'no_amount') ? undefined : json['no_amount'],
|
|
'originalText': !exists(json, 'original_text') ? undefined : json['original_text'],
|
|
'usedInRecipes': !exists(json, 'used_in_recipes') ? undefined : json['used_in_recipes'],
|
|
'alwaysUsePluralUnit': !exists(json, 'always_use_plural_unit') ? undefined : json['always_use_plural_unit'],
|
|
'alwaysUsePluralFood': !exists(json, 'always_use_plural_food') ? undefined : json['always_use_plural_food'],
|
|
};
|
|
}
|
|
|
|
export function RecipeStepsInnerIngredientsInnerToJSON(value?: RecipeStepsInnerIngredientsInner | null): any {
|
|
if (value === undefined) {
|
|
return undefined;
|
|
}
|
|
if (value === null) {
|
|
return null;
|
|
}
|
|
return {
|
|
|
|
'food': IngredientFoodToJSON(value.food),
|
|
'unit': FoodPropertiesFoodUnitToJSON(value.unit),
|
|
'amount': value.amount,
|
|
'note': value.note,
|
|
'order': value.order,
|
|
'is_header': value.isHeader,
|
|
'no_amount': value.noAmount,
|
|
'original_text': value.originalText,
|
|
'always_use_plural_unit': value.alwaysUsePluralUnit,
|
|
'always_use_plural_food': value.alwaysUsePluralFood,
|
|
};
|
|
}
|
|
|