UNPKG

@softvision/webpdf-wsclient-typescript

Version:

A simplified and optimized API client library for the webPDF server

54 lines 2.28 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.QrSwissPaymentContent = void 0; class QrSwissPaymentContent { constructor(data) { let formatDefault = "json"; this.format = typeof (data === null || data === void 0 ? void 0 : data.format) !== "undefined" ? data === null || data === void 0 ? void 0 : data.format : formatDefault; let sourceDefault = "value"; this.source = typeof (data === null || data === void 0 ? void 0 : data.source) !== "undefined" ? data === null || data === void 0 ? void 0 : data.source : sourceDefault; let uriDefault = ""; this.uri = typeof (data === null || data === void 0 ? void 0 : data.uri) !== "undefined" ? data === null || data === void 0 ? void 0 : data.uri : uriDefault; this.value = data === null || data === void 0 ? void 0 : data.value; } static getFormatDefault() { return "json"; } static getFormatDescription() { return "Selects the format of the encoded data.\n\n* plain = The code shall contain plain text.\n* json = The code shall contain structured json data."; } static getSourceDefault() { return "value"; } static getSourceDescription() { return "Selects the data source for the hereby expressed resource. Possible values are:\n\n* value = The element's value shall contain the BASE64 encoded data.\n* uri = The data shall be located at the given uri."; } static getUriDefault() { return ""; } static getUriDescription() { return "The uri the data shall be located at. (This shall only have effect, if the \"source\" is \"uri\".)"; } static getValueDescription() { return ""; } static fromJson(data) { if (data === undefined || data === null) { return data; } return new QrSwissPaymentContent(data); } toJson() { return { 'format': this.format, 'source': this.source, 'uri': this.uri, 'value': this.value, }; } clone() { return QrSwissPaymentContent.fromJson(this.toJson()); } } exports.QrSwissPaymentContent = QrSwissPaymentContent; //# sourceMappingURL=QrSwissPaymentContent.js.map