UNPKG

@emergentmethods/asknews-typescript-sdk

Version:
93 lines (78 loc) 2.24 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 { FilterParams } from './FilterParams'; import { FilterParamsFromJSON, FilterParamsFromJSONTyped, FilterParamsToJSON, FilterParamsToJSONTyped, } from './FilterParams'; /** * * @export * @interface AskNewsSource */ export interface AskNewsSource { /** * * @type {string} * @memberof AskNewsSource */ identifier: AskNewsSourceIdentifierEnum; /** * * @type {FilterParams} * @memberof AskNewsSource */ params?: FilterParams | null; } /** * @export */ export const AskNewsSourceIdentifierEnum = { Asknews: 'asknews' } as const; export type AskNewsSourceIdentifierEnum = typeof AskNewsSourceIdentifierEnum[keyof typeof AskNewsSourceIdentifierEnum]; /** * Check if a given object implements the AskNewsSource interface. */ export function instanceOfAskNewsSource(value: object): value is AskNewsSource { if (!('identifier' in value) || value['identifier'] === undefined) return false; return true; } export function AskNewsSourceFromJSON(json: any): AskNewsSource { return AskNewsSourceFromJSONTyped(json, false); } export function AskNewsSourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): AskNewsSource { if (json == null) { return json; } return { 'identifier': json['identifier'], 'params': json['params'] == null ? undefined : FilterParamsFromJSON(json['params']), }; } export function AskNewsSourceToJSON(json: any): AskNewsSource { return AskNewsSourceToJSONTyped(json, false); } export function AskNewsSourceToJSONTyped(value?: AskNewsSource | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'identifier': value['identifier'], 'params': FilterParamsToJSON(value['params']), }; }