class TransparentMessageDecodeResponse {
    private boolean success;

    private String reason;

    private List<Object> outputs;

    public static TransparentMessageDecodeResponse of(List<DeviceMessage> messages) {
        TransparentMessageDecodeResponse response = new TransparentMessageDecodeResponse();
        response.success = true;
        response.outputs = messages
            .stream()
            .map(DeviceMessage::toJson)
            .collect(Collectors.toList());

        return response;
    }

    public static TransparentMessageDecodeResponse error(String reason) {<FILL_FUNCTION_BODY>}

    public static TransparentMessageDecodeResponse of(Throwable err) {
        return error(err.getLocalizedMessage());
    }
}

        TransparentMessageDecodeResponse response = new TransparentMessageDecodeResponse();
        response.success = false;
        response.reason = reason;
        return response;
    
<no_super_class>