@softvision/webpdf-wsclient-typescript
Version:
A simplified and optimized API client library for the webPDF server
65 lines • 2.58 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.PortfolioFile = void 0;
const index_1 = require("./../index");
class PortfolioFile {
constructor(data) {
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.data = index_1.PortfolioFileData.fromJson(data.data);
let fileNameDefault = "";
this.fileName = typeof (data === null || data === void 0 ? void 0 : data.fileName) !== "undefined" ? data === null || data === void 0 ? void 0 : data.fileName : fileNameDefault;
let mimeTypeDefault = "";
this.mimeType = typeof (data === null || data === void 0 ? void 0 : data.mimeType) !== "undefined" ? data === null || data === void 0 ? void 0 : data.mimeType : mimeTypeDefault;
let pathDefault = "";
this.path = typeof (data === null || data === void 0 ? void 0 : data.path) !== "undefined" ? data === null || data === void 0 ? void 0 : data.path : pathDefault;
}
static getCreatorDefault() {
return "";
}
static getCreatorDescription() {
return "The creator of the portfolio entry.";
}
static getDataDescription() {
return "";
}
static getFileNameDefault() {
return "";
}
static getFileNameDescription() {
return "Defines the name under which the document is stored in the portfolio.";
}
static getMimeTypeDefault() {
return "";
}
static getMimeTypeDescription() {
return "The MIME type of the portfolio entry.";
}
static getPathDefault() {
return "";
}
static getPathDescription() {
return "Defines the path\/folder where the document is stored in the portfolio.\n\n**Important:** A portfolio path is defined by the \"\/\" separated nested folder names.";
}
static fromJson(data) {
if (data === undefined || data === null) {
return data;
}
return new PortfolioFile(data);
}
toJson() {
var _a;
return {
'creator': this.creator,
'data': (_a = this.data) === null || _a === void 0 ? void 0 : _a.toJson(),
'fileName': this.fileName,
'mimeType': this.mimeType,
'path': this.path,
};
}
clone() {
return PortfolioFile.fromJson(this.toJson());
}
}
exports.PortfolioFile = PortfolioFile;
//# sourceMappingURL=PortfolioFile.js.map