/* 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'; import { User, UserFromJSON, UserFromJSONTyped, UserToJSON, } from './'; /** * * @export * @interface PatchedCookLog */ export interface PatchedCookLog { /** * * @type {number} * @memberof PatchedCookLog */ readonly id?: number; /** * * @type {number} * @memberof PatchedCookLog */ recipe?: number; /** * * @type {number} * @memberof PatchedCookLog */ servings?: number | null; /** * * @type {number} * @memberof PatchedCookLog */ rating?: number | null; /** * * @type {string} * @memberof PatchedCookLog */ comment?: string | null; /** * * @type {User} * @memberof PatchedCookLog */ readonly createdBy?: User; /** * * @type {Date} * @memberof PatchedCookLog */ createdAt?: Date; /** * * @type {Date} * @memberof PatchedCookLog */ readonly updatedAt?: Date; } export function PatchedCookLogFromJSON(json: any): PatchedCookLog { return PatchedCookLogFromJSONTyped(json, false); } export function PatchedCookLogFromJSONTyped(json: any, ignoreDiscriminator: boolean): PatchedCookLog { if ((json === undefined) || (json === null)) { return json; } return { 'id': !exists(json, 'id') ? undefined : json['id'], 'recipe': !exists(json, 'recipe') ? undefined : json['recipe'], 'servings': !exists(json, 'servings') ? undefined : json['servings'], 'rating': !exists(json, 'rating') ? undefined : json['rating'], 'comment': !exists(json, 'comment') ? undefined : json['comment'], 'createdBy': !exists(json, 'created_by') ? undefined : UserFromJSON(json['created_by']), 'createdAt': !exists(json, 'created_at') ? undefined : (new Date(json['created_at'])), 'updatedAt': !exists(json, 'updated_at') ? undefined : (new Date(json['updated_at'])), }; } export function PatchedCookLogToJSON(value?: PatchedCookLog | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'recipe': value.recipe, 'servings': value.servings, 'rating': value.rating, 'comment': value.comment, 'created_at': value.createdAt === undefined ? undefined : (value.createdAt.toISOString()), }; }