UNPKG

@emergentmethods/asknews-typescript-sdk

Version:
46 lines (45 loc) 1.27 kB
/* tslint:disable */ /* eslint-disable */ /** * AskNews API * AskNews API * * The version of the OpenAPI document: 0.18.6 * 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)) return false; if (!('asDicts' in value)) 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(value) { if (value == null) { return value; } return { 'as_string': value['asString'], 'as_dicts': (value['asDicts'].map(WebSearchResultToJSON)), }; }