/* 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 ModelError
 */
export interface ModelError {
  /**
   *
   * @type {number}
   * @memberof ModelError
   */
  status: number
  /**
   *
   * @type {string}
   * @memberof ModelError
   */
  error: string
  /**
   *
   * @type {string}
   * @memberof ModelError
   */
  message: string
}

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

export function ModelErrorFromJSON(json: any): ModelError {
  return ModelErrorFromJSONTyped(json, false)
}

export function ModelErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): ModelError {
  if (json == null) {
    return json
  }
  return {
    status: json['status'],
    error: json['error'],
    message: json['message']
  }
}

export function ModelErrorToJSON(json: any): ModelError {
  return ModelErrorToJSONTyped(json, false)
}

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

  return {
    status: value['status'],
    error: value['error'],
    message: value['message']
  }
}
