mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 12:18:45 -05:00
89 lines
2.4 KiB
TypeScript
89 lines
2.4 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 RecipeShoppingUpdate
|
|
*/
|
|
export interface RecipeShoppingUpdate {
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof RecipeShoppingUpdate
|
|
*/
|
|
readonly id?: number;
|
|
/**
|
|
* Existing shopping list to update
|
|
* @type {number}
|
|
* @memberof RecipeShoppingUpdate
|
|
*/
|
|
listRecipe?: number | null;
|
|
/**
|
|
* List of ingredient IDs from the recipe to add, if not provided all ingredients will be added.
|
|
* @type {number}
|
|
* @memberof RecipeShoppingUpdate
|
|
*/
|
|
ingredients?: number | null;
|
|
/**
|
|
* Providing a list_recipe ID and servings of 0 will delete that shopping list.
|
|
* @type {number}
|
|
* @memberof RecipeShoppingUpdate
|
|
*/
|
|
servings?: number | null;
|
|
}
|
|
|
|
/**
|
|
* Check if a given object implements the RecipeShoppingUpdate interface.
|
|
*/
|
|
export function instanceOfRecipeShoppingUpdate(value: object): boolean {
|
|
let isInstance = true;
|
|
|
|
return isInstance;
|
|
}
|
|
|
|
export function RecipeShoppingUpdateFromJSON(json: any): RecipeShoppingUpdate {
|
|
return RecipeShoppingUpdateFromJSONTyped(json, false);
|
|
}
|
|
|
|
export function RecipeShoppingUpdateFromJSONTyped(json: any, ignoreDiscriminator: boolean): RecipeShoppingUpdate {
|
|
if ((json === undefined) || (json === null)) {
|
|
return json;
|
|
}
|
|
return {
|
|
|
|
'id': !exists(json, 'id') ? undefined : json['id'],
|
|
'listRecipe': !exists(json, 'list_recipe') ? undefined : json['list_recipe'],
|
|
'ingredients': !exists(json, 'ingredients') ? undefined : json['ingredients'],
|
|
'servings': !exists(json, 'servings') ? undefined : json['servings'],
|
|
};
|
|
}
|
|
|
|
export function RecipeShoppingUpdateToJSON(value?: RecipeShoppingUpdate | null): any {
|
|
if (value === undefined) {
|
|
return undefined;
|
|
}
|
|
if (value === null) {
|
|
return null;
|
|
}
|
|
return {
|
|
|
|
'list_recipe': value.listRecipe,
|
|
'ingredients': value.ingredients,
|
|
'servings': value.servings,
|
|
};
|
|
}
|
|
|