Files
recipes/models/ViewLog.ts

91 lines
1.8 KiB
TypeScript

/* tslint:disable */
/* eslint-disable */
/**
* Tandoor
* Tandoor API Docs
*
* The version of the OpenAPI document: 0.0.0
*
*
* 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 ViewLog
*/
export interface ViewLog {
/**
*
* @type {number}
* @memberof ViewLog
*/
readonly id: number;
/**
*
* @type {number}
* @memberof ViewLog
*/
recipe: number;
/**
*
* @type {number}
* @memberof ViewLog
*/
readonly createdBy: number;
/**
*
* @type {Date}
* @memberof ViewLog
*/
readonly createdAt: Date;
}
/**
* Check if a given object implements the ViewLog interface.
*/
export function instanceOfViewLog(value: object): boolean {
let isInstance = true;
isInstance = isInstance && "id" in value;
isInstance = isInstance && "recipe" in value;
isInstance = isInstance && "createdBy" in value;
isInstance = isInstance && "createdAt" in value;
return isInstance;
}
export function ViewLogFromJSON(json: any): ViewLog {
return ViewLogFromJSONTyped(json, false);
}
export function ViewLogFromJSONTyped(json: any, ignoreDiscriminator: boolean): ViewLog {
if ((json === undefined) || (json === null)) {
return json;
}
return {
'id': json['id'],
'recipe': json['recipe'],
'createdBy': json['created_by'],
'createdAt': (new Date(json['created_at'])),
};
}
export function ViewLogToJSON(value?: ViewLog | null): any {
if (value === undefined) {
return undefined;
}
if (value === null) {
return null;
}
return {
'recipe': value.recipe,
};
}