Files
recipes/vue3/models/FoodSimple.ts
2024-04-18 10:56:15 -05:00

78 lines
1.6 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';
/**
*
* @export
* @interface FoodSimple
*/
export interface FoodSimple {
/**
*
* @type {number}
* @memberof FoodSimple
*/
readonly id: number;
/**
*
* @type {string}
* @memberof FoodSimple
*/
name: string;
/**
*
* @type {string}
* @memberof FoodSimple
*/
pluralName?: string;
}
/**
* Check if a given object implements the FoodSimple interface.
*/
export function instanceOfFoodSimple(value: object): boolean {
if (!('id' in value)) return false;
if (!('name' in value)) return false;
return true;
}
export function FoodSimpleFromJSON(json: any): FoodSimple {
return FoodSimpleFromJSONTyped(json, false);
}
export function FoodSimpleFromJSONTyped(json: any, ignoreDiscriminator: boolean): FoodSimple {
if (json == null) {
return json;
}
return {
'id': json['id'],
'name': json['name'],
'pluralName': json['plural_name'] == null ? undefined : json['plural_name'],
};
}
export function FoodSimpleToJSON(value?: Omit<FoodSimple, 'id'> | null): any {
if (value == null) {
return value;
}
return {
'name': value['name'],
'plural_name': value['pluralName'],
};
}