UNPKG

@umbraco/json-models-builders

Version:
59 lines 1.42 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ElementValueBuilder = void 0; class ElementValueBuilder { parentBuilder; culture; segment; alias; value; editorAlias; entityType; constructor(parentBuilder) { this.parentBuilder = parentBuilder; } withCulture(culture) { this.culture = culture; return this; } withSegment(segment) { this.segment = segment; return this; } withAlias(alias) { this.alias = alias; return this; } withValue(value) { this.value = value; return this; } withEditorAlias(editorAlias) { this.editorAlias = editorAlias; return this; } withEntityType(entityType) { this.entityType = entityType; return this; } done() { return this.parentBuilder; } build() { let value = null; if (this.value != null) { value = this.value; } return { culture: this.culture || null, segment: this.segment || null, alias: this.alias || null, value: value || null, editorAlias: this.editorAlias || null, entityType: this.entityType || null }; } ; } exports.ElementValueBuilder = ElementValueBuilder; //# sourceMappingURL=elementValueBuilder.js.map