private void validate(Shape shape, TimestampFormatTrait trait, Node value, Emitter emitter) {
        if (trait == null) {
            defaultValidation(shape, value, emitter);
        } else {
            switch (trait.getValue()) {
                case TimestampFormatTrait.DATE_TIME:
                    validateDatetime(shape, value, emitter);
                    break;
                case TimestampFormatTrait.EPOCH_SECONDS:
                    // Accepts any number including floats.
                    if (!value.isNumberNode()) {
                        emitter.accept(value,
                                Severity.ERROR,
                                String.format(
                                        "Invalid %s value provided for a timestamp with a `%s` format.",
                                        value.getType(),
                                        trait.getValue()));
                    }
                    break;
                case TimestampFormatTrait.HTTP_DATE:
                    validateHttpDate(value, emitter);
                    break;
                default:
                    // This validator plugin doesn't know this format, but other plugins might.
                    LOGGER.info(() -> "Unknown timestampFormat trait value: " + trait.getValue());
            }
        }
    }
Validates that timestamp shapes contain values that are compatible with their
timestampFormat traits or contain values that are numbers or an RFC 3339
date-time production.
smithy-model/src/main/java/software/amazon/smithy/model/validation/node/TimestampFormatPlugin.java