/* 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; /** * * @type {Array} * @memberof RecipeShoppingUpdate */ ingredients: Array; /** * 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 { if (!('ingredients' in value) || value['ingredients'] === undefined) return false; 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'], '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'], }; }