@emergentmethods/asknews-typescript-sdk
Version:
Typescript SDK for AskNews API
96 lines (95 loc) • 4.03 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.EntitiesToJSONTyped = exports.EntitiesToJSON = exports.EntitiesFromJSONTyped = exports.EntitiesFromJSON = exports.instanceOfEntities = void 0;
/**
* Check if a given object implements the Entities interface.
*/
function instanceOfEntities(value) {
return true;
}
exports.instanceOfEntities = instanceOfEntities;
function EntitiesFromJSON(json) {
return EntitiesFromJSONTyped(json, false);
}
exports.EntitiesFromJSON = EntitiesFromJSON;
function EntitiesFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'person': json['Person'] == null ? undefined : json['Person'],
'organization': json['Organization'] == null ? undefined : json['Organization'],
'location': json['Location'] == null ? undefined : json['Location'],
'nationality': json['Nationality'] == null ? undefined : json['Nationality'],
'date': json['Date'] == null ? undefined : json['Date'],
'event': json['Event'] == null ? undefined : json['Event'],
'money': json['Money'] == null ? undefined : json['Money'],
'law': json['Law'] == null ? undefined : json['Law'],
'quantity': json['Quantity'] == null ? undefined : json['Quantity'],
'time': json['Time'] == null ? undefined : json['Time'],
'sports': json['Sports'] == null ? undefined : json['Sports'],
'politics': json['Politics'] == null ? undefined : json['Politics'],
'title': json['Title'] == null ? undefined : json['Title'],
'number': json['Number'] == null ? undefined : json['Number'],
'arms': json['Arms'] == null ? undefined : json['Arms'],
'product': json['Product'] == null ? undefined : json['Product'],
'media': json['Media'] == null ? undefined : json['Media'],
'transportation': json['Transportation'] == null ? undefined : json['Transportation'],
'religion': json['Religion'] == null ? undefined : json['Religion'],
'technology': json['Technology'] == null ? undefined : json['Technology'],
'space': json['Space'] == null ? undefined : json['Space'],
'medicine': json['Medicine'] == null ? undefined : json['Medicine'],
'language': json['Language'] == null ? undefined : json['Language'],
'science': json['Science'] == null ? undefined : json['Science'],
};
}
exports.EntitiesFromJSONTyped = EntitiesFromJSONTyped;
function EntitiesToJSON(json) {
return EntitiesToJSONTyped(json, false);
}
exports.EntitiesToJSON = EntitiesToJSON;
function EntitiesToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'Person': value['person'],
'Organization': value['organization'],
'Location': value['location'],
'Nationality': value['nationality'],
'Date': value['date'],
'Event': value['event'],
'Money': value['money'],
'Law': value['law'],
'Quantity': value['quantity'],
'Time': value['time'],
'Sports': value['sports'],
'Politics': value['politics'],
'Title': value['title'],
'Number': value['number'],
'Arms': value['arms'],
'Product': value['product'],
'Media': value['media'],
'Transportation': value['transportation'],
'Religion': value['religion'],
'Technology': value['technology'],
'Space': value['space'],
'Medicine': value['medicine'],
'Language': value['language'],
'Science': value['science'],
};
}
exports.EntitiesToJSONTyped = EntitiesToJSONTyped;
;