UNPKG

@emergentmethods/asknews-typescript-sdk

Version:
53 lines (52 loc) 1.59 kB
/* tslint:disable */ /* eslint-disable */ /** * AskNews API * AskNews API * * The version of the OpenAPI document: 0.19.10 * Contact: contact@emergentmethods.ai * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { ValidationErrorLocInnerFromJSON, ValidationErrorLocInnerToJSON, } from './ValidationErrorLocInner'; /** * Check if a given object implements the ValidationError interface. */ export function instanceOfValidationError(value) { if (!('loc' in value) || value['loc'] === undefined) return false; if (!('msg' in value) || value['msg'] === undefined) return false; if (!('type' in value) || value['type'] === undefined) return false; return true; } export function ValidationErrorFromJSON(json) { return ValidationErrorFromJSONTyped(json, false); } export function ValidationErrorFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'loc': (json['loc'].map(ValidationErrorLocInnerFromJSON)), 'msg': json['msg'], 'type': json['type'], }; } export function ValidationErrorToJSON(json) { return ValidationErrorToJSONTyped(json, false); } export function ValidationErrorToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'loc': (value['loc'].map(ValidationErrorLocInnerToJSON)), 'msg': value['msg'], 'type': value['type'], }; }