/* 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 NewType
 */
export interface NewType {
  /**
   *
   * @type {string}
   * @memberof NewType
   */
  icon?: string
  /**
   *
   * @type {string}
   * @memberof NewType
   */
  plural: string
  /**
   *
   * @type {object}
   * @memberof NewType
   */
  schema: object
  /**
   *
   * @type {string}
   * @memberof NewType
   */
  singular: string
}

/**
 * Check if a given object implements the NewType interface.
 */
export function instanceOfNewType(value: object): value is NewType {
  if (!('plural' in value) || value['plural'] === undefined) return false
  if (!('schema' in value) || value['schema'] === undefined) return false
  if (!('singular' in value) || value['singular'] === undefined) return false
  return true
}

export function NewTypeFromJSON(json: any): NewType {
  return NewTypeFromJSONTyped(json, false)
}

export function NewTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): NewType {
  if (json == null) {
    return json
  }
  return {
    icon: json['icon'] == null ? undefined : json['icon'],
    plural: json['plural'],
    schema: json['schema'],
    singular: json['singular']
  }
}

export function NewTypeToJSON(json: any): NewType {
  return NewTypeToJSONTyped(json, false)
}

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

  return {
    icon: value['icon'],
    plural: value['plural'],
    schema: value['schema'],
    singular: value['singular']
  }
}
