UNPKG

@emergentmethods/asknews-typescript-sdk

Version:
94 lines (79 loc) 2.38 kB
/* 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 { mapValues } from '../runtime'; import type { TelegramSourceParams } from './TelegramSourceParams'; import { TelegramSourceParamsFromJSON, TelegramSourceParamsFromJSONTyped, TelegramSourceParamsToJSON, TelegramSourceParamsToJSONTyped, } from './TelegramSourceParams'; /** * * @export * @interface TelegramSource */ export interface TelegramSource { /** * * @type {string} * @memberof TelegramSource */ identifier: TelegramSourceIdentifierEnum; /** * * @type {TelegramSourceParams} * @memberof TelegramSource */ params: TelegramSourceParams; } /** * @export */ export const TelegramSourceIdentifierEnum = { Telegram: 'telegram' } as const; export type TelegramSourceIdentifierEnum = typeof TelegramSourceIdentifierEnum[keyof typeof TelegramSourceIdentifierEnum]; /** * Check if a given object implements the TelegramSource interface. */ export function instanceOfTelegramSource(value: object): value is TelegramSource { if (!('identifier' in value) || value['identifier'] === undefined) return false; if (!('params' in value) || value['params'] === undefined) return false; return true; } export function TelegramSourceFromJSON(json: any): TelegramSource { return TelegramSourceFromJSONTyped(json, false); } export function TelegramSourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): TelegramSource { if (json == null) { return json; } return { 'identifier': json['identifier'], 'params': TelegramSourceParamsFromJSON(json['params']), }; } export function TelegramSourceToJSON(json: any): TelegramSource { return TelegramSourceToJSONTyped(json, false); } export function TelegramSourceToJSONTyped(value?: TelegramSource | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'identifier': value['identifier'], 'params': TelegramSourceParamsToJSON(value['params']), }; }