/* 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 NewReaction
 */
export interface NewReaction {
  /**
   *
   * @type {string}
   * @memberof NewReaction
   */
  name: string
  /**
   *
   * @type {string}
   * @memberof NewReaction
   */
  action: string
  /**
   *
   * @type {object}
   * @memberof NewReaction
   */
  actiondata: object
  /**
   *
   * @type {string}
   * @memberof NewReaction
   */
  trigger: string
  /**
   *
   * @type {object}
   * @memberof NewReaction
   */
  triggerdata: object
}

/**
 * Check if a given object implements the NewReaction interface.
 */
export function instanceOfNewReaction(value: object): value is NewReaction {
  if (!('name' in value) || value['name'] === undefined) return false
  if (!('action' in value) || value['action'] === undefined) return false
  if (!('actiondata' in value) || value['actiondata'] === undefined) return false
  if (!('trigger' in value) || value['trigger'] === undefined) return false
  if (!('triggerdata' in value) || value['triggerdata'] === undefined) return false
  return true
}

export function NewReactionFromJSON(json: any): NewReaction {
  return NewReactionFromJSONTyped(json, false)
}

export function NewReactionFromJSONTyped(json: any, ignoreDiscriminator: boolean): NewReaction {
  if (json == null) {
    return json
  }
  return {
    name: json['name'],
    action: json['action'],
    actiondata: json['actiondata'],
    trigger: json['trigger'],
    triggerdata: json['triggerdata']
  }
}

export function NewReactionToJSON(json: any): NewReaction {
  return NewReactionToJSONTyped(json, false)
}

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

  return {
    name: value['name'],
    action: value['action'],
    actiondata: value['actiondata'],
    trigger: value['trigger'],
    triggerdata: value['triggerdata']
  }
}
