@softvision/webpdf-wsclient-typescript
Version:
A simplified and optimized API client library for the webPDF server
43 lines • 1.53 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ServerState = void 0;
const index_1 = require("./../index");
class ServerState {
constructor(data) {
this.instances = index_1.PoolServerState.fromJson(data === null || data === void 0 ? void 0 : data.instances);
this.jobs = index_1.JobServerState.fromJson(data === null || data === void 0 ? void 0 : data.jobs);
let lastUpdateDefault = 0;
this.lastUpdate = typeof (data === null || data === void 0 ? void 0 : data.lastUpdate) !== "undefined" ? data === null || data === void 0 ? void 0 : data.lastUpdate : lastUpdateDefault;
}
static getInstancesDescription() {
return "";
}
static getJobsDescription() {
return "";
}
static getLastUpdateDefault() {
return 0;
}
static getLastUpdateDescription() {
return "UTC datetime of last update";
}
static fromJson(data) {
if (data === undefined || data === null) {
return data;
}
return new ServerState(data);
}
toJson() {
var _a, _b;
return {
'instances': (_a = this.instances) === null || _a === void 0 ? void 0 : _a.toJson(),
'jobs': (_b = this.jobs) === null || _b === void 0 ? void 0 : _b.toJson(),
'lastUpdate': this.lastUpdate,
};
}
clone() {
return ServerState.fromJson(this.toJson());
}
}
exports.ServerState = ServerState;
//# sourceMappingURL=ServerState.js.map