@emergentmethods/asknews-typescript-sdk
Version:
Typescript SDK for AskNews API
61 lines (60 loc) • 2.23 kB
JavaScript
;
/* 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.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.PaginatedResponseAlertResponseToJSON = exports.PaginatedResponseAlertResponseFromJSONTyped = exports.PaginatedResponseAlertResponseFromJSON = exports.instanceOfPaginatedResponseAlertResponse = void 0;
const AlertResponse_1 = require("./AlertResponse");
/**
* Check if a given object implements the PaginatedResponseAlertResponse interface.
*/
function instanceOfPaginatedResponseAlertResponse(value) {
if (!('items' in value))
return false;
if (!('count' in value))
return false;
if (!('nextPage' in value))
return false;
if (!('previousPage' in value))
return false;
return true;
}
exports.instanceOfPaginatedResponseAlertResponse = instanceOfPaginatedResponseAlertResponse;
function PaginatedResponseAlertResponseFromJSON(json) {
return PaginatedResponseAlertResponseFromJSONTyped(json, false);
}
exports.PaginatedResponseAlertResponseFromJSON = PaginatedResponseAlertResponseFromJSON;
function PaginatedResponseAlertResponseFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'items': (json['items'].map(AlertResponse_1.AlertResponseFromJSON)),
'count': json['count'],
'nextPage': json['next_page'],
'previousPage': json['previous_page'],
};
}
exports.PaginatedResponseAlertResponseFromJSONTyped = PaginatedResponseAlertResponseFromJSONTyped;
function PaginatedResponseAlertResponseToJSON(value) {
if (value == null) {
return value;
}
return {
'items': (value['items'].map(AlertResponse_1.AlertResponseToJSON)),
'count': value['count'],
'next_page': value['nextPage'],
'previous_page': value['previousPage'],
};
}
exports.PaginatedResponseAlertResponseToJSON = PaginatedResponseAlertResponseToJSON;