@emergentmethods/asknews-typescript-sdk
Version:
Typescript SDK for AskNews API
59 lines (58 loc) • 1.85 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.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.TelegramSourceToJSON = exports.TelegramSourceFromJSONTyped = exports.TelegramSourceFromJSON = exports.instanceOfTelegramSource = exports.TelegramSourceIdentifierEnum = void 0;
const TelegramSourceParams_1 = require("./TelegramSourceParams");
/**
* @export
*/
exports.TelegramSourceIdentifierEnum = {
Telegram: 'telegram'
};
/**
* Check if a given object implements the TelegramSource interface.
*/
function instanceOfTelegramSource(value) {
if (!('identifier' in value))
return false;
if (!('params' in value))
return false;
return true;
}
exports.instanceOfTelegramSource = instanceOfTelegramSource;
function TelegramSourceFromJSON(json) {
return TelegramSourceFromJSONTyped(json, false);
}
exports.TelegramSourceFromJSON = TelegramSourceFromJSON;
function TelegramSourceFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'identifier': json['identifier'],
'params': (0, TelegramSourceParams_1.TelegramSourceParamsFromJSON)(json['params']),
};
}
exports.TelegramSourceFromJSONTyped = TelegramSourceFromJSONTyped;
function TelegramSourceToJSON(value) {
if (value == null) {
return value;
}
return {
'identifier': value['identifier'],
'params': (0, TelegramSourceParams_1.TelegramSourceParamsToJSON)(value['params']),
};
}
exports.TelegramSourceToJSON = TelegramSourceToJSON;