Permission class

A permission for a file. A permission grants a user, group, domain or the world access to a file or a folder hierarchy.


Permission.fromJson(Map _json)


allowFileDiscovery bool
Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type domain or anyone.
read / write
deleted bool
Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.
read / write
displayName String
The "pretty" name of the value of the permission. The following is a list of examples for each type of permission: [...]
read / write
domain String
The domain to which this permission refers.
read / write
emailAddress String
The email address of the user or group to which this permission refers.
read / write
expirationTime DateTime
The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions: [...]
read / write
hashCode int
The hash code for this object. [...]
read-only, inherited
id String
The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as permissionId. IDs should be treated as opaque values.
read / write
kind String
Identifies what kind of resource this is. Value: the fixed string "drive#permission".
read / write
permissionDetails List<PermissionPermissionDetails>
Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items.
read / write
A link to the user's profile photo, if available.
read / write
role String
The role granted by this permission. While new values may be supported in the future, the following are currently allowed: [...]
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
teamDrivePermissionDetails List<PermissionTeamDrivePermissionDetails>
Deprecated - use permissionDetails instead.
read / write
type String
The type of the grantee. Valid values are: [...]
read / write
view String
Indicates the view for this permission. Only populated for permissions that belong to a view. published is the only supported value.
read / write


noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
toJson() Map<String, Object>
toString() String
Returns a string representation of this object.


operator ==(Object other) bool
The equality operator. [...]