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

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

export function ReactionUpdateFromJSON(json: any): ReactionUpdate {
  return ReactionUpdateFromJSONTyped(json, false)
}

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

export function ReactionUpdateToJSON(json: any): ReactionUpdate {
  return ReactionUpdateToJSONTyped(json, false)
}

export function ReactionUpdateToJSONTyped(
  value?: ReactionUpdate | 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']
  }
}
