UNPKG

@softvision/webpdf-wsclient-typescript

Version:

A simplified and optimized API client library for the webPDF server

85 lines 3.95 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ClusterSettings = void 0; class ClusterSettings { constructor(data) { let connectTimeoutDefault = 0; this.connectTimeout = typeof (data === null || data === void 0 ? void 0 : data.connectTimeout) !== "undefined" ? data === null || data === void 0 ? void 0 : data.connectTimeout : connectTimeoutDefault; let modeDefault = "single"; this.mode = typeof (data === null || data === void 0 ? void 0 : data.mode) !== "undefined" ? data === null || data === void 0 ? void 0 : data.mode : modeDefault; 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 nodeNameDefault = ""; this.nodeName = typeof (data === null || data === void 0 ? void 0 : data.nodeName) !== "undefined" ? data === null || data === void 0 ? void 0 : data.nodeName : nodeNameDefault; let roleDefault = "member"; this.role = typeof (data === null || data === void 0 ? void 0 : data.role) !== "undefined" ? data === null || data === void 0 ? void 0 : data.role : roleDefault; let secretKeyDefault = ""; this.secretKey = typeof (data === null || data === void 0 ? void 0 : data.secretKey) !== "undefined" ? data === null || data === void 0 ? void 0 : data.secretKey : secretKeyDefault; let stopOnErrorDefault = false; this.stopOnError = typeof (data === null || data === void 0 ? void 0 : data.stopOnError) !== "undefined" ? data === null || data === void 0 ? void 0 : data.stopOnError : stopOnErrorDefault; } static getConnectTimeoutDefault() { return 0; } static getConnectTimeoutDescription() { return "Defines the number of milliseconds that a server node waits when it joins the cluster (e.g. when waiting for a coordinator server node)"; } static getModeDefault() { return "single"; } static getModeDescription() { return ""; } static getNameDefault() { return ""; } static getNameDescription() { return "Defines the name of the cluster. If the server node has a coordinator role, the cluster is created under this name. If the server node has the role of a member, the node attempts to join the cluster with this name."; } static getNodeNameDefault() { return ""; } static getNodeNameDescription() { return "Defines the name for the node. If it is empty, the host name of the machine is used."; } static getRoleDefault() { return "member"; } static getRoleDescription() { return ""; } static getSecretKeyDefault() { return ""; } static getSecretKeyDescription() { return "The encryption key used for communication in the cluster between the nodes. All nodes must use the same 64-digit hexadecimal encryption key. The encryption key is created when the cluster is initialized."; } static getStopOnErrorDefault() { return false; } static getStopOnErrorDescription() { return "If 'true', the server node is also started if an error has occurred (e.g. when joining the cluster)."; } static fromJson(data) { if (data === undefined || data === null) { return data; } return new ClusterSettings(data); } toJson() { return { 'connectTimeout': this.connectTimeout, 'mode': this.mode, 'name': this.name, 'nodeName': this.nodeName, 'role': this.role, 'secretKey': this.secretKey, 'stopOnError': this.stopOnError, }; } clone() { return ClusterSettings.fromJson(this.toJson()); } } exports.ClusterSettings = ClusterSettings; //# sourceMappingURL=ClusterSettings.js.map