UNPKG

@emergentmethods/asknews-typescript-sdk

Version:
63 lines (62 loc) 2.14 kB
"use strict"; /* 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.TelegramSourceToJSONTyped = 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) || value['identifier'] === undefined) return false; if (!('params' in value) || value['params'] === undefined) 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(json) { return TelegramSourceToJSONTyped(json, false); } exports.TelegramSourceToJSON = TelegramSourceToJSON; function TelegramSourceToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'identifier': value['identifier'], 'params': (0, TelegramSourceParams_1.TelegramSourceParamsToJSON)(value['params']), }; } exports.TelegramSourceToJSONTyped = TelegramSourceToJSONTyped;