@softvision/webpdf-wsclient-typescript
Version:
A simplified and optimized API client library for the webPDF server
110 lines • 5.34 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ServerVersionInfo = void 0;
const index_1 = require("./../index");
class ServerVersionInfo {
constructor(data) {
let configurationsDefault = {};
this.configurations = typeof (data === null || data === void 0 ? void 0 : data.configurations) !== "undefined" ? data === null || data === void 0 ? void 0 : data.configurations : configurationsDefault;
let hasChangedConfigurationDefault = false;
this.hasChangedConfiguration = typeof (data === null || data === void 0 ? void 0 : data.hasChangedConfiguration) !== "undefined" ? data === null || data === void 0 ? void 0 : data.hasChangedConfiguration : hasChangedConfigurationDefault;
let licenseIsClusterUsageDefault = false;
this.licenseIsClusterUsage = typeof (data === null || data === void 0 ? void 0 : data.licenseIsClusterUsage) !== "undefined" ? data === null || data === void 0 ? void 0 : data.licenseIsClusterUsage : licenseIsClusterUsageDefault;
let licenseTextDefault = "";
this.licenseText = typeof (data === null || data === void 0 ? void 0 : data.licenseText) !== "undefined" ? data === null || data === void 0 ? void 0 : data.licenseText : licenseTextDefault;
let mainVersionDefault = 0;
this.mainVersion = typeof (data === null || data === void 0 ? void 0 : data.mainVersion) !== "undefined" ? data === null || data === void 0 ? void 0 : data.mainVersion : mainVersionDefault;
let minorVersionDefault = 0;
this.minorVersion = typeof (data === null || data === void 0 ? void 0 : data.minorVersion) !== "undefined" ? data === null || data === void 0 ? void 0 : data.minorVersion : minorVersionDefault;
this.providers = index_1.Providers.fromJson(data === null || data === void 0 ? void 0 : data.providers);
let serverPlatformDefault = "windows";
this.serverPlatform = typeof (data === null || data === void 0 ? void 0 : data.serverPlatform) !== "undefined" ? data === null || data === void 0 ? void 0 : data.serverPlatform : serverPlatformDefault;
let serverStartDefault = 0;
this.serverStart = typeof (data === null || data === void 0 ? void 0 : data.serverStart) !== "undefined" ? data === null || data === void 0 ? void 0 : data.serverStart : serverStartDefault;
let serverVersionDefault = "";
this.serverVersion = typeof (data === null || data === void 0 ? void 0 : data.serverVersion) !== "undefined" ? data === null || data === void 0 ? void 0 : data.serverVersion : serverVersionDefault;
}
static getConfigurationsDefault() {
return {};
}
static getConfigurationsDescription() {
return "All server configurations";
}
static getHasChangedConfigurationDefault() {
return false;
}
static getHasChangedConfigurationDescription() {
return "Indicates whether the configuration is currently changed and a restart of the server is necessary to apply the changes.";
}
static getLicenseIsClusterUsageDefault() {
return false;
}
static getLicenseIsClusterUsageDescription() {
return "Indicates whether the license can be used for a cluster coordinator or member.";
}
static getLicenseTextDefault() {
return "";
}
static getLicenseTextDescription() {
return "A string summarizing the server\u00B4s current license.";
}
static getMainVersionDefault() {
return 0;
}
static getMainVersionDescription() {
return "The numeric major version of the server.";
}
static getMinorVersionDefault() {
return 0;
}
static getMinorVersionDescription() {
return "The numeric minor version of the server.";
}
static getProvidersDescription() {
return "";
}
static getServerPlatformDefault() {
return "windows";
}
static getServerPlatformDescription() {
return "";
}
static getServerStartDefault() {
return 0;
}
static getServerStartDescription() {
return "The server start data and time (UTC) as Epoch Unix Timestamp.";
}
static getServerVersionDefault() {
return "";
}
static getServerVersionDescription() {
return "A formatted string containing the server\u00B4s name and version.";
}
static fromJson(data) {
if (data === undefined || data === null) {
return data;
}
return new ServerVersionInfo(data);
}
toJson() {
var _a;
return {
'configurations': this.configurations,
'hasChangedConfiguration': this.hasChangedConfiguration,
'licenseIsClusterUsage': this.licenseIsClusterUsage,
'licenseText': this.licenseText,
'mainVersion': this.mainVersion,
'minorVersion': this.minorVersion,
'providers': (_a = this.providers) === null || _a === void 0 ? void 0 : _a.toJson(),
'serverPlatform': this.serverPlatform,
'serverStart': this.serverStart,
'serverVersion': this.serverVersion,
};
}
clone() {
return ServerVersionInfo.fromJson(this.toJson());
}
}
exports.ServerVersionInfo = ServerVersionInfo;
//# sourceMappingURL=ServerVersionInfo.js.map