@emergentmethods/asknews-typescript-sdk
Version:
Typescript SDK for AskNews API
51 lines (50 loc) • 1.92 kB
JavaScript
/* tslint:disable */
/* eslint-disable */
/**
* AskNews API
* AskNews API
*
* The version of the OpenAPI document: 0.21.1
* 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.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.HTTPValidationErrorToJSONTyped = exports.HTTPValidationErrorToJSON = exports.HTTPValidationErrorFromJSONTyped = exports.HTTPValidationErrorFromJSON = exports.instanceOfHTTPValidationError = void 0;
const ValidationError_1 = require("./ValidationError");
/**
* Check if a given object implements the HTTPValidationError interface.
*/
function instanceOfHTTPValidationError(value) {
return true;
}
exports.instanceOfHTTPValidationError = instanceOfHTTPValidationError;
function HTTPValidationErrorFromJSON(json) {
return HTTPValidationErrorFromJSONTyped(json, false);
}
exports.HTTPValidationErrorFromJSON = HTTPValidationErrorFromJSON;
function HTTPValidationErrorFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'detail': json['detail'] == null ? undefined : (json['detail'].map(ValidationError_1.ValidationErrorFromJSON)),
};
}
exports.HTTPValidationErrorFromJSONTyped = HTTPValidationErrorFromJSONTyped;
function HTTPValidationErrorToJSON(json) {
return HTTPValidationErrorToJSONTyped(json, false);
}
exports.HTTPValidationErrorToJSON = HTTPValidationErrorToJSON;
function HTTPValidationErrorToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'detail': value['detail'] == null ? undefined : (value['detail'].map(ValidationError_1.ValidationErrorToJSON)),
};
}
exports.HTTPValidationErrorToJSONTyped = HTTPValidationErrorToJSONTyped;
;