/* 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 TicketUpdate
 */
export interface TicketUpdate {
  /**
   *
   * @type {string}
   * @memberof TicketUpdate
   */
  type?: string
  /**
   *
   * @type {string}
   * @memberof TicketUpdate
   */
  name?: string
  /**
   *
   * @type {string}
   * @memberof TicketUpdate
   */
  description?: string
  /**
   *
   * @type {boolean}
   * @memberof TicketUpdate
   */
  open?: boolean
  /**
   *
   * @type {string}
   * @memberof TicketUpdate
   */
  owner?: string
  /**
   *
   * @type {string}
   * @memberof TicketUpdate
   */
  resolution?: string
  /**
   *
   * @type {object}
   * @memberof TicketUpdate
   */
  schema?: object
  /**
   *
   * @type {object}
   * @memberof TicketUpdate
   */
  state?: object
}

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

export function TicketUpdateFromJSON(json: any): TicketUpdate {
  return TicketUpdateFromJSONTyped(json, false)
}

export function TicketUpdateFromJSONTyped(json: any, ignoreDiscriminator: boolean): TicketUpdate {
  if (json == null) {
    return json
  }
  return {
    type: json['type'] == null ? undefined : json['type'],
    name: json['name'] == null ? undefined : json['name'],
    description: json['description'] == null ? undefined : json['description'],
    open: json['open'] == null ? undefined : json['open'],
    owner: json['owner'] == null ? undefined : json['owner'],
    resolution: json['resolution'] == null ? undefined : json['resolution'],
    schema: json['schema'] == null ? undefined : json['schema'],
    state: json['state'] == null ? undefined : json['state']
  }
}

export function TicketUpdateToJSON(json: any): TicketUpdate {
  return TicketUpdateToJSONTyped(json, false)
}

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

  return {
    type: value['type'],
    name: value['name'],
    description: value['description'],
    open: value['open'],
    owner: value['owner'],
    resolution: value['resolution'],
    schema: value['schema'],
    state: value['state']
  }
}
