UNPKG

@softvision/webpdf-wsclient-typescript

Version:

A simplified and optimized API client library for the webPDF server

95 lines 4.09 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ToolboxDescriptionDescription = void 0; const index_1 = require("./../index"); class ToolboxDescriptionDescription { constructor(data) { let allowEmptyValuesDefault = false; this.allowEmptyValues = typeof (data === null || data === void 0 ? void 0 : data.allowEmptyValues) !== "undefined" ? data === null || data === void 0 ? void 0 : data.allowEmptyValues : allowEmptyValuesDefault; let authorDefault = ""; this.author = typeof (data === null || data === void 0 ? void 0 : data.author) !== "undefined" ? data === null || data === void 0 ? void 0 : data.author : authorDefault; let creatorDefault = ""; this.creator = typeof (data === null || data === void 0 ? void 0 : data.creator) !== "undefined" ? data === null || data === void 0 ? void 0 : data.creator : creatorDefault; this.custom = (data.custom || []).map(index_1.DescriptionCustom.fromJson); let keywordsDefault = ""; this.keywords = typeof (data === null || data === void 0 ? void 0 : data.keywords) !== "undefined" ? data === null || data === void 0 ? void 0 : data.keywords : keywordsDefault; let producerDefault = ""; this.producer = typeof (data === null || data === void 0 ? void 0 : data.producer) !== "undefined" ? data === null || data === void 0 ? void 0 : data.producer : producerDefault; let subjectDefault = ""; this.subject = typeof (data === null || data === void 0 ? void 0 : data.subject) !== "undefined" ? data === null || data === void 0 ? void 0 : data.subject : subjectDefault; let titleDefault = ""; this.title = typeof (data === null || data === void 0 ? void 0 : data.title) !== "undefined" ? data === null || data === void 0 ? void 0 : data.title : titleDefault; } static getAllowEmptyValuesDefault() { return false; } static getAllowEmptyValuesDescription() { return "If \"true,\" empty values will be accepted."; } static getAuthorDefault() { return ""; } static getAuthorDescription() { return "Used to set the PDF document's Author field. Multiple values should be separated with \";\"."; } static getCreatorDefault() { return ""; } static getCreatorDescription() { return "Used to set the PDF document's Creator field."; } static getCustomDefault() { return []; } static getCustomDescription() { return ""; } static getKeywordsDefault() { return ""; } static getKeywordsDescription() { return "Used to set the PDF document's Keywords field. Multiple values should be separated with \";\"."; } static getProducerDefault() { return ""; } static getProducerDescription() { return "Used to set the PDF document's Producer field."; } static getSubjectDefault() { return ""; } static getSubjectDescription() { return "Used to set the PDF document's Subject field."; } static getTitleDefault() { return ""; } static getTitleDescription() { return "Used to set the PDF document's Title field."; } static fromJson(data) { if (data === undefined || data === null) { return data; } return new ToolboxDescriptionDescription(data); } toJson() { var _a; return { 'allowEmptyValues': this.allowEmptyValues, 'author': this.author, 'creator': this.creator, 'custom': (_a = this.custom) === null || _a === void 0 ? void 0 : _a.map((data) => data.toJson()), 'keywords': this.keywords, 'producer': this.producer, 'subject': this.subject, 'title': this.title, }; } clone() { return ToolboxDescriptionDescription.fromJson(this.toJson()); } } exports.ToolboxDescriptionDescription = ToolboxDescriptionDescription; //# sourceMappingURL=ToolboxDescriptionDescription.js.map