class RoleMapper {

    static String map(ChatMessageType type) {<FILL_FUNCTION_BODY>}
}

        switch (type) {
            case TOOL_EXECUTION_RESULT:
            case USER:
                return "user";
            case AI:
                return "model";
        }
        throw new IllegalArgumentException(type + " is not allowed.");
    
<no_super_class>