private static ValidationEvent modifyEventSeverity(
            Model model,
            ValidationEvent event,
            List<Suppression> suppressions,
            List<SeverityOverride> severityOverrides
    ) {
        // ERROR and SUPPRESSED events cannot be suppressed.
        if (!event.getSeverity().canSuppress()) {
            return event;
        }

        // Use a suppress trait if present.
        if (event.getShapeId().isPresent()) {
            ShapeId target = event.getShapeId().get();
            Shape shape = model.getShape(target).orElse(null);
            if (shape != null) {
                if (shape.hasTrait(SuppressTrait.ID)) {
                    Suppression suppression = Suppression.fromSuppressTrait(shape);
                    if (suppression.test(event)) {
                        return changeSeverity(event, Severity.SUPPRESSED, suppression.getReason().orElse(null));
                    }
                }
            }
        }

        // Check metadata and manual suppressions.
        for (Suppression suppression : suppressions) {
            if (suppression.test(event)) {
                return changeSeverity(event, Severity.SUPPRESSED, suppression.getReason().orElse(null));
            }
        }

        Severity appliedSeverity = event.getSeverity();
        for (SeverityOverride override : severityOverrides) {
            Severity overrideResult = override.apply(event);
            if (overrideResult.ordinal() > appliedSeverity.ordinal()) {
                appliedSeverity = overrideResult;
            }
        }

        return changeSeverity(event, appliedSeverity, null);
    }
Creates a ValidationEventDecorator for the given Model.

<p>Validators, suppressions, and severity overrides found in the model are used each time
{@link ValidationEventDecorator#decorate(ValidationEvent)} is called. The
{@link ValidationEventDecorator#canDecorate(ValidationEvent)} always returns true.

@param model Model to load validation events from.
@return Returns a decorator that can be used to modify the severity and suppression reason of each given event.
smithy-model/src/main/java/software/amazon/smithy/model/validation/suppressions/ModelBasedEventDecorator.java