@Override
        public Value evaluate(List<Value> arguments) {
            String url = arguments.get(0).expectStringValue().getValue();
            try {
                String encoded = URLEncoder.encode(url, "UTF-8");
                for (Map.Entry<String, String> entry : ENCODING_REPLACEMENTS.entrySet()) {
                    encoded = encoded.replace(entry.getKey(), entry.getValue());
                }
                return Value.stringValue(encoded);
            } catch (UnsupportedEncodingException e) {
                throw new RuntimeException(e);
            }
        }
A {@link FunctionDefinition} for the {@link UriEncode} function.
smithy-rules-engine/src/main/java/software/amazon/smithy/rulesengine/language/syntax/expressions/functions/UriEncode.java