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. By default, permissions requests only return a subset of
fields. Permission kind, ID, type, and role are always returned. To retrieve
specific fields, see
https://developers.google.com/drive/api/guides/fields-parameter. Some
resource methods (such as permissions.update
) require a permissionId
.
Use the permissions.list
method to retrieve the ID for a file, folder, or
shared drive.
Constructors
-
Permission.new({bool? allowFileDiscovery, bool? deleted, String? displayName, String? domain, String? emailAddress, DateTime? expirationTime, String? id, bool? inheritedPermissionsDisabled, String? kind, bool? pendingOwner, List<
PermissionPermissionDetails> ? permissionDetails, String? photoLink, String? role, List<PermissionTeamDrivePermissionDetails> ? teamDrivePermissionDetails, String? type, String? view}) - Permission.fromJson(Map json_)
Properties
- allowFileDiscovery ↔ bool?
-
Whether the permission allows the file to be discovered through search.
getter/setter pair
- deleted ↔ bool?
-
Whether the account associated with this permission has been deleted.
getter/setter pair
- displayName ↔ String?
-
The "pretty" name of the value of the permission.
getter/setter pair
- domain ↔ String?
-
The domain to which this permission refers.
getter/setter pair
- emailAddress ↔ String?
-
The email address of the user or group to which this permission refers.
getter/setter pair
- expirationTime ↔ DateTime?
-
The time at which this permission will expire (RFC 3339 date-time).
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- id ↔ String?
-
The ID of this permission.
getter/setter pair
- inheritedPermissionsDisabled ↔ bool?
-
When true, only organizers, owners, and users with permissions added
directly on the item can access it.
getter/setter pair
- kind ↔ String?
-
Identifies what kind of resource this is.
getter/setter pair
- pendingOwner ↔ bool?
-
Whether the account associated with this permission is a pending owner.
getter/setter pair
-
permissionDetails
↔ List<
PermissionPermissionDetails> ? -
Details of whether the permissions on this item are inherited or directly
on this item.
getter/setter pair
- photoLink ↔ String?
-
A link to the user's profile photo, if available.
getter/setter pair
- role ↔ String?
-
The role granted by this permission.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
teamDrivePermissionDetails
↔ List<
PermissionTeamDrivePermissionDetails> ? -
Deprecated: Output only.
getter/setter pair
- type ↔ String?
-
The type of the grantee.
getter/setter pair
- view ↔ String?
-
Indicates the view for this permission.
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited