/* 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 SupermarketCategory */ export interface SupermarketCategory { /** * * @type {number} * @memberof SupermarketCategory */ readonly id?: number; /** * * @type {string} * @memberof SupermarketCategory */ name: string; /** * * @type {string} * @memberof SupermarketCategory */ description?: string | null; } /** * Check if a given object implements the SupermarketCategory interface. */ export function instanceOfSupermarketCategory(value: object): boolean { let isInstance = true; isInstance = isInstance && "name" in value; return isInstance; } export function SupermarketCategoryFromJSON(json: any): SupermarketCategory { return SupermarketCategoryFromJSONTyped(json, false); } export function SupermarketCategoryFromJSONTyped(json: any, ignoreDiscriminator: boolean): SupermarketCategory { if ((json === undefined) || (json === null)) { return json; } return { 'id': !exists(json, 'id') ? undefined : json['id'], 'name': json['name'], 'description': !exists(json, 'description') ? undefined : json['description'], }; } export function SupermarketCategoryToJSON(value?: SupermarketCategory | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'name': value.name, 'description': value.description, }; }