UNPKG

@softvision/webpdf-wsclient-typescript

Version:

A simplified and optimized API client library for the webPDF server

137 lines 4.47 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.RestOperationData = void 0; const generated_sources_1 = require("../generated-sources"); class RestOperationData { constructor(data) { this.billing = generated_sources_1.Billing.fromJson(data.billing); this.password = generated_sources_1.PdfPassword.fromJson(data.password); this.settings = generated_sources_1.Settings.fromJson(data.settings); this.barcode = generated_sources_1.Barcode.fromJson(data.barcode); this.converter = generated_sources_1.Converter.fromJson(data.converter); this.ocr = generated_sources_1.Ocr.fromJson(data.ocr); this.pdfa = generated_sources_1.Pdfa.fromJson(data.pdfa); this.signature = generated_sources_1.Signature.fromJson(data.signature); this.toolbox = (data.toolbox || []).map(generated_sources_1.BaseToolbox.fromJson); this.urlconverter = generated_sources_1.UrlConverter.fromJson(data.urlconverter); } getBilling() { return this.billing; } setBilling(value) { this.billing = value; } isSetBilling() { return typeof this.billing !== "undefined"; } getPassword() { return this.password; } setPassword(value) { this.password = value; } isSetPassword() { return typeof this.password !== "undefined"; } getSettings() { return this.settings; } setSettings(value) { this.settings = value; } isSetSettings() { return typeof this.settings !== "undefined"; } getBarcode() { return this.barcode; } setBarcode(value) { this.barcode = value; } isSetBarcode() { return typeof this.barcode !== "undefined"; } getConverter() { return this.converter; } setConverter(value) { this.converter = value; } isSetConverter() { return typeof this.converter !== "undefined"; } getOcr() { return this.ocr; } setOcr(value) { this.ocr = value; } isSetOcr() { return typeof this.ocr !== "undefined"; } getPdfa() { return this.pdfa; } setPdfa(value) { this.pdfa = value; } isSetPdfa() { return typeof this.pdfa !== "undefined"; } getSignature() { return this.signature; } setSignature(value) { this.signature = value; } isSetSignature() { return typeof this.signature !== "undefined"; } getToolbox() { if (typeof this.toolbox === "undefined") { return []; } return this.toolbox; } setToolbox(value) { this.toolbox = value; } isSetToolbox() { return typeof this.toolbox !== "undefined" && this.toolbox.length > 0; } getUrlconverter() { return this.urlconverter; } setUrlconverter(value) { this.urlconverter = value; } isSetUrlconverter() { return typeof this.urlconverter !== "undefined"; } static fromJson(data) { if (data === undefined || data === null) { return data; } return new RestOperationData(data); } toJson() { var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k; return { 'billing': (_a = this.billing) === null || _a === void 0 ? void 0 : _a.toJson(), 'password': (_b = this.password) === null || _b === void 0 ? void 0 : _b.toJson(), 'settings': (_c = this.settings) === null || _c === void 0 ? void 0 : _c.toJson(), 'barcode': (_d = this.barcode) === null || _d === void 0 ? void 0 : _d.toJson(), 'converter': (_e = this.converter) === null || _e === void 0 ? void 0 : _e.toJson(), 'ocr': (_f = this.ocr) === null || _f === void 0 ? void 0 : _f.toJson(), 'pdfa': (_g = this.pdfa) === null || _g === void 0 ? void 0 : _g.toJson(), 'signature': (_h = this.signature) === null || _h === void 0 ? void 0 : _h.toJson(), 'toolbox': (_j = this.toolbox) === null || _j === void 0 ? void 0 : _j.map((data) => data.toJson()), 'urlconverter': (_k = this.urlconverter) === null || _k === void 0 ? void 0 : _k.toJson() }; } clone() { return RestOperationData.fromJson(this.toJson()); } } exports.RestOperationData = RestOperationData; //# sourceMappingURL=RestOperationData.js.map