mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 04:10:06 -05:00
179 lines
4.8 KiB
TypeScript
179 lines
4.8 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 { RecipeStepsInnerFile } from './RecipeStepsInnerFile';
|
|
import {
|
|
RecipeStepsInnerFileFromJSON,
|
|
RecipeStepsInnerFileFromJSONTyped,
|
|
RecipeStepsInnerFileToJSON,
|
|
} from './RecipeStepsInnerFile';
|
|
import type { RecipeStepsInnerIngredientsInner } from './RecipeStepsInnerIngredientsInner';
|
|
import {
|
|
RecipeStepsInnerIngredientsInnerFromJSON,
|
|
RecipeStepsInnerIngredientsInnerFromJSONTyped,
|
|
RecipeStepsInnerIngredientsInnerToJSON,
|
|
} from './RecipeStepsInnerIngredientsInner';
|
|
|
|
/**
|
|
*
|
|
* @export
|
|
* @interface Step
|
|
*/
|
|
export interface Step {
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof Step
|
|
*/
|
|
readonly id?: number;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof Step
|
|
*/
|
|
name?: string;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof Step
|
|
*/
|
|
instruction?: string;
|
|
/**
|
|
*
|
|
* @type {Array<RecipeStepsInnerIngredientsInner>}
|
|
* @memberof Step
|
|
*/
|
|
ingredients: Array<RecipeStepsInnerIngredientsInner>;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof Step
|
|
*/
|
|
readonly ingredientsMarkdown?: string;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof Step
|
|
*/
|
|
readonly ingredientsVue?: string;
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof Step
|
|
*/
|
|
time?: number;
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof Step
|
|
*/
|
|
order?: number;
|
|
/**
|
|
*
|
|
* @type {boolean}
|
|
* @memberof Step
|
|
*/
|
|
showAsHeader?: boolean;
|
|
/**
|
|
*
|
|
* @type {RecipeStepsInnerFile}
|
|
* @memberof Step
|
|
*/
|
|
file?: RecipeStepsInnerFile | null;
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof Step
|
|
*/
|
|
stepRecipe?: number | null;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof Step
|
|
*/
|
|
readonly stepRecipeData?: string;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof Step
|
|
*/
|
|
readonly numrecipe?: string;
|
|
/**
|
|
*
|
|
* @type {boolean}
|
|
* @memberof Step
|
|
*/
|
|
showIngredientsTable?: boolean;
|
|
}
|
|
|
|
/**
|
|
* Check if a given object implements the Step interface.
|
|
*/
|
|
export function instanceOfStep(value: object): boolean {
|
|
let isInstance = true;
|
|
isInstance = isInstance && "ingredients" in value;
|
|
|
|
return isInstance;
|
|
}
|
|
|
|
export function StepFromJSON(json: any): Step {
|
|
return StepFromJSONTyped(json, false);
|
|
}
|
|
|
|
export function StepFromJSONTyped(json: any, ignoreDiscriminator: boolean): Step {
|
|
if ((json === undefined) || (json === null)) {
|
|
return json;
|
|
}
|
|
return {
|
|
|
|
'id': !exists(json, 'id') ? undefined : json['id'],
|
|
'name': !exists(json, 'name') ? undefined : json['name'],
|
|
'instruction': !exists(json, 'instruction') ? undefined : json['instruction'],
|
|
'ingredients': ((json['ingredients'] as Array<any>).map(RecipeStepsInnerIngredientsInnerFromJSON)),
|
|
'ingredientsMarkdown': !exists(json, 'ingredients_markdown') ? undefined : json['ingredients_markdown'],
|
|
'ingredientsVue': !exists(json, 'ingredients_vue') ? undefined : json['ingredients_vue'],
|
|
'time': !exists(json, 'time') ? undefined : json['time'],
|
|
'order': !exists(json, 'order') ? undefined : json['order'],
|
|
'showAsHeader': !exists(json, 'show_as_header') ? undefined : json['show_as_header'],
|
|
'file': !exists(json, 'file') ? undefined : RecipeStepsInnerFileFromJSON(json['file']),
|
|
'stepRecipe': !exists(json, 'step_recipe') ? undefined : json['step_recipe'],
|
|
'stepRecipeData': !exists(json, 'step_recipe_data') ? undefined : json['step_recipe_data'],
|
|
'numrecipe': !exists(json, 'numrecipe') ? undefined : json['numrecipe'],
|
|
'showIngredientsTable': !exists(json, 'show_ingredients_table') ? undefined : json['show_ingredients_table'],
|
|
};
|
|
}
|
|
|
|
export function StepToJSON(value?: Step | null): any {
|
|
if (value === undefined) {
|
|
return undefined;
|
|
}
|
|
if (value === null) {
|
|
return null;
|
|
}
|
|
return {
|
|
|
|
'name': value.name,
|
|
'instruction': value.instruction,
|
|
'ingredients': ((value.ingredients as Array<any>).map(RecipeStepsInnerIngredientsInnerToJSON)),
|
|
'time': value.time,
|
|
'order': value.order,
|
|
'show_as_header': value.showAsHeader,
|
|
'file': RecipeStepsInnerFileToJSON(value.file),
|
|
'step_recipe': value.stepRecipe,
|
|
'show_ingredients_table': value.showIngredientsTable,
|
|
};
|
|
}
|
|
|