mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-02 12:49:02 -05:00
90 lines
2.4 KiB
TypeScript
90 lines
2.4 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';
|
|
/**
|
|
*
|
|
* @export
|
|
* @interface RecipeShoppingUpdate
|
|
*/
|
|
export interface RecipeShoppingUpdate {
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof RecipeShoppingUpdate
|
|
*/
|
|
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): value is RecipeShoppingUpdate {
|
|
return true;
|
|
}
|
|
|
|
export function RecipeShoppingUpdateFromJSON(json: any): RecipeShoppingUpdate {
|
|
return RecipeShoppingUpdateFromJSONTyped(json, false);
|
|
}
|
|
|
|
export function RecipeShoppingUpdateFromJSONTyped(json: any, ignoreDiscriminator: boolean): RecipeShoppingUpdate {
|
|
if (json == null) {
|
|
return json;
|
|
}
|
|
return {
|
|
|
|
'id': json['id'] == null ? undefined : json['id'],
|
|
'listRecipe': json['list_recipe'] == null ? undefined : json['list_recipe'],
|
|
'ingredients': json['ingredients'] == null ? undefined : json['ingredients'],
|
|
'servings': json['servings'] == null ? undefined : json['servings'],
|
|
};
|
|
}
|
|
|
|
export function RecipeShoppingUpdateToJSON(json: any): RecipeShoppingUpdate {
|
|
return RecipeShoppingUpdateToJSONTyped(json, false);
|
|
}
|
|
|
|
export function RecipeShoppingUpdateToJSONTyped(value?: RecipeShoppingUpdate | null, ignoreDiscriminator: boolean = false): any {
|
|
if (value == null) {
|
|
return value;
|
|
}
|
|
|
|
return {
|
|
|
|
'id': value['id'],
|
|
'list_recipe': value['listRecipe'],
|
|
'ingredients': value['ingredients'],
|
|
'servings': value['servings'],
|
|
};
|
|
}
|
|
|