Documentation

Google_Service_Drive_Resource_Permissions extends Google_Service_Resource
in package

The "permissions" collection of methods.

Typical usage is: $driveService = new Google_Service_Drive(...); $permissions = $driveService->permissions;

Table of Contents

$client  : Google_Client
$methods  : array<string|int, mixed>
$resourceName  : string
$rootUrl  : string
$serviceName  : string
$servicePath  : string
$stackParameters  : mixed
__construct()  : mixed
call()  : Google_Http_Request|expectedClass
TODO: This function needs simplifying.
create()  : Google_Service_Drive_Permission
Creates a permission for a file or shared drive. (permissions.create)
createRequestUri()  : string
Parse/expand request parameters and create a fully qualified request uri.
delete()  : mixed
Deletes a permission. (permissions.delete)
get()  : Google_Service_Drive_Permission
Gets a permission by ID. (permissions.get)
listPermissions()  : Google_Service_Drive_PermissionList
Lists a file's or shared drive's permissions. (permissions.listPermissions)
update()  : Google_Service_Drive_Permission
Updates a permission with patch semantics. (permissions.update)
convertToArrayAndStripNulls()  : mixed

Properties

$methods

private array<string|int, mixed> $methods

$resourceName

private string $resourceName

$serviceName

private string $serviceName

$servicePath

private string $servicePath

$stackParameters

private mixed $stackParameters = array('alt' => array('type' => 'string', 'location' => 'query'), 'fields' => array('type' => 'string', 'location' => 'query'), 'trace' => array('type' => 'string', 'location' => 'query'), 'userIp' => array('type' => 'string', 'location' => 'query'), 'quotaUser' => array('type' => 'string', 'location' => 'query'), 'data' => array('type' => 'string', 'location' => 'body'), 'mimeType' => array('type' => 'string', 'location' => 'header'), 'uploadType' => array('type' => 'string', 'location' => 'query'), 'mediaUpload' => array('type' => 'complex', 'location' => 'query'), 'prettyPrint' => array('type' => 'string', 'location' => 'query'))

Methods

__construct()

public __construct(mixed $service, mixed $serviceName, mixed $resourceName, mixed $resource) : mixed
Parameters
$service : mixed
$serviceName : mixed
$resourceName : mixed
$resource : mixed
Return values
mixed

call()

TODO: This function needs simplifying.

public call( $name,  $arguments[,  $expectedClass = null ]) : Google_Http_Request|expectedClass
Parameters
$name :
$arguments :
$expectedClass : = null
  • optional, the expected class name
Tags
throws
Google_Exception
Return values
Google_Http_Request|expectedClass

create()

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

public create(string $fileId, Google_Service_Drive_Permission $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Drive_Permission
Parameters
$fileId : string

The ID of the file or shared drive.

$postBody : Google_Service_Drive_Permission
$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string emailMessage A plain text custom message to include in the notification email.

opt_param

bool 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.

opt_param

bool 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.

opt_param

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.

opt_param

bool supportsAllDrives Whether the requesting application supports both My Drives and shared drives.

opt_param

bool supportsTeamDrives Deprecated use supportsAllDrives instead.

opt_param

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.

opt_param

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.

Return values
Google_Service_Drive_Permission

createRequestUri()

Parse/expand request parameters and create a fully qualified request uri.

public createRequestUri(string $restPath, array<string|int, mixed> $params) : string
Parameters
$restPath : string
$params : array<string|int, mixed>
Tags
static
Return values
string

$requestUrl

delete()

Deletes a permission. (permissions.delete)

public delete(string $fileId, string $permissionId[, array<string|int, mixed> $optParams = array() ]) : mixed
Parameters
$fileId : string

The ID of the file or shared drive.

$permissionId : string

The ID of the permission.

$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

bool supportsAllDrives Whether the requesting application supports both My Drives and shared drives.

opt_param

bool supportsTeamDrives Deprecated use supportsAllDrives instead.

opt_param

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.

Return values
mixed

get()

Gets a permission by ID. (permissions.get)

public get(string $fileId, string $permissionId[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Drive_Permission
Parameters
$fileId : string

The ID of the file.

$permissionId : string

The ID of the permission.

$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

bool supportsAllDrives Whether the requesting application supports both My Drives and shared drives.

opt_param

bool supportsTeamDrives Deprecated use supportsAllDrives instead.

opt_param

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.

Return values
Google_Service_Drive_Permission

listPermissions()

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

public listPermissions(string $fileId[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Drive_PermissionList
Parameters
$fileId : string

The ID of the file or shared drive.

$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string includePermissionsForView Specifies which additional view's permissions to include in the response. Only 'published' is supported.

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.

opt_param

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.

opt_param

bool supportsAllDrives Whether the requesting application supports both My Drives and shared drives.

opt_param

bool supportsTeamDrives Deprecated use supportsAllDrives instead.

opt_param

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.

Return values
Google_Service_Drive_PermissionList

update()

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

public update(string $fileId, string $permissionId, Google_Service_Drive_Permission $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Drive_Permission
Parameters
$fileId : string

The ID of the file or shared drive.

$permissionId : string

The ID of the permission.

$postBody : Google_Service_Drive_Permission
$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

bool removeExpiration Whether to remove the expiration date.

opt_param

bool supportsAllDrives Whether the requesting application supports both My Drives and shared drives.

opt_param

bool supportsTeamDrives Deprecated use supportsAllDrives instead.

opt_param

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.

opt_param

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.

Return values
Google_Service_Drive_Permission

convertToArrayAndStripNulls()

protected convertToArrayAndStripNulls(mixed $o) : mixed
Parameters
$o : mixed
Return values
mixed

Search results