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

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

export function NewCommentFromJSON(json: any): NewComment {
  return NewCommentFromJSONTyped(json, false)
}

export function NewCommentFromJSONTyped(json: any, ignoreDiscriminator: boolean): NewComment {
  if (json == null) {
    return json
  }
  return {
    ticket: json['ticket'],
    author: json['author'],
    message: json['message']
  }
}

export function NewCommentToJSON(json: any): NewComment {
  return NewCommentToJSONTyped(json, false)
}

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

  return {
    ticket: value['ticket'],
    author: value['author'],
    message: value['message']
  }
}
