How to update google drive file permissions using REST API?
<p>I tried to update google drive file permission, i.e tried to give new role. But it throwing an exception. Here is the sample code.</p>

<pre><code>Permission content = new Permission();
permission.setRole("Reader");
permission.setType("user");
permission.setEmailAddress("x@gmail.com");
driveService.permissions().update(fileId, permissionId, permission).queue(batch, callback);
</code></pre>

<p>For this sample code I got Json exception as follows</p>

<pre><code>{
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "fieldNotWritable",
    "message": "The resource body includes fields which are not directly writable."
   }
  ],
  "code": 403,
  "message": "The resource body includes fields which are not directly writable."
 }
}
</code></pre>

<p>Can some help me, how to resolve this?</p>