UNPKG

@emergentmethods/asknews-typescript-sdk

Version:
49 lines (48 loc) 1.48 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 { WebSearchResultFromJSON, WebSearchResultToJSON, } from './WebSearchResult'; /** * Check if a given object implements the WebSearchResponse interface. */ export function instanceOfWebSearchResponse(value) { if (!('asString' in value) || value['asString'] === undefined) return false; if (!('asDicts' in value) || value['asDicts'] === undefined) return false; return true; } export function WebSearchResponseFromJSON(json) { return WebSearchResponseFromJSONTyped(json, false); } export function WebSearchResponseFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'asString': json['as_string'], 'asDicts': (json['as_dicts'].map(WebSearchResultFromJSON)), }; } export function WebSearchResponseToJSON(json) { return WebSearchResponseToJSONTyped(json, false); } export function WebSearchResponseToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'as_string': value['asString'], 'as_dicts': (value['asDicts'].map(WebSearchResultToJSON)), }; }