Class PermissionListParser

java.lang.Object
com.amilesend.onedrive.parse.resource.parser.PermissionListParser
All Implemented Interfaces:
com.amilesend.client.parse.parser.GsonParser<List<Permission>>

public class PermissionListParser extends Object implements com.amilesend.client.parse.parser.GsonParser<List<Permission>>
Parses a response body that contains a list of Permissions.

Example response body:

{
  "value": [
    {
      "id": "1",
      "roles": ["write"],
      "link": {
        "webUrl": "webUrlValue",
        "type": "edit"
      }
    },
    {
      "id": "2",
      "roles": ["write"],
      "grantedTo": {
        "user": {
          "id": "5D33DD65C6932946",
          "displayName": "John Doe"
        }
      },
      "inheritedFrom": {
        "driveId": "1234567890ABD",
        "id": "1234567890ABC!123",
        "path": "/drive/root:/Documents" }
    },
    {
      "id": "3",
      "roles": ["write"],
      "link": {
        "webUrl": "webUrlValue",
        "type": "edit",
        "application": {
          "id": "12345",
          "displayName": "Contoso Time Manager"
        }
      }
    }
  ]
}
API Documentation
See Also:
  • Method Details

    • parse

      public List<Permission> parse(@NonNull com.google.gson.Gson gson, @NonNull InputStream jsonStream)
      Specified by:
      parse in interface com.amilesend.client.parse.parser.GsonParser<List<Permission>>