/* 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'; import type { FoodPropertiesInnerPropertyType } from './FoodPropertiesInnerPropertyType'; import { FoodPropertiesInnerPropertyTypeFromJSON, FoodPropertiesInnerPropertyTypeFromJSONTyped, FoodPropertiesInnerPropertyTypeToJSON, } from './FoodPropertiesInnerPropertyType'; /** * * @export * @interface Property */ export interface Property { /** * * @type {number} * @memberof Property */ readonly id?: number; /** * * @type {string} * @memberof Property */ propertyAmount: string | null; /** * * @type {FoodPropertiesInnerPropertyType} * @memberof Property */ propertyType: FoodPropertiesInnerPropertyType; } /** * Check if a given object implements the Property interface. */ export function instanceOfProperty(value: object): boolean { let isInstance = true; isInstance = isInstance && "propertyAmount" in value; isInstance = isInstance && "propertyType" in value; return isInstance; } export function PropertyFromJSON(json: any): Property { return PropertyFromJSONTyped(json, false); } export function PropertyFromJSONTyped(json: any, ignoreDiscriminator: boolean): Property { if ((json === undefined) || (json === null)) { return json; } return { 'id': !exists(json, 'id') ? undefined : json['id'], 'propertyAmount': json['property_amount'], 'propertyType': FoodPropertiesInnerPropertyTypeFromJSON(json['property_type']), }; } export function PropertyToJSON(value?: Property | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'property_amount': value.propertyAmount, 'property_type': FoodPropertiesInnerPropertyTypeToJSON(value.propertyType), }; }