mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 12:18:45 -05:00
106 lines
2.7 KiB
TypeScript
106 lines
2.7 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';
|
|
/**
|
|
*
|
|
* @export
|
|
* @interface UnitConversionBaseUnit
|
|
*/
|
|
export interface UnitConversionBaseUnit {
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof UnitConversionBaseUnit
|
|
*/
|
|
readonly id?: number;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof UnitConversionBaseUnit
|
|
*/
|
|
name: string;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof UnitConversionBaseUnit
|
|
*/
|
|
pluralName?: string | null;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof UnitConversionBaseUnit
|
|
*/
|
|
description?: string | null;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof UnitConversionBaseUnit
|
|
*/
|
|
baseUnit?: string | null;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof UnitConversionBaseUnit
|
|
*/
|
|
openDataSlug?: string | null;
|
|
}
|
|
|
|
/**
|
|
* Check if a given object implements the UnitConversionBaseUnit interface.
|
|
*/
|
|
export function instanceOfUnitConversionBaseUnit(value: object): boolean {
|
|
let isInstance = true;
|
|
isInstance = isInstance && "name" in value;
|
|
|
|
return isInstance;
|
|
}
|
|
|
|
export function UnitConversionBaseUnitFromJSON(json: any): UnitConversionBaseUnit {
|
|
return UnitConversionBaseUnitFromJSONTyped(json, false);
|
|
}
|
|
|
|
export function UnitConversionBaseUnitFromJSONTyped(json: any, ignoreDiscriminator: boolean): UnitConversionBaseUnit {
|
|
if ((json === undefined) || (json === null)) {
|
|
return json;
|
|
}
|
|
return {
|
|
|
|
'id': !exists(json, 'id') ? undefined : json['id'],
|
|
'name': json['name'],
|
|
'pluralName': !exists(json, 'plural_name') ? undefined : json['plural_name'],
|
|
'description': !exists(json, 'description') ? undefined : json['description'],
|
|
'baseUnit': !exists(json, 'base_unit') ? undefined : json['base_unit'],
|
|
'openDataSlug': !exists(json, 'open_data_slug') ? undefined : json['open_data_slug'],
|
|
};
|
|
}
|
|
|
|
export function UnitConversionBaseUnitToJSON(value?: UnitConversionBaseUnit | null): any {
|
|
if (value === undefined) {
|
|
return undefined;
|
|
}
|
|
if (value === null) {
|
|
return null;
|
|
}
|
|
return {
|
|
|
|
'name': value.name,
|
|
'plural_name': value.pluralName,
|
|
'description': value.description,
|
|
'base_unit': value.baseUnit,
|
|
'open_data_slug': value.openDataSlug,
|
|
};
|
|
}
|
|
|