@Override
    public void apply(Shape shape, Node value, Context context, Emitter emitter) {
        if (shape instanceof TimestampShape) {
            // Don't validate the timestamp target if a referring member had the timestampFormat trait.
            boolean fromMemberWithTrait = context.getReferringMember()
                    .filter(member -> member.hasTrait(TimestampFormatTrait.ID))
                    .isPresent();
            if (!fromMemberWithTrait) {
                validate(shape, shape.getTrait(TimestampFormatTrait.class).orElse(null), value, emitter);
            }
        } else if (shape instanceof MemberShape && shape.hasTrait(TimestampFormatTrait.ID)) {
            // Only perform timestamp format validation on a member when it references
            // a timestamp shape and the member has an explicit timestampFormat trait.
            validate(shape, shape.expectTrait(TimestampFormatTrait.class), value, emitter);
        }
    }
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