UNPKG

@umbraco/json-models-builders

Version:
48 lines 1.15 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.MemberTypeContainerBuilder = void 0; class MemberTypeContainerBuilder { 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 || "Group", sortOrder: this.sortOrder || 0 }; } } exports.MemberTypeContainerBuilder = MemberTypeContainerBuilder; //# sourceMappingURL=memberTypeContainerBuilder.js.map