UNPKG

@emergentmethods/asknews-typescript-sdk

Version:
57 lines (56 loc) 2.38 kB
"use strict"; /* tslint:disable */ /* eslint-disable */ /** * AskNews API * AskNews API * * The version of the OpenAPI document: 0.21.1 * 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. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.TopNArticlesForDomainResponseToJSONTyped = exports.TopNArticlesForDomainResponseToJSON = exports.TopNArticlesForDomainResponseFromJSONTyped = exports.TopNArticlesForDomainResponseFromJSON = exports.instanceOfTopNArticlesForDomainResponse = void 0; const TopNArticlesForDomainItem_1 = require("./TopNArticlesForDomainItem"); /** * Check if a given object implements the TopNArticlesForDomainResponse interface. */ function instanceOfTopNArticlesForDomainResponse(value) { if (!('data' in value) || value['data'] === undefined) return false; if (!('totalCount' in value) || value['totalCount'] === undefined) return false; return true; } exports.instanceOfTopNArticlesForDomainResponse = instanceOfTopNArticlesForDomainResponse; function TopNArticlesForDomainResponseFromJSON(json) { return TopNArticlesForDomainResponseFromJSONTyped(json, false); } exports.TopNArticlesForDomainResponseFromJSON = TopNArticlesForDomainResponseFromJSON; function TopNArticlesForDomainResponseFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'data': (json['data'].map(TopNArticlesForDomainItem_1.TopNArticlesForDomainItemFromJSON)), 'totalCount': json['total_count'], }; } exports.TopNArticlesForDomainResponseFromJSONTyped = TopNArticlesForDomainResponseFromJSONTyped; function TopNArticlesForDomainResponseToJSON(json) { return TopNArticlesForDomainResponseToJSONTyped(json, false); } exports.TopNArticlesForDomainResponseToJSON = TopNArticlesForDomainResponseToJSON; function TopNArticlesForDomainResponseToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'data': (value['data'].map(TopNArticlesForDomainItem_1.TopNArticlesForDomainItemToJSON)), 'total_count': value['totalCount'], }; } exports.TopNArticlesForDomainResponseToJSONTyped = TopNArticlesForDomainResponseToJSONTyped;