UNPKG

@softvision/webpdf-wsclient-typescript

Version:

A simplified and optimized API client library for the webPDF server

65 lines 2.42 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ClusterNodeStatus = void 0; const index_1 = require("./index"); class ClusterNodeStatus { constructor(data) { this.error = index_1.WebserviceResult.fromJson(data === null || data === void 0 ? void 0 : data.error); let isCoordinatorDefault = false; this.isCoordinator = typeof (data === null || data === void 0 ? void 0 : data.isCoordinator) !== "undefined" ? data === null || data === void 0 ? void 0 : data.isCoordinator : isCoordinatorDefault; let localAddressDefault = ""; this.localAddress = typeof (data === null || data === void 0 ? void 0 : data.localAddress) !== "undefined" ? data === null || data === void 0 ? void 0 : data.localAddress : localAddressDefault; let nameDefault = ""; this.name = typeof (data === null || data === void 0 ? void 0 : data.name) !== "undefined" ? data === null || data === void 0 ? void 0 : data.name : nameDefault; let stateDefault = "init"; this.state = typeof (data === null || data === void 0 ? void 0 : data.state) !== "undefined" ? data === null || data === void 0 ? void 0 : data.state : stateDefault; } static getErrorDescription() { return ""; } static getIsCoordinatorDefault() { return false; } static getIsCoordinatorDescription() { return ""; } static getLocalAddressDefault() { return ""; } static getLocalAddressDescription() { return ""; } static getNameDefault() { return ""; } static getNameDescription() { return ""; } static getStateDefault() { return "init"; } static getStateDescription() { return ""; } static fromJson(data) { if (data === undefined || data === null) { return data; } return new ClusterNodeStatus(data); } toJson() { var _a; return { 'error': (_a = this.error) === null || _a === void 0 ? void 0 : _a.toJson(), 'isCoordinator': this.isCoordinator, 'localAddress': this.localAddress, 'name': this.name, 'state': this.state, }; } clone() { return ClusterNodeStatus.fromJson(this.toJson()); } } exports.ClusterNodeStatus = ClusterNodeStatus; //# sourceMappingURL=ClusterNodeStatus.js.map