@emergentmethods/asknews-typescript-sdk
Version:
Typescript SDK for AskNews API
50 lines (49 loc) • 1.36 kB
JavaScript
/* tslint:disable */
/* eslint-disable */
/**
* AskNews API
* AskNews API
*
* The version of the OpenAPI document: 0.18.6
* 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))
return false;
if (!('msg' in value))
return false;
if (!('type' in value))
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(value) {
if (value == null) {
return value;
}
return {
'loc': (value['loc'].map(ValidationErrorLocInnerToJSON)),
'msg': value['msg'],
'type': value['type'],
};
}