UNPKG

@umbraco/json-models-builders

Version:
48 lines 1.14 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.MediaTypeContainerBuilder = void 0; class MediaTypeContainerBuilder { parentBuilder; id; parentId; name; type; sortOrder; constructor(parentBuilder) { this.parentBuilder = parentBuilder; } withId(id) { this.id = id; return this; } withParentId(parentId) { this.parentId = parentId; return this; } withName(name) { this.name = name; return this; } withType(type) { this.type = type; return this; } withSortOrder(sortOrder) { this.sortOrder = sortOrder; return this; } done() { return this.parentBuilder; } build() { return { id: this.id || null, parent: this.parentId ? { id: this.parentId } : null, name: this.name || "", type: this.type || "", sortOrder: this.sortOrder || 0 }; } } exports.MediaTypeContainerBuilder = MediaTypeContainerBuilder; //# sourceMappingURL=mediaTypeContainerBuilder.js.map