I tested the latest version from Git and the example is working fine. The only "problem" is that it took a little while for the script to finish processing, even after I saw the file on Google Drive.
The $request
variable is actually of the expected type Google_HTTP_Request
.
$request = $service->files->insert($file);
// In the above line, $service is a `Google_Service_Drive` and
// $service->files is `Google_Service_Drive_Files_Resource`'
// which extends `Google_Service_Resource`.
// That insert() method returns the result of a call
// to Google_Service_Resource::call(), which
// returns a Google_HTTP_Request