Files
recipes/vue3/src/openapi/models/SourceImportStep.ts
2024-12-08 21:54:14 +01:00

93 lines
2.5 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,
SourceImportIngredientToJSONTyped,
} 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;
if (!('showIngredientsTable' in value) || value['showIngredientsTable'] === 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'],
};
}
export function SourceImportStepToJSON(json: any): SourceImportStep {
return SourceImportStepToJSONTyped(json, false);
}
export function SourceImportStepToJSONTyped(value?: SourceImportStep | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'instruction': value['instruction'],
'ingredients': ((value['ingredients'] as Array<any>).map(SourceImportIngredientToJSON)),
'show_ingredients_table': value['showIngredientsTable'],
};
}