/* 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 NewTimelineEntry
 */
export interface NewTimelineEntry {
  /**
   *
   * @type {string}
   * @memberof NewTimelineEntry
   */
  ticket: string
  /**
   *
   * @type {string}
   * @memberof NewTimelineEntry
   */
  message: string
  /**
   *
   * @type {Date}
   * @memberof NewTimelineEntry
   */
  time: Date
}

/**
 * Check if a given object implements the NewTimelineEntry interface.
 */
export function instanceOfNewTimelineEntry(value: object): value is NewTimelineEntry {
  if (!('ticket' in value) || value['ticket'] === undefined) return false
  if (!('message' in value) || value['message'] === undefined) return false
  if (!('time' in value) || value['time'] === undefined) return false
  return true
}

export function NewTimelineEntryFromJSON(json: any): NewTimelineEntry {
  return NewTimelineEntryFromJSONTyped(json, false)
}

export function NewTimelineEntryFromJSONTyped(
  json: any,
  ignoreDiscriminator: boolean
): NewTimelineEntry {
  if (json == null) {
    return json
  }
  return {
    ticket: json['ticket'],
    message: json['message'],
    time: new Date(json['time'])
  }
}

export function NewTimelineEntryToJSON(json: any): NewTimelineEntry {
  return NewTimelineEntryToJSONTyped(json, false)
}

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

  return {
    ticket: value['ticket'],
    message: value['message'],
    time: value['time'].toISOString()
  }
}
