mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 12:18:45 -05:00
91 lines
2.1 KiB
TypeScript
91 lines
2.1 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 OpenDataUnitVersion
|
|
*/
|
|
export interface OpenDataUnitVersion {
|
|
/**
|
|
*
|
|
* @type {number}
|
|
* @memberof OpenDataUnitVersion
|
|
*/
|
|
readonly id?: number;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof OpenDataUnitVersion
|
|
*/
|
|
name: string;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof OpenDataUnitVersion
|
|
*/
|
|
code: string;
|
|
/**
|
|
*
|
|
* @type {string}
|
|
* @memberof OpenDataUnitVersion
|
|
*/
|
|
comment?: string;
|
|
}
|
|
|
|
/**
|
|
* Check if a given object implements the OpenDataUnitVersion interface.
|
|
*/
|
|
export function instanceOfOpenDataUnitVersion(value: object): boolean {
|
|
let isInstance = true;
|
|
isInstance = isInstance && "name" in value;
|
|
isInstance = isInstance && "code" in value;
|
|
|
|
return isInstance;
|
|
}
|
|
|
|
export function OpenDataUnitVersionFromJSON(json: any): OpenDataUnitVersion {
|
|
return OpenDataUnitVersionFromJSONTyped(json, false);
|
|
}
|
|
|
|
export function OpenDataUnitVersionFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenDataUnitVersion {
|
|
if ((json === undefined) || (json === null)) {
|
|
return json;
|
|
}
|
|
return {
|
|
|
|
'id': !exists(json, 'id') ? undefined : json['id'],
|
|
'name': json['name'],
|
|
'code': json['code'],
|
|
'comment': !exists(json, 'comment') ? undefined : json['comment'],
|
|
};
|
|
}
|
|
|
|
export function OpenDataUnitVersionToJSON(value?: OpenDataUnitVersion | null): any {
|
|
if (value === undefined) {
|
|
return undefined;
|
|
}
|
|
if (value === null) {
|
|
return null;
|
|
}
|
|
return {
|
|
|
|
'name': value.name,
|
|
'code': value.code,
|
|
'comment': value.comment,
|
|
};
|
|
}
|
|
|