Files
recipes/vue3/models/FoodPropertiesInner.ts
2024-03-27 08:34:19 -05:00

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