Update Resource.php

it did throw a PHP warning when updated from the older version of google api php client