UNPKG

@softvision/webpdf-wsclient-typescript

Version:

A simplified and optimized API client library for the webPDF server

128 lines 6.34 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.OsStatus = void 0; const index_1 = require("./../index"); class OsStatus { constructor(data) { this.container = index_1.OsStatusContainer.fromJson(data === null || data === void 0 ? void 0 : data.container); let cpuLogicalProcessorsDefault = 0; this.cpuLogicalProcessors = typeof (data === null || data === void 0 ? void 0 : data.cpuLogicalProcessors) !== "undefined" ? data === null || data === void 0 ? void 0 : data.cpuLogicalProcessors : cpuLogicalProcessorsDefault; let memoryCommittedVirtualSizeDefault = 0; this.memoryCommittedVirtualSize = typeof (data === null || data === void 0 ? void 0 : data.memoryCommittedVirtualSize) !== "undefined" ? data === null || data === void 0 ? void 0 : data.memoryCommittedVirtualSize : memoryCommittedVirtualSizeDefault; let memoryFreeDefault = 0; this.memoryFree = typeof (data === null || data === void 0 ? void 0 : data.memoryFree) !== "undefined" ? data === null || data === void 0 ? void 0 : data.memoryFree : memoryFreeDefault; let memoryFreeSwapSizeDefault = 0; this.memoryFreeSwapSize = typeof (data === null || data === void 0 ? void 0 : data.memoryFreeSwapSize) !== "undefined" ? data === null || data === void 0 ? void 0 : data.memoryFreeSwapSize : memoryFreeSwapSizeDefault; let memoryTotalDefault = 0; this.memoryTotal = typeof (data === null || data === void 0 ? void 0 : data.memoryTotal) !== "undefined" ? data === null || data === void 0 ? void 0 : data.memoryTotal : memoryTotalDefault; let memoryTotalSwapSizeDefault = 0; this.memoryTotalSwapSize = typeof (data === null || data === void 0 ? void 0 : data.memoryTotalSwapSize) !== "undefined" ? data === null || data === void 0 ? void 0 : data.memoryTotalSwapSize : memoryTotalSwapSizeDefault; let osArchitectureDefault = ""; this.osArchitecture = typeof (data === null || data === void 0 ? void 0 : data.osArchitecture) !== "undefined" ? data === null || data === void 0 ? void 0 : data.osArchitecture : osArchitectureDefault; let osNameDefault = ""; this.osName = typeof (data === null || data === void 0 ? void 0 : data.osName) !== "undefined" ? data === null || data === void 0 ? void 0 : data.osName : osNameDefault; let osVersionDefault = ""; this.osVersion = typeof (data === null || data === void 0 ? void 0 : data.osVersion) !== "undefined" ? data === null || data === void 0 ? void 0 : data.osVersion : osVersionDefault; let processCpuLoadDefault = 0; this.processCpuLoad = typeof (data === null || data === void 0 ? void 0 : data.processCpuLoad) !== "undefined" ? data === null || data === void 0 ? void 0 : data.processCpuLoad : processCpuLoadDefault; let systemLoadAverageDefault = 0; this.systemLoadAverage = typeof (data === null || data === void 0 ? void 0 : data.systemLoadAverage) !== "undefined" ? data === null || data === void 0 ? void 0 : data.systemLoadAverage : systemLoadAverageDefault; } static getContainerDescription() { return ""; } static getCpuLogicalProcessorsDefault() { return 0; } static getCpuLogicalProcessorsDescription() { return "The number of logical processors available to the application"; } static getMemoryCommittedVirtualSizeDefault() { return 0; } static getMemoryCommittedVirtualSizeDescription() { return "The amount of virtual memory that is guaranteed to be available to the application in bytes"; } static getMemoryFreeDefault() { return 0; } static getMemoryFreeDescription() { return "The amount of free memory in bytes"; } static getMemoryFreeSwapSizeDefault() { return 0; } static getMemoryFreeSwapSizeDescription() { return "The amount of free swap space in bytes"; } static getMemoryTotalDefault() { return 0; } static getMemoryTotalDescription() { return "The total amount of memory in bytes"; } static getMemoryTotalSwapSizeDefault() { return 0; } static getMemoryTotalSwapSizeDescription() { return "The total amount of swap space in bytes"; } static getOsArchitectureDefault() { return ""; } static getOsArchitectureDescription() { return "The operating system\u00B4s architecture"; } static getOsNameDefault() { return ""; } static getOsNameDescription() { return "The name of the operating system, the server is running on"; } static getOsVersionDefault() { return ""; } static getOsVersionDescription() { return "The operating system\u00B4s version number"; } static getProcessCpuLoadDefault() { return 0; } static getProcessCpuLoadDescription() { return "The recent CPU usage of the JVM with a value between 0.0 and 1.0 (a value of 1.0 means that threads were actively executed on all CPUs)"; } static getSystemLoadAverageDefault() { return 0; } static getSystemLoadAverageDescription() { return "The system load average for the last minute (or a negative value if not available)"; } static fromJson(data) { if (data === undefined || data === null) { return data; } return new OsStatus(data); } toJson() { var _a; return { 'container': (_a = this.container) === null || _a === void 0 ? void 0 : _a.toJson(), 'cpuLogicalProcessors': this.cpuLogicalProcessors, 'memoryCommittedVirtualSize': this.memoryCommittedVirtualSize, 'memoryFree': this.memoryFree, 'memoryFreeSwapSize': this.memoryFreeSwapSize, 'memoryTotal': this.memoryTotal, 'memoryTotalSwapSize': this.memoryTotalSwapSize, 'osArchitecture': this.osArchitecture, 'osName': this.osName, 'osVersion': this.osVersion, 'processCpuLoad': this.processCpuLoad, 'systemLoadAverage': this.systemLoadAverage, }; } clone() { return OsStatus.fromJson(this.toJson()); } } exports.OsStatus = OsStatus; //# sourceMappingURL=OsStatus.js.map