mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 04:10:06 -05:00
82 lines
1.9 KiB
TypeScript
82 lines
1.9 KiB
TypeScript
/* tslint:disable */
|
|
/* eslint-disable */
|
|
/**
|
|
* Django Recipes
|
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
*
|
|
* The version of the OpenAPI document:
|
|
*
|
|
*
|
|
* 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';
|
|
/**
|
|
*
|
|
* @export
|
|
* @interface FoodSubstituteInner
|
|
*/
|
|
export interface FoodSubstituteInner {
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof FoodSubstituteInner
|
|
*/
|
|
readonly id?: number;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof FoodSubstituteInner
|
|
*/
|
|
name: string;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof FoodSubstituteInner
|
|
*/
|
|
pluralName?: string | null;
|
|
}
|
|
|
|
/**
|
|
* Check if a given object implements the FoodSubstituteInner interface.
|
|
*/
|
|
export function instanceOfFoodSubstituteInner(value: object): boolean {
|
|
let isInstance = true;
|
|
isInstance = isInstance && "name" in value;
|
|
|
|
return isInstance;
|
|
}
|
|
|
|
export function FoodSubstituteInnerFromJSON(json: any): FoodSubstituteInner {
|
|
return FoodSubstituteInnerFromJSONTyped(json, false);
|
|
}
|
|
|
|
export function FoodSubstituteInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): FoodSubstituteInner {
|
|
if ((json === undefined) || (json === null)) {
|
|
return json;
|
|
}
|
|
return {
|
|
|
|
'id': !exists(json, 'id') ? undefined : json['id'],
|
|
'name': json['name'],
|
|
'pluralName': !exists(json, 'plural_name') ? undefined : json['plural_name'],
|
|
};
|
|
}
|
|
|
|
export function FoodSubstituteInnerToJSON(value?: FoodSubstituteInner | null): any {
|
|
if (value === undefined) {
|
|
return undefined;
|
|
}
|
|
if (value === null) {
|
|
return null;
|
|
}
|
|
return {
|
|
|
|
'name': value.name,
|
|
'plural_name': value.pluralName,
|
|
};
|
|
}
|
|
|