/* tslint:disable */ /* eslint-disable */ /** * PAY.JP Token API * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.1.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 { exists, mapValues } from '../runtime'; function exists(json: any, key: string) { const value = json[key]; return value !== null && value !== undefined; } function mapValues(data: any, fn: (item: any) => any) { return Object.keys(data).reduce((acc, key) => ({ ...acc, [key]: fn(data[key]) }), {}); } /** * * @export * @interface ModelError */ export interface ModelError { /** * * @type {string} * @memberof ModelError */ code?: string; /** * * @type {string} * @memberof ModelError */ message: string; /** * * @type {string} * @memberof ModelError */ type: string; } export function ModelErrorFromJSON(json: any): ModelError { return ModelErrorFromJSONTyped(json, false); } export function ModelErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): ModelError { if (json === undefined || json === null) { return json; } return { code: !exists(json, 'code') ? undefined : json['code'], message: json['message'], type: json['type'], }; } export function ModelErrorToJSON(value?: ModelError | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { code: value.code, message: value.message, type: value.type, }; }