UNPKG

@emergentmethods/asknews-typescript-sdk

Version:
47 lines (46 loc) 1.44 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 { ValidationErrorItemFromJSON, ValidationErrorItemToJSON, } from './ValidationErrorItem'; /** * Check if a given object implements the ValidationErrorModel interface. */ export function instanceOfValidationErrorModel(value) { if (!('detail' in value) || value['detail'] === undefined) return false; return true; } export function ValidationErrorModelFromJSON(json) { return ValidationErrorModelFromJSONTyped(json, false); } export function ValidationErrorModelFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'code': json['code'] == null ? undefined : json['code'], 'detail': (json['detail'].map(ValidationErrorItemFromJSON)), }; } export function ValidationErrorModelToJSON(json) { return ValidationErrorModelToJSONTyped(json, false); } export function ValidationErrorModelToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'code': value['code'], 'detail': (value['detail'].map(ValidationErrorItemToJSON)), }; }