@emergentmethods/asknews-typescript-sdk
Version:
Typescript SDK for AskNews API
63 lines (62 loc) • 1.98 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.WebSourceToJSONTyped = exports.WebSourceToJSON = exports.WebSourceFromJSONTyped = exports.WebSourceFromJSON = exports.instanceOfWebSource = exports.WebSourceIdentifierEnum = void 0;
const WebSourceParams_1 = require("./WebSourceParams");
/**
* @export
*/
exports.WebSourceIdentifierEnum = {
Web: 'web'
};
/**
* Check if a given object implements the WebSource interface.
*/
function instanceOfWebSource(value) {
if (!('identifier' in value) || value['identifier'] === undefined)
return false;
if (!('params' in value) || value['params'] === undefined)
return false;
return true;
}
exports.instanceOfWebSource = instanceOfWebSource;
function WebSourceFromJSON(json) {
return WebSourceFromJSONTyped(json, false);
}
exports.WebSourceFromJSON = WebSourceFromJSON;
function WebSourceFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'identifier': json['identifier'],
'params': (0, WebSourceParams_1.WebSourceParamsFromJSON)(json['params']),
};
}
exports.WebSourceFromJSONTyped = WebSourceFromJSONTyped;
function WebSourceToJSON(json) {
return WebSourceToJSONTyped(json, false);
}
exports.WebSourceToJSON = WebSourceToJSON;
function WebSourceToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'identifier': value['identifier'],
'params': (0, WebSourceParams_1.WebSourceParamsToJSON)(value['params']),
};
}
exports.WebSourceToJSONTyped = WebSourceToJSONTyped;
;