Overview

Classes

  • Google_Service_Drive
  • Google_Service_Drive_About
  • Google_Service_Drive_About_Resource
  • Google_Service_Drive_AboutDriveThemes
  • Google_Service_Drive_AboutStorageQuota
  • Google_Service_Drive_AboutTeamDriveThemes
  • Google_Service_Drive_Change
  • Google_Service_Drive_ChangeList
  • Google_Service_Drive_Changes_Resource
  • Google_Service_Drive_Channel
  • Google_Service_Drive_Channels_Resource
  • Google_Service_Drive_Comment
  • Google_Service_Drive_CommentList
  • Google_Service_Drive_CommentQuotedFileContent
  • Google_Service_Drive_Comments_Resource
  • Google_Service_Drive_Drive
  • Google_Service_Drive_DriveBackgroundImageFile
  • Google_Service_Drive_DriveCapabilities
  • Google_Service_Drive_DriveFile
  • Google_Service_Drive_DriveFileCapabilities
  • Google_Service_Drive_DriveFileContentHints
  • Google_Service_Drive_DriveFileContentHintsThumbnail
  • Google_Service_Drive_DriveFileImageMediaMetadata
  • Google_Service_Drive_DriveFileImageMediaMetadataLocation
  • Google_Service_Drive_DriveFileShortcutDetails
  • Google_Service_Drive_DriveFileVideoMediaMetadata
  • Google_Service_Drive_DriveList
  • Google_Service_Drive_DriveRestrictions
  • Google_Service_Drive_Drives_Resource
  • Google_Service_Drive_FileList
  • Google_Service_Drive_Files_Resource
  • Google_Service_Drive_GeneratedIds
  • Google_Service_Drive_Permission
  • Google_Service_Drive_PermissionList
  • Google_Service_Drive_PermissionPermissionDetails
  • Google_Service_Drive_Permissions_Resource
  • Google_Service_Drive_PermissionTeamDrivePermissionDetails
  • Google_Service_Drive_Replies_Resource
  • Google_Service_Drive_Reply
  • Google_Service_Drive_ReplyList
  • Google_Service_Drive_Revision
  • Google_Service_Drive_RevisionList
  • Google_Service_Drive_Revisions_Resource
  • Google_Service_Drive_StartPageToken
  • Google_Service_Drive_TeamDrive
  • Google_Service_Drive_TeamDriveBackgroundImageFile
  • Google_Service_Drive_TeamDriveCapabilities
  • Google_Service_Drive_TeamDriveList
  • Google_Service_Drive_TeamDriveRestrictions
  • Google_Service_Drive_Teamdrives_Resource
  • Google_Service_Drive_User
  • Overview
  • Class
  • Tree

Class Google_Service_Drive_Permissions_Resource

The "permissions" collection of methods. Typical usage is:

 $driveService = new Google_Service_Drive(...);
 $permissions = $driveService->permissions;
Google_Service_Resource
Extended by Google_Service_Drive_Permissions_Resource
Located at Drive.php
Methods summary
public Google_Service_Drive_Permission
# create( string $fileId, Google_Service_Drive_Permission $postBody, array $optParams = array() )

Creates a permission for a file or shared drive. (permissions.create)

Creates a permission for a file or shared drive. (permissions.create)

Parameters

$fileId
The ID of the file or shared drive.
$postBody
$optParams
Optional parameters.

Returns

Google_Service_Drive_Permission
Google_Service_Drive_Permission

Opt_param

string emailMessage A plain text custom message to include in the notification email.
bool enforceSingleParent Set to true to opt in to API behavior that aims for all items to have exactly one parent. This parameter will only take effect if the item is not in a shared drive. See moveToNewOwnersRoot for details.
bool moveToNewOwnersRoot This parameter will only take 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 will be 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.
bool 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.
bool supportsAllDrives Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
bool supportsTeamDrives Deprecated use supportsAllDrives instead.
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.
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
# delete( string $fileId, string $permissionId, array $optParams = array() )

Deletes a permission. (permissions.delete)

Deletes a permission. (permissions.delete)

Parameters

$fileId
The ID of the file or shared drive.
$permissionId
The ID of the permission.
$optParams
Optional parameters.

Opt_param

bool supportsAllDrives Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
bool supportsTeamDrives Deprecated use supportsAllDrives instead.
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 Google_Service_Drive_Permission
# get( string $fileId, string $permissionId, array $optParams = array() )

Gets a permission by ID. (permissions.get)

Gets a permission by ID. (permissions.get)

Parameters

$fileId
The ID of the file.
$permissionId
The ID of the permission.
$optParams
Optional parameters.

Returns

Google_Service_Drive_Permission
Google_Service_Drive_Permission

Opt_param

bool supportsAllDrives Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
bool supportsTeamDrives Deprecated use supportsAllDrives instead.
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 Google_Service_Drive_PermissionList
# listPermissions( string $fileId, array $optParams = array() )

Lists a file's or shared drive's permissions. (permissions.listPermissions)

Lists a file's or shared drive's permissions. (permissions.listPermissions)

Parameters

$fileId
The ID of the file or shared drive.
$optParams
Optional parameters.

Returns

Google_Service_Drive_PermissionList
Google_Service_Drive_PermissionList

Opt_param

int pageSize The maximum number of permissions to return per page. When not set for files in a shared drive, at most 100 results will be returned. When not set for files that are not in a shared drive, the entire list will be returned.
string pageToken The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response.
bool supportsAllDrives Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
bool supportsTeamDrives Deprecated use supportsAllDrives instead.
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 Google_Service_Drive_Permission
# update( string $fileId, string $permissionId, Google_Service_Drive_Permission $postBody, array $optParams = array() )

Updates a permission with patch semantics. (permissions.update)

Updates a permission with patch semantics. (permissions.update)

Parameters

$fileId
The ID of the file or shared drive.
$permissionId
The ID of the permission.
$postBody
$optParams
Optional parameters.

Returns

Google_Service_Drive_Permission
Google_Service_Drive_Permission

Opt_param

bool removeExpiration Whether to remove the expiration date.
bool supportsAllDrives Deprecated - Whether the requesting application supports both My Drives and shared drives. This parameter will only be effective until June 1, 2020. Afterwards all applications are assumed to support shared drives.
bool supportsTeamDrives Deprecated use supportsAllDrives instead.
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.
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.
© 2020 Google Inc.
Drive API documentation generated by ApiGen 2.8.0