Class PermissionsResource.CreateRequest
Creates a permission for a file or shared drive.
public class PermissionsResource.CreateRequest : DriveBaseServiceRequest<Permission>
- Inheritance
-
PermissionsResource.CreateRequest
- Inherited Members
Constructors
CreateRequest(IClientService, Permission, string)
Constructs a new Create request.
public CreateRequest(IClientService service, Permission body, string fileId)
Parameters
service
IClientServicebody
PermissionfileId
string
Properties
EmailMessage
A plain text custom message to include in the notification email.
public virtual string EmailMessage { get; set; }
Property Value
EnforceSingleParent
Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter only takes effect if the item is not in a shared drive. See moveToNewOwnersRoot for details.
public virtual bool? EnforceSingleParent { get; set; }
Property Value
- bool?
FileId
The ID of the file or shared drive.
public virtual string FileId { get; }
Property Value
HttpMethod
Gets the HTTP method.
public override string HttpMethod { get; }
Property Value
MethodName
Gets the method name.
public override string MethodName { get; }
Property Value
MoveToNewOwnersRoot
This parameter only takes effect if the item is not in a shared drive and the request is attempting to transfer the ownership of the item. When set to true, the item is moved to the new owner's My Drive root folder and all prior parents removed. If set to false, when enforceSingleParent=true, parents are not changed. If set to false, when enforceSingleParent=false, existing parents are not changed; however, the file will be added to the new owner's My Drive root folder, unless it is already in the new owner's My Drive.
public virtual bool? MoveToNewOwnersRoot { get; set; }
Property Value
- bool?
RestPath
Gets the REST path.
public override string RestPath { get; }
Property Value
SendNotificationEmail
Whether to send a notification email when sharing to users or groups. This defaults to true for users and groups, and is not allowed for other requests. It must not be disabled for ownership transfers.
public virtual bool? SendNotificationEmail { get; set; }
Property Value
- bool?
SupportsAllDrives
Whether the requesting application supports both My Drives and shared drives.
public virtual bool? SupportsAllDrives { get; set; }
Property Value
- bool?
SupportsTeamDrives
Deprecated use supportsAllDrives instead.
public virtual bool? SupportsTeamDrives { get; set; }
Property Value
- bool?
TransferOwnership
Whether to transfer ownership to the specified user and downgrade the current owner to a writer. This parameter is required as an acknowledgement of the side effect.
public virtual bool? TransferOwnership { get; set; }
Property Value
- bool?
UseDomainAdminAccess
Issue the request as a domain administrator; if set to true, then the requester will be granted access if the file ID parameter refers to a shared drive and the requester is an administrator of the domain to which the shared drive belongs.
public virtual bool? UseDomainAdminAccess { get; set; }
Property Value
- bool?
Methods
GetBody()
Returns the body of the request.
protected override object GetBody()
Returns
InitParameters()
Initializes Create parameter list.
protected override void InitParameters()