UNPKG

@emergentmethods/asknews-typescript-sdk

Version:
119 lines (108 loc) 3.15 kB
/* tslint:disable */ /* eslint-disable */ /** * AskNews API * AskNews API [![status](https://status.asknews.app/api/badge/2/status?style=for-the-badge)](https://status.asknews.app/status/prod) * * The version of the OpenAPI document: 0.24.66 * 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'; /** * * @export * @interface WebSearchResult2 */ export interface WebSearchResult2 { /** * * @type {string} * @memberof WebSearchResult2 */ title: string; /** * * @type {string} * @memberof WebSearchResult2 */ url: string; /** * * @type {string} * @memberof WebSearchResult2 */ source: string; /** * * @type {string} * @memberof WebSearchResult2 */ published: string; /** * * @type {Array<string>} * @memberof WebSearchResult2 */ keyPoints: Array<string>; /** * * @type {string} * @memberof WebSearchResult2 */ rawText?: string; /** * * @type {string} * @memberof WebSearchResult2 */ asStringKey?: string | null; } /** * Check if a given object implements the WebSearchResult2 interface. */ export function instanceOfWebSearchResult2(value: object): value is WebSearchResult2 { if (!('title' in value) || value['title'] === undefined) return false; if (!('url' in value) || value['url'] === undefined) return false; if (!('source' in value) || value['source'] === undefined) return false; if (!('published' in value) || value['published'] === undefined) return false; if (!('keyPoints' in value) || value['keyPoints'] === undefined) return false; return true; } export function WebSearchResult2FromJSON(json: any): WebSearchResult2 { return WebSearchResult2FromJSONTyped(json, false); } export function WebSearchResult2FromJSONTyped(json: any, ignoreDiscriminator: boolean): WebSearchResult2 { if (json == null) { return json; } return { 'title': json['title'], 'url': json['url'], 'source': json['source'], 'published': json['published'], 'keyPoints': json['key_points'], 'rawText': json['raw_text'] == null ? undefined : json['raw_text'], 'asStringKey': json['as_string_key'] == null ? undefined : json['as_string_key'], }; } export function WebSearchResult2ToJSON(json: any): WebSearchResult2 { return WebSearchResult2ToJSONTyped(json, false); } export function WebSearchResult2ToJSONTyped(value?: WebSearchResult2 | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'title': value['title'], 'url': value['url'], 'source': value['source'], 'published': value['published'], 'key_points': value['keyPoints'], 'raw_text': value['rawText'], 'as_string_key': value['asStringKey'], }; }