Files
recipes/vue3/src/openapi/models/SourceImportStep.ts
2025-04-11 15:49:11 +02:00

86 lines
2.3 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';
import type { SourceImportIngredient } from './SourceImportIngredient';
import {
SourceImportIngredientFromJSON,
SourceImportIngredientFromJSONTyped,
SourceImportIngredientToJSON,
} from './SourceImportIngredient';
/**
*
* @export
* @interface SourceImportStep
*/
export interface SourceImportStep {
/**
*
* @type {string}
* @memberof SourceImportStep
*/
instruction: string;
/**
*
* @type {Array<SourceImportIngredient>}
* @memberof SourceImportStep
*/
ingredients: Array<SourceImportIngredient>;
/**
*
* @type {boolean}
* @memberof SourceImportStep
*/
showIngredientsTable?: boolean;
}
/**
* Check if a given object implements the SourceImportStep interface.
*/
export function instanceOfSourceImportStep(value: object): value is SourceImportStep {
if (!('instruction' in value) || value['instruction'] === undefined) return false;
if (!('ingredients' in value) || value['ingredients'] === undefined) return false;
return true;
}
export function SourceImportStepFromJSON(json: any): SourceImportStep {
return SourceImportStepFromJSONTyped(json, false);
}
export function SourceImportStepFromJSONTyped(json: any, ignoreDiscriminator: boolean): SourceImportStep {
if (json == null) {
return json;
}
return {
'instruction': json['instruction'],
'ingredients': ((json['ingredients'] as Array<any>).map(SourceImportIngredientFromJSON)),
'showIngredientsTable': json['show_ingredients_table'] == null ? undefined : json['show_ingredients_table'],
};
}
export function SourceImportStepToJSON(value?: SourceImportStep | null): any {
if (value == null) {
return value;
}
return {
'instruction': value['instruction'],
'ingredients': ((value['ingredients'] as Array<any>).map(SourceImportIngredientToJSON)),
'show_ingredients_table': value['showIngredientsTable'],
};
}