public class Drive.Permissions.Create extends DriveRequest<Permission>
com.google.api.client.util.GenericData.Flags| Modifier | Constructor and Description |
|---|---|
protected |
Drive.Permissions.Create(java.lang.String fileId,
Permission content)
Creates a permission for a file.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getEmailMessage()
A custom message to include in the notification email.
|
java.lang.String |
getFileId()
The ID of the file.
|
java.lang.Boolean |
getSendNotificationEmail()
Whether to send a notification email when sharing to users or groups.
|
java.lang.Boolean |
getTransferOwnership()
Whether to transfer ownership to the specified user and downgrade the current owner to a writer.
|
boolean |
isTransferOwnership()
Convenience method that returns only
Boolean.TRUE or Boolean.FALSE. |
Drive.Permissions.Create |
set(java.lang.String parameterName,
java.lang.Object value) |
Drive.Permissions.Create |
setAlt(java.lang.String alt)
Data format for the response.
|
Drive.Permissions.Create |
setEmailMessage(java.lang.String emailMessage)
A custom message to include in the notification email.
|
Drive.Permissions.Create |
setFields(java.lang.String fields)
Selector specifying which fields to include in a partial response.
|
Drive.Permissions.Create |
setFileId(java.lang.String fileId)
The ID of the file.
|
Drive.Permissions.Create |
setKey(java.lang.String key)
API key.
|
Drive.Permissions.Create |
setOauthToken(java.lang.String oauthToken)
OAuth 2.0 token for the current user.
|
Drive.Permissions.Create |
setPrettyPrint(java.lang.Boolean prettyPrint)
Returns response with indentations and line breaks.
|
Drive.Permissions.Create |
setQuotaUser(java.lang.String quotaUser)
Available to use for quota purposes for server-side applications.
|
Drive.Permissions.Create |
setSendNotificationEmail(java.lang.Boolean sendNotificationEmail)
Whether to send a notification email when sharing to users or groups.
|
Drive.Permissions.Create |
setTransferOwnership(java.lang.Boolean transferOwnership)
Whether to transfer ownership to the specified user and downgrade the current owner to a
writer.
|
Drive.Permissions.Create |
setUserIp(java.lang.String userIp)
IP address of the site where the request originates.
|
getAbstractGoogleClient, getAlt, getFields, getKey, getOauthToken, getPrettyPrint, getQuotaUser, getUserIp, setDisableGZipContent, setRequestHeadersgetJsonContent, newExceptionOnError, queuebuildHttpRequest, buildHttpRequestUrl, buildHttpRequestUsingHead, checkRequiredParameter, execute, executeAndDownloadTo, executeAsInputStream, executeMedia, executeMediaAndDownloadTo, executeMediaAsInputStream, executeUnparsed, executeUsingHead, getDisableGZipContent, getHttpContent, getLastResponseHeaders, getLastStatusCode, getLastStatusMessage, getMediaHttpDownloader, getMediaHttpUploader, getRequestHeaders, getRequestMethod, getResponseClass, getUriTemplate, initializeMediaDownload, initializeMediaUpload, queueclone, entrySet, get, getClassInfo, getUnknownKeys, put, putAll, remove, setUnknownKeysprotected Drive.Permissions.Create(java.lang.String fileId,
Permission content)
AbstractGoogleClientRequest.execute() method to invoke the remote operation. Drive.initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest) must
be called to initialize this instance immediately after invoking the constructor.
fileId - The ID of the file.content - the Permissionpublic Drive.Permissions.Create setAlt(java.lang.String alt)
DriveRequestsetAlt in class DriveRequest<Permission>public Drive.Permissions.Create setFields(java.lang.String fields)
DriveRequestsetFields in class DriveRequest<Permission>public Drive.Permissions.Create setKey(java.lang.String key)
DriveRequestsetKey in class DriveRequest<Permission>public Drive.Permissions.Create setOauthToken(java.lang.String oauthToken)
DriveRequestsetOauthToken in class DriveRequest<Permission>public Drive.Permissions.Create setPrettyPrint(java.lang.Boolean prettyPrint)
DriveRequestsetPrettyPrint in class DriveRequest<Permission>public Drive.Permissions.Create setQuotaUser(java.lang.String quotaUser)
DriveRequestsetQuotaUser in class DriveRequest<Permission>public Drive.Permissions.Create setUserIp(java.lang.String userIp)
DriveRequestsetUserIp in class DriveRequest<Permission>public java.lang.String getFileId()
public Drive.Permissions.Create setFileId(java.lang.String fileId)
public java.lang.String getEmailMessage()
public Drive.Permissions.Create setEmailMessage(java.lang.String emailMessage)
public java.lang.Boolean getSendNotificationEmail()
public Drive.Permissions.Create setSendNotificationEmail(java.lang.Boolean sendNotificationEmail)
public java.lang.Boolean getTransferOwnership()
public Drive.Permissions.Create setTransferOwnership(java.lang.Boolean transferOwnership)
public boolean isTransferOwnership()
Boolean.TRUE or Boolean.FALSE.
Boolean properties can have four possible values:
null, Data.NULL_BOOLEAN, Boolean.TRUE
or Boolean.FALSE.
This method returns Boolean.TRUE if the default of the property is Boolean.TRUE
and it is null or Data.NULL_BOOLEAN.
Boolean.FALSE is returned if the default of the property is Boolean.FALSE and
it is null or Data.NULL_BOOLEAN.
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 Drive.Permissions.Create set(java.lang.String parameterName, java.lang.Object value)
set in class DriveRequest<Permission>