mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-04 21:58:54 -05:00
working search with flat endpoint
This commit is contained in:
171
vue3/src/openapi/models/PatchedIngredient.ts
Normal file
171
vue3/src/openapi/models/PatchedIngredient.ts
Normal file
@@ -0,0 +1,171 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* 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 { exists, mapValues } from '../runtime';
|
||||
import type { Food } from './Food';
|
||||
import {
|
||||
FoodFromJSON,
|
||||
FoodFromJSONTyped,
|
||||
FoodToJSON,
|
||||
} from './Food';
|
||||
import type { Unit } from './Unit';
|
||||
import {
|
||||
UnitFromJSON,
|
||||
UnitFromJSONTyped,
|
||||
UnitToJSON,
|
||||
} from './Unit';
|
||||
|
||||
/**
|
||||
* Adds nested create feature
|
||||
* @export
|
||||
* @interface PatchedIngredient
|
||||
*/
|
||||
export interface PatchedIngredient {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedIngredient
|
||||
*/
|
||||
readonly id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {Food}
|
||||
* @memberof PatchedIngredient
|
||||
*/
|
||||
food?: Food | null;
|
||||
/**
|
||||
*
|
||||
* @type {Unit}
|
||||
* @memberof PatchedIngredient
|
||||
*/
|
||||
unit?: Unit | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedIngredient
|
||||
*/
|
||||
amount?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedIngredient
|
||||
*/
|
||||
readonly conversions?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedIngredient
|
||||
*/
|
||||
note?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedIngredient
|
||||
*/
|
||||
order?: number;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedIngredient
|
||||
*/
|
||||
isHeader?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedIngredient
|
||||
*/
|
||||
noAmount?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedIngredient
|
||||
*/
|
||||
originalText?: string | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedIngredient
|
||||
*/
|
||||
readonly usedInRecipes?: string;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedIngredient
|
||||
*/
|
||||
alwaysUsePluralUnit?: boolean;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof PatchedIngredient
|
||||
*/
|
||||
alwaysUsePluralFood?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedIngredient interface.
|
||||
*/
|
||||
export function instanceOfPatchedIngredient(value: object): boolean {
|
||||
let isInstance = true;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function PatchedIngredientFromJSON(json: any): PatchedIngredient {
|
||||
return PatchedIngredientFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedIngredientFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedIngredient {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': !exists(json, 'id') ? undefined : json['id'],
|
||||
'food': !exists(json, 'food') ? undefined : FoodFromJSON(json['food']),
|
||||
'unit': !exists(json, 'unit') ? undefined : UnitFromJSON(json['unit']),
|
||||
'amount': !exists(json, 'amount') ? undefined : 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 PatchedIngredientToJSON(value?: PatchedIngredient | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'food': FoodToJSON(value.food),
|
||||
'unit': UnitToJSON(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,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user