@softvision/webpdf-wsclient-typescript
Version:
A simplified and optimized API client library for the webPDF server
87 lines • 3.44 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ClusterStatus = void 0;
const index_1 = require("./index");
class ClusterStatus {
constructor(data) {
this.error = index_1.WebserviceResult.fromJson(data === null || data === void 0 ? void 0 : data.error);
let idDefault = "";
this.id = typeof (data === null || data === void 0 ? void 0 : data.id) !== "undefined" ? data === null || data === void 0 ? void 0 : data.id : idDefault;
let isDemoModeDefault = false;
this.isDemoMode = typeof (data === null || data === void 0 ? void 0 : data.isDemoMode) !== "undefined" ? data === null || data === void 0 ? void 0 : data.isDemoMode : isDemoModeDefault;
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 maximumAllowedNodesDefault = 0;
this.maximumAllowedNodes = typeof (data === null || data === void 0 ? void 0 : data.maximumAllowedNodes) !== "undefined" ? data === null || data === void 0 ? void 0 : data.maximumAllowedNodes : maximumAllowedNodesDefault;
let namespaceDefault = "";
this.namespace = typeof (data === null || data === void 0 ? void 0 : data.namespace) !== "undefined" ? data === null || data === void 0 ? void 0 : data.namespace : namespaceDefault;
this.nodes = (data.nodes || []).map(index_1.ClusterNodeStatus.fromJson);
this.settings = index_1.ClusterSettings.fromJson(data === null || data === void 0 ? void 0 : data.settings);
}
static getErrorDescription() {
return "";
}
static getIdDefault() {
return "";
}
static getIdDescription() {
return "";
}
static getIsDemoModeDefault() {
return false;
}
static getIsDemoModeDescription() {
return "";
}
static getLocalAddressDefault() {
return "";
}
static getLocalAddressDescription() {
return "";
}
static getMaximumAllowedNodesDefault() {
return 0;
}
static getMaximumAllowedNodesDescription() {
return "";
}
static getNamespaceDefault() {
return "";
}
static getNamespaceDescription() {
return "";
}
static getNodesDefault() {
return [];
}
static getNodesDescription() {
return "";
}
static getSettingsDescription() {
return "";
}
static fromJson(data) {
if (data === undefined || data === null) {
return data;
}
return new ClusterStatus(data);
}
toJson() {
var _a, _b, _c;
return {
'error': (_a = this.error) === null || _a === void 0 ? void 0 : _a.toJson(),
'id': this.id,
'isDemoMode': this.isDemoMode,
'localAddress': this.localAddress,
'maximumAllowedNodes': this.maximumAllowedNodes,
'namespace': this.namespace,
'nodes': (_b = this.nodes) === null || _b === void 0 ? void 0 : _b.map((data) => data.toJson()),
'settings': (_c = this.settings) === null || _c === void 0 ? void 0 : _c.toJson(),
};
}
clone() {
return ClusterStatus.fromJson(this.toJson());
}
}
exports.ClusterStatus = ClusterStatus;
//# sourceMappingURL=ClusterStatus.js.map