fhirbuilder
Version:
Another FHIR Tool to build FHIR Resources
53 lines (52 loc) • 1.37 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AttachmentBuilder = void 0;
const models_1 = require("../../models");
const ElementBuilder_1 = require("../base/ElementBuilder");
class AttachmentBuilder extends ElementBuilder_1.ElementBuilder {
attachment;
constructor() {
super();
this.attachment = new models_1.Attachment();
}
addPrimitiveExtension(param, extension) {
this.attachment[param] = extension;
return this;
}
setContentType(contentType) {
this.attachment.contentType = contentType;
return this;
}
setLanguage(language) {
this.attachment.language = language;
return this;
}
setData(data) {
this.attachment.data = data;
return this;
}
setUrl(url) {
this.attachment.url = url;
return this;
}
setSize(size) {
this.attachment.size = size;
return this;
}
setHash(hash) {
this.attachment.hash = hash;
return this;
}
setTitle(title) {
this.attachment.title = title;
return this;
}
setCreation(creation) {
this.attachment.creation = creation;
return this;
}
build() {
return Object.assign(this.attachment, super.build());
}
}
exports.AttachmentBuilder = AttachmentBuilder;