/* 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 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; /** * When set to true will delete all food from active shopping lists. * @type {string} * @memberof FoodShoppingUpdate */ _delete: FoodShoppingUpdateDeleteEnum | null; } /** * @export */ export const FoodShoppingUpdateDeleteEnum = { True: 'true' } as const; export type FoodShoppingUpdateDeleteEnum = typeof FoodShoppingUpdateDeleteEnum[keyof typeof FoodShoppingUpdateDeleteEnum]; /** * Check if a given object implements the FoodShoppingUpdate interface. */ export function instanceOfFoodShoppingUpdate(value: object): boolean { let isInstance = true; 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': !exists(json, 'id') ? undefined : json['id'], 'amount': !exists(json, 'amount') ? undefined : json['amount'], 'unit': !exists(json, 'unit') ? undefined : json['unit'], '_delete': 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': value._delete, }; }