@emergentmethods/asknews-typescript-sdk
Version:
Typescript SDK for AskNews API
55 lines (54 loc) • 1.56 kB
JavaScript
/* tslint:disable */
/* eslint-disable */
/**
* AskNews API
* AskNews API
*
* The version of the OpenAPI document: 0.19.10
* 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.
*/
import { TelegramSourceParamsFromJSON, TelegramSourceParamsToJSON, } from './TelegramSourceParams';
/**
* @export
*/
export const TelegramSourceIdentifierEnum = {
Telegram: 'telegram'
};
/**
* Check if a given object implements the TelegramSource interface.
*/
export function instanceOfTelegramSource(value) {
if (!('identifier' in value) || value['identifier'] === undefined)
return false;
if (!('params' in value) || value['params'] === undefined)
return false;
return true;
}
export function TelegramSourceFromJSON(json) {
return TelegramSourceFromJSONTyped(json, false);
}
export function TelegramSourceFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'identifier': json['identifier'],
'params': TelegramSourceParamsFromJSON(json['params']),
};
}
export function TelegramSourceToJSON(json) {
return TelegramSourceToJSONTyped(json, false);
}
export function TelegramSourceToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'identifier': value['identifier'],
'params': TelegramSourceParamsToJSON(value['params']),
};
}