@emergentmethods/asknews-typescript-sdk
Version:
Typescript SDK for AskNews API
60 lines (59 loc) • 2.12 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.IndexCountItemToJSONTyped = exports.IndexCountItemToJSON = exports.IndexCountItemFromJSONTyped = exports.IndexCountItemFromJSON = exports.instanceOfIndexCountItem = void 0;
/**
* Check if a given object implements the IndexCountItem interface.
*/
function instanceOfIndexCountItem(value) {
if (!('start' in value) || value['start'] === undefined)
return false;
if (!('end' in value) || value['end'] === undefined)
return false;
if (!('count' in value) || value['count'] === undefined)
return false;
return true;
}
exports.instanceOfIndexCountItem = instanceOfIndexCountItem;
function IndexCountItemFromJSON(json) {
return IndexCountItemFromJSONTyped(json, false);
}
exports.IndexCountItemFromJSON = IndexCountItemFromJSON;
function IndexCountItemFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'start': (new Date(json['start'])),
'end': (new Date(json['end'])),
'count': json['count'],
};
}
exports.IndexCountItemFromJSONTyped = IndexCountItemFromJSONTyped;
function IndexCountItemToJSON(json) {
return IndexCountItemToJSONTyped(json, false);
}
exports.IndexCountItemToJSON = IndexCountItemToJSON;
function IndexCountItemToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'start': ((value['start']).toISOString()),
'end': ((value['end']).toISOString()),
'count': value['count'],
};
}
exports.IndexCountItemToJSONTyped = IndexCountItemToJSONTyped;