mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-02 04:39:54 -05:00
working search with flat endpoint
This commit is contained in:
132
vue3/src/openapi/models/PatchedUnitConversion.ts
Normal file
132
vue3/src/openapi/models/PatchedUnitConversion.ts
Normal file
@@ -0,0 +1,132 @@
|
||||
/* 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 PatchedUnitConversion
|
||||
*/
|
||||
export interface PatchedUnitConversion {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof PatchedUnitConversion
|
||||
*/
|
||||
readonly id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedUnitConversion
|
||||
*/
|
||||
readonly name?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedUnitConversion
|
||||
*/
|
||||
baseAmount?: string;
|
||||
/**
|
||||
*
|
||||
* @type {Unit}
|
||||
* @memberof PatchedUnitConversion
|
||||
*/
|
||||
baseUnit?: Unit;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedUnitConversion
|
||||
*/
|
||||
convertedAmount?: string;
|
||||
/**
|
||||
*
|
||||
* @type {Unit}
|
||||
* @memberof PatchedUnitConversion
|
||||
*/
|
||||
convertedUnit?: Unit;
|
||||
/**
|
||||
*
|
||||
* @type {Food}
|
||||
* @memberof PatchedUnitConversion
|
||||
*/
|
||||
food?: Food | null;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof PatchedUnitConversion
|
||||
*/
|
||||
openDataSlug?: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the PatchedUnitConversion interface.
|
||||
*/
|
||||
export function instanceOfPatchedUnitConversion(value: object): boolean {
|
||||
let isInstance = true;
|
||||
|
||||
return isInstance;
|
||||
}
|
||||
|
||||
export function PatchedUnitConversionFromJSON(json: any): PatchedUnitConversion {
|
||||
return PatchedUnitConversionFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PatchedUnitConversionFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedUnitConversion {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': !exists(json, 'id') ? undefined : json['id'],
|
||||
'name': !exists(json, 'name') ? undefined : json['name'],
|
||||
'baseAmount': !exists(json, 'base_amount') ? undefined : json['base_amount'],
|
||||
'baseUnit': !exists(json, 'base_unit') ? undefined : UnitFromJSON(json['base_unit']),
|
||||
'convertedAmount': !exists(json, 'converted_amount') ? undefined : json['converted_amount'],
|
||||
'convertedUnit': !exists(json, 'converted_unit') ? undefined : UnitFromJSON(json['converted_unit']),
|
||||
'food': !exists(json, 'food') ? undefined : FoodFromJSON(json['food']),
|
||||
'openDataSlug': !exists(json, 'open_data_slug') ? undefined : json['open_data_slug'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PatchedUnitConversionToJSON(value?: PatchedUnitConversion | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'base_amount': value.baseAmount,
|
||||
'base_unit': UnitToJSON(value.baseUnit),
|
||||
'converted_amount': value.convertedAmount,
|
||||
'converted_unit': UnitToJSON(value.convertedUnit),
|
||||
'food': FoodToJSON(value.food),
|
||||
'open_data_slug': value.openDataSlug,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user