mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-02 12:49:02 -05:00
98 lines
2.5 KiB
TypeScript
98 lines
2.5 KiB
TypeScript
/* 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 { FoodShoppingUpdateDelete } from './FoodShoppingUpdateDelete';
|
|
import {
|
|
FoodShoppingUpdateDeleteFromJSON,
|
|
FoodShoppingUpdateDeleteFromJSONTyped,
|
|
FoodShoppingUpdateDeleteToJSON,
|
|
} from './FoodShoppingUpdateDelete';
|
|
|
|
/**
|
|
*
|
|
* @export
|
|
* @interface FoodShoppingUpdate
|
|
*/
|
|
export interface FoodShoppingUpdate {
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof FoodShoppingUpdate
|
|
*/
|
|
readonly id: number;
|
|
/**
|
|
* Amount of food to add to the shopping list
|
|
* @type {number}
|
|
* @memberof FoodShoppingUpdate
|
|
*/
|
|
amount?: number | null;
|
|
/**
|
|
* ID of unit to use for the shopping list
|
|
* @type {number}
|
|
* @memberof FoodShoppingUpdate
|
|
*/
|
|
unit?: number | null;
|
|
/**
|
|
*
|
|
* @type {FoodShoppingUpdateDelete}
|
|
* @memberof FoodShoppingUpdate
|
|
*/
|
|
_delete: FoodShoppingUpdateDelete | null;
|
|
}
|
|
|
|
/**
|
|
* Check if a given object implements the FoodShoppingUpdate interface.
|
|
*/
|
|
export function instanceOfFoodShoppingUpdate(value: object): boolean {
|
|
let isInstance = true;
|
|
isInstance = isInstance && "id" in value;
|
|
isInstance = isInstance && "_delete" in value;
|
|
|
|
return isInstance;
|
|
}
|
|
|
|
export function FoodShoppingUpdateFromJSON(json: any): FoodShoppingUpdate {
|
|
return FoodShoppingUpdateFromJSONTyped(json, false);
|
|
}
|
|
|
|
export function FoodShoppingUpdateFromJSONTyped(json: any, ignoreDiscriminator: boolean): FoodShoppingUpdate {
|
|
if ((json === undefined) || (json === null)) {
|
|
return json;
|
|
}
|
|
return {
|
|
|
|
'id': json['id'],
|
|
'amount': !exists(json, 'amount') ? undefined : json['amount'],
|
|
'unit': !exists(json, 'unit') ? undefined : json['unit'],
|
|
'_delete': FoodShoppingUpdateDeleteFromJSON(json['delete']),
|
|
};
|
|
}
|
|
|
|
export function FoodShoppingUpdateToJSON(value?: FoodShoppingUpdate | null): any {
|
|
if (value === undefined) {
|
|
return undefined;
|
|
}
|
|
if (value === null) {
|
|
return null;
|
|
}
|
|
return {
|
|
|
|
'amount': value.amount,
|
|
'unit': value.unit,
|
|
'delete': FoodShoppingUpdateDeleteToJSON(value._delete),
|
|
};
|
|
}
|
|
|