static ArgValidator oneOf(RuntimeType... types) {
        return arg -> {
            if (arg.getType() == RuntimeType.ANY) {
                return null;
            }

            for (RuntimeType type : types) {
                if (arg.getType() == type || type == RuntimeType.ANY) {
                    return null;
                }
            }

            return "Expected one of " + Arrays.toString(types) + ", but found " + arg.getType();
        };
    }
Defines the positional arguments, variadic arguments, and return value
of JMESPath functions.
smithy-jmespath/src/main/java/software/amazon/smithy/jmespath/FunctionDefinition.java