@emergentmethods/asknews-typescript-sdk
Version:
Typescript SDK for AskNews API
61 lines (60 loc) • 2.83 kB
JavaScript
;
/* tslint:disable */
/* eslint-disable */
/**
* AskNews API
* AskNews API [](https://status.asknews.app/status/prod)
*
* The version of the OpenAPI document: 0.24.22
* 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.DomainHitsSurfaceTimeWindowResponseToJSONTyped = exports.DomainHitsSurfaceTimeWindowResponseToJSON = exports.DomainHitsSurfaceTimeWindowResponseFromJSONTyped = exports.DomainHitsSurfaceTimeWindowResponseFromJSON = exports.instanceOfDomainHitsSurfaceTimeWindowResponse = void 0;
const DomainHitsSurfaceDayItem_1 = require("./DomainHitsSurfaceDayItem");
/**
* Check if a given object implements the DomainHitsSurfaceTimeWindowResponse interface.
*/
function instanceOfDomainHitsSurfaceTimeWindowResponse(value) {
if (!('data' in value) || value['data'] === undefined)
return false;
if (!('totalHits' in value) || value['totalHits'] === undefined)
return false;
if (!('totalSurfaced' in value) || value['totalSurfaced'] === undefined)
return false;
return true;
}
exports.instanceOfDomainHitsSurfaceTimeWindowResponse = instanceOfDomainHitsSurfaceTimeWindowResponse;
function DomainHitsSurfaceTimeWindowResponseFromJSON(json) {
return DomainHitsSurfaceTimeWindowResponseFromJSONTyped(json, false);
}
exports.DomainHitsSurfaceTimeWindowResponseFromJSON = DomainHitsSurfaceTimeWindowResponseFromJSON;
function DomainHitsSurfaceTimeWindowResponseFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'data': (json['data'].map(DomainHitsSurfaceDayItem_1.DomainHitsSurfaceDayItemFromJSON)),
'totalHits': json['total_hits'],
'totalSurfaced': json['total_surfaced'],
};
}
exports.DomainHitsSurfaceTimeWindowResponseFromJSONTyped = DomainHitsSurfaceTimeWindowResponseFromJSONTyped;
function DomainHitsSurfaceTimeWindowResponseToJSON(json) {
return DomainHitsSurfaceTimeWindowResponseToJSONTyped(json, false);
}
exports.DomainHitsSurfaceTimeWindowResponseToJSON = DomainHitsSurfaceTimeWindowResponseToJSON;
function DomainHitsSurfaceTimeWindowResponseToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'data': (value['data'].map(DomainHitsSurfaceDayItem_1.DomainHitsSurfaceDayItemToJSON)),
'total_hits': value['totalHits'],
'total_surfaced': value['totalSurfaced'],
};
}
exports.DomainHitsSurfaceTimeWindowResponseToJSONTyped = DomainHitsSurfaceTimeWindowResponseToJSONTyped;