Show / Hide Table of Contents

Class Permission

A permission for a file. A permission grants a user, group, domain, or the world access to a file or a folder hierarchy. 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.

Inheritance
object
Permission
Implements
IDirectResponseSchema
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Google.Apis.Drive.v2.Data
Assembly: Google.Apis.Drive.v2.dll
Syntax
public class Permission : IDirectResponseSchema

Properties

AdditionalRoles

Additional roles for this user. Only commenter is currently allowed, though more may be supported in the future.

Declaration
[JsonProperty("additionalRoles")]
public virtual IList<string> AdditionalRoles { get; set; }
Property Value
Type Description
IList<string>

AuthKey

Output only. Deprecated.

Declaration
[JsonProperty("authKey")]
public virtual string AuthKey { get; set; }
Property Value
Type Description
string

Deleted

Output only. Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions.

Declaration
[JsonProperty("deleted")]
public virtual bool? Deleted { get; set; }
Property Value
Type Description
bool?

Domain

Output only. The domain name of the entity this permission refers to. This is an output-only field which is present when the permission type is user, group or domain.

Declaration
[JsonProperty("domain")]
public virtual string Domain { get; set; }
Property Value
Type Description
string

ETag

Output only. The ETag of the permission.

Declaration
[JsonProperty("etag")]
public virtual string ETag { get; set; }
Property Value
Type Description
string

EmailAddress

Output only. The email address of the user or group this permission refers to. This is an output-only field which is present when the permission type is user or group.

Declaration
[JsonProperty("emailAddress")]
public virtual string EmailAddress { get; set; }
Property Value
Type Description
string

ExpirationDate

DateTime representation of ExpirationDateRaw.

Declaration
[JsonIgnore]
[Obsolete("This property is obsolete and may behave unexpectedly; please use ExpirationDateDateTimeOffset instead.")]
public virtual DateTime? ExpirationDate { get; set; }
Property Value
Type Description
DateTime?

ExpirationDateDateTimeOffset

DateTimeOffset representation of ExpirationDateRaw.

Declaration
[JsonIgnore]
public virtual DateTimeOffset? ExpirationDateDateTimeOffset { get; set; }
Property Value
Type Description
DateTimeOffset?

ExpirationDateRaw

The time at which this permission will expire (RFC 3339 date-time). Expiration dates have the following restrictions: - They can only be set on user and group permissions - The date must be in the future - The date cannot be more than a year in the future - The date can only be set on drive.permissions.update or drive.permissions.patch requests

Declaration
[JsonProperty("expirationDate")]
public virtual string ExpirationDateRaw { get; set; }
Property Value
Type Description
string

Id

The ID of the user this permission refers to, and identical to the permissionId in the About and Files resources. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.

Declaration
[JsonProperty("id")]
public virtual string Id { get; set; }
Property Value
Type Description
string

InheritedPermissionsDisabled

When true, only organizers, owners, and users with permissions added directly on the item can access it.

Declaration
[JsonProperty("inheritedPermissionsDisabled")]
public virtual bool? InheritedPermissionsDisabled { get; set; }
Property Value
Type Description
bool?

Kind

Output only. This is always drive#permission.

Declaration
[JsonProperty("kind")]
public virtual string Kind { get; set; }
Property Value
Type Description
string

Name

Output only. The name for this permission.

Declaration
[JsonProperty("name")]
public virtual string Name { get; set; }
Property Value
Type Description
string

PendingOwner

Whether the account associated with this permission is a pending owner. Only populated for user type permissions for files that are not in a shared drive.

Declaration
[JsonProperty("pendingOwner")]
public virtual bool? PendingOwner { get; set; }
Property Value
Type Description
bool?

PermissionDetails

Output only. Details of whether the permissions on this item are inherited or directly on this item.

Declaration
[JsonProperty("permissionDetails")]
public virtual IList<Permission.PermissionDetailsData> PermissionDetails { get; set; }
Property Value
Type Description
IList<Permission.PermissionDetailsData>

PhotoLink

Output only. A link to the profile photo, if available.

Declaration
[JsonProperty("photoLink")]
public virtual string PhotoLink { get; set; }
Property Value
Type Description
string

Role

The primary role for this user. While new values may be supported in the future, the following are currently allowed: * owner * organizer * fileOrganizer * writer * reader

Declaration
[JsonProperty("role")]
public virtual string Role { get; set; }
Property Value
Type Description
string

SelfLink

Output only. A link back to this permission.

Declaration
[JsonProperty("selfLink")]
public virtual string SelfLink { get; set; }
Property Value
Type Description
string

TeamDrivePermissionDetails

Output only. Deprecated: Use permissionDetails instead.

Declaration
[JsonProperty("teamDrivePermissionDetails")]
public virtual IList<Permission.TeamDrivePermissionDetailsData> TeamDrivePermissionDetails { get; set; }
Property Value
Type Description
IList<Permission.TeamDrivePermissionDetailsData>

Type

The account type. Allowed values are: * user * group * domain * anyone

Declaration
[JsonProperty("type")]
public virtual string Type { get; set; }
Property Value
Type Description
string

Value

The email address or domain name for the entity. This is used during inserts and is not populated in responses. When making a drive.permissions.insert request, exactly one of the id or value fields must be specified unless the permission type is anyone, in which case both id and value are ignored.

Declaration
[JsonProperty("value")]
public virtual string Value { get; set; }
Property Value
Type Description
string

View

Indicates the view for this permission. Only populated for permissions that belong to a view. published and metadata are the only supported values. - published: The permission's role is published_reader. - metadata: The item is only visible to the metadata view because the item has limited access and the scope has at least read access to the parent. Note: The metadata view is currently only supported on folders.

Declaration
[JsonProperty("view")]
public virtual string View { get; set; }
Property Value
Type Description
string

WithLink

Whether the link is required for this permission.

Declaration
[JsonProperty("withLink")]
public virtual bool? WithLink { get; set; }
Property Value
Type Description
bool?

Implements

IDirectResponseSchema
In this article
Back to top Generated by DocFX