mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2025-12-24 02:39:20 -05:00
95 lines
2.2 KiB
TypeScript
95 lines
2.2 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';
|
|
import type { DeleteEnum } from './DeleteEnum';
|
|
import {
|
|
DeleteEnumFromJSON,
|
|
DeleteEnumFromJSONTyped,
|
|
DeleteEnumToJSON,
|
|
} from './DeleteEnum';
|
|
|
|
/**
|
|
*
|
|
* @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;
|
|
/**
|
|
* ID of unit to use for the shopping list
|
|
* @type {number}
|
|
* @memberof FoodShoppingUpdate
|
|
*/
|
|
unit?: number;
|
|
/**
|
|
* When set to true will delete all food from active shopping lists.
|
|
*
|
|
* * `true` - true
|
|
* @type {DeleteEnum}
|
|
* @memberof FoodShoppingUpdate
|
|
*/
|
|
_delete: DeleteEnum | null;
|
|
}
|
|
|
|
/**
|
|
* Check if a given object implements the FoodShoppingUpdate interface.
|
|
*/
|
|
export function instanceOfFoodShoppingUpdate(value: object): boolean {
|
|
if (!('id' in value)) return false;
|
|
if (!('_delete' in value)) return false;
|
|
return true;
|
|
}
|
|
|
|
export function FoodShoppingUpdateFromJSON(json: any): FoodShoppingUpdate {
|
|
return FoodShoppingUpdateFromJSONTyped(json, false);
|
|
}
|
|
|
|
export function FoodShoppingUpdateFromJSONTyped(json: any, ignoreDiscriminator: boolean): FoodShoppingUpdate {
|
|
if (json == null) {
|
|
return json;
|
|
}
|
|
return {
|
|
|
|
'id': json['id'],
|
|
'amount': json['amount'] == null ? undefined : json['amount'],
|
|
'unit': json['unit'] == null ? undefined : json['unit'],
|
|
'_delete': DeleteEnumFromJSON(json['delete']),
|
|
};
|
|
}
|
|
|
|
export function FoodShoppingUpdateToJSON(value?: Omit<FoodShoppingUpdate, 'id'> | null): any {
|
|
if (value == null) {
|
|
return value;
|
|
}
|
|
return {
|
|
|
|
'amount': value['amount'],
|
|
'unit': value['unit'],
|
|
'delete': DeleteEnumToJSON(value['_delete']),
|
|
};
|
|
}
|
|
|