public ValidatedResult<ValidationEventDecorator> createDecorator(Model model) {
        // Create dedicated arrays to separate the state of the created decorator from the builder.
        List<ValidationEvent> events = new ArrayList<>();
        List<Suppression> loadedSuppressions = new ArrayList<>(suppressions);
        loadMetadataSuppressions(model, loadedSuppressions, events);
        List<SeverityOverride> loadedSeverityOverrides = new ArrayList<>(severityOverrides);
        loadMetadataSeverityOverrides(model, loadedSeverityOverrides, events);

        // Modify severities and overrides of each encountered event.
        for (int i = 0; i < events.size(); i++) {
            events.set(i, modifyEventSeverity(model, events.get(i), loadedSuppressions, loadedSeverityOverrides));
        }

        return new ValidatedResult<>(new ValidationEventDecorator() {
            @Override
            public boolean canDecorate(ValidationEvent ev) {
                return true;
            }

            @Override
            public ValidationEvent decorate(ValidationEvent ev) {
                return modifyEventSeverity(model, ev, loadedSuppressions, loadedSeverityOverrides);
            }
        }, events);
    }
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