mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-02 20:59:28 -05:00
more basics
This commit is contained in:
89
vue3/src/openapi/models/FoodPropertiesInner.ts
Normal file
89
vue3/src/openapi/models/FoodPropertiesInner.ts
Normal file
@@ -0,0 +1,89 @@
|
||||
/* 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),
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user