/* 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 NewTask
 */
export interface NewTask {
  /**
   *
   * @type {string}
   * @memberof NewTask
   */
  ticket: string
  /**
   *
   * @type {string}
   * @memberof NewTask
   */
  name: string
  /**
   *
   * @type {boolean}
   * @memberof NewTask
   */
  open: boolean
  /**
   *
   * @type {string}
   * @memberof NewTask
   */
  owner?: string
}

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

export function NewTaskFromJSON(json: any): NewTask {
  return NewTaskFromJSONTyped(json, false)
}

export function NewTaskFromJSONTyped(json: any, ignoreDiscriminator: boolean): NewTask {
  if (json == null) {
    return json
  }
  return {
    ticket: json['ticket'],
    name: json['name'],
    open: json['open'],
    owner: json['owner'] == null ? undefined : json['owner']
  }
}

export function NewTaskToJSON(json: any): NewTask {
  return NewTaskToJSONTyped(json, false)
}

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

  return {
    ticket: value['ticket'],
    name: value['name'],
    open: value['open'],
    owner: value['owner']
  }
}
