UNPKG

@nestjs/microservices

Version:

Nest - modern, fast, powerful node.js web framework (@microservices)

57 lines (56 loc) 993 B
/** * @publicApi */ export class MqttRecord { data; options; constructor(data, options) { this.data = data; this.options = options; } } /** * @publicApi */ export class MqttRecordBuilder { data; options; constructor(data) { this.data = data; } setData(data) { this.data = data; return this; } setQoS(qos) { this.options = { ...this.options, qos, }; return this; } setRetain(retain) { this.options = { ...this.options, retain, }; return this; } setDup(dup) { this.options = { ...this.options, dup, }; return this; } setProperties(properties) { this.options = { ...this.options, properties, }; return this; } build() { return new MqttRecord(this.data, this.options); } }