"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RealtimeRequestBroadcast = void 0;
const validation_error_1 = require("../../errors/validation-error");
const realtime_request_1 = require("./realtime-request");
const realtime_validator_1 = require("./validators/realtime-validator");
/**
 * A request for sending real-time notifications to all users.
 */
class RealtimeRequestBroadcast extends realtime_request_1.RealtimeRequest {
    validate() {
        const failures = new realtime_validator_1.RealtimeValidator().validate(this);
        if (failures.length > 0) {
            throw new validation_error_1.ValidationError(`RealtimeRequestBroadcast is invalid`, ...failures);
        }
    }
}
exports.RealtimeRequestBroadcast = RealtimeRequestBroadcast;
//# sourceMappingURL=realtime-request-broadcast.js.map