Files
recipes/vue3/models/ShoppingListRecipesInner.ts
2024-03-27 08:34:19 -05:00

125 lines
3.2 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 ShoppingListRecipesInner
*/
export interface ShoppingListRecipesInner {
/**
*
* @type {number}
* @memberof ShoppingListRecipesInner
*/
readonly id?: number;
/**
*
* @type {string}
* @memberof ShoppingListRecipesInner
*/
readonly recipeName?: string;
/**
*
* @type {string}
* @memberof ShoppingListRecipesInner
*/
readonly name?: string;
/**
*
* @type {number}
* @memberof ShoppingListRecipesInner
*/
recipe?: number | null;
/**
*
* @type {number}
* @memberof ShoppingListRecipesInner
*/
mealplan?: number | null;
/**
*
* @type {string}
* @memberof ShoppingListRecipesInner
*/
servings: string;
/**
*
* @type {string}
* @memberof ShoppingListRecipesInner
*/
readonly mealplanNote?: string;
/**
*
* @type {string}
* @memberof ShoppingListRecipesInner
*/
readonly mealplanFromDate?: string;
/**
*
* @type {string}
* @memberof ShoppingListRecipesInner
*/
readonly mealplanType?: string;
}
/**
* Check if a given object implements the ShoppingListRecipesInner interface.
*/
export function instanceOfShoppingListRecipesInner(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "servings" in value;
return isInstance;
}
export function ShoppingListRecipesInnerFromJSON(json: any): ShoppingListRecipesInner {
return ShoppingListRecipesInnerFromJSONTyped(json, false);
}
export function ShoppingListRecipesInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): ShoppingListRecipesInner {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': !exists(json, 'id') ? undefined : json['id'],
'recipeName': !exists(json, 'recipe_name') ? undefined : json['recipe_name'],
'name': !exists(json, 'name') ? undefined : json['name'],
'recipe': !exists(json, 'recipe') ? undefined : json['recipe'],
'mealplan': !exists(json, 'mealplan') ? undefined : json['mealplan'],
'servings': json['servings'],
'mealplanNote': !exists(json, 'mealplan_note') ? undefined : json['mealplan_note'],
'mealplanFromDate': !exists(json, 'mealplan_from_date') ? undefined : json['mealplan_from_date'],
'mealplanType': !exists(json, 'mealplan_type') ? undefined : json['mealplan_type'],
};
}
export function ShoppingListRecipesInnerToJSON(value?: ShoppingListRecipesInner | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'recipe': value.recipe,
'mealplan': value.mealplan,
'servings': value.servings,
};
}