/* tslint:disable */
/* eslint-disable */
/**
 * Ticketing System API
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.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 { mapValues } from '../runtime'

/**
 *
 * @export
 * @interface TimelineEntryUpdate
 */
export interface TimelineEntryUpdate {
  /**
   *
   * @type {string}
   * @memberof TimelineEntryUpdate
   */
  message?: string
  /**
   *
   * @type {Date}
   * @memberof TimelineEntryUpdate
   */
  time?: Date
}

/**
 * Check if a given object implements the TimelineEntryUpdate interface.
 */
export function instanceOfTimelineEntryUpdate(value: object): value is TimelineEntryUpdate {
  return true
}

export function TimelineEntryUpdateFromJSON(json: any): TimelineEntryUpdate {
  return TimelineEntryUpdateFromJSONTyped(json, false)
}

export function TimelineEntryUpdateFromJSONTyped(
  json: any,
  ignoreDiscriminator: boolean
): TimelineEntryUpdate {
  if (json == null) {
    return json
  }
  return {
    message: json['message'] == null ? undefined : json['message'],
    time: json['time'] == null ? undefined : new Date(json['time'])
  }
}

export function TimelineEntryUpdateToJSON(json: any): TimelineEntryUpdate {
  return TimelineEntryUpdateToJSONTyped(json, false)
}

export function TimelineEntryUpdateToJSONTyped(
  value?: TimelineEntryUpdate | null,
  ignoreDiscriminator: boolean = false
): any {
  if (value == null) {
    return value
  }

  return {
    message: value['message'],
    time: value['time'] == null ? undefined : value['time'].toISOString()
  }
}
