public class Drive.Files.Insert extends DriveRequest<File>
com.google.api.client.util.GenericData.Flags| Modifier | Constructor and Description |
|---|---|
protected |
Insert(File content)
Insert a new file.
|
protected |
Insert(File content,
com.google.api.client.http.AbstractInputStreamContent mediaContent)
Insert a new file.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Boolean |
getConvert()
Whether to convert this file to the corresponding Google Docs format.
|
java.lang.Boolean |
getEnforceSingleParent()
Set to true to opt in to API behavior that aims for all items to have exactly one parent.
|
java.lang.Boolean |
getOcr()
Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
|
java.lang.String |
getOcrLanguage()
If ocr is true, hints at the language to use.
|
java.lang.Boolean |
getPinned()
Whether to pin the head revision of the uploaded file.
|
java.lang.Boolean |
getSupportsAllDrives()
Deprecated - Whether the requesting application supports both My Drives and shared drives.
|
java.lang.Boolean |
getSupportsTeamDrives()
Deprecated use supportsAllDrives instead.
|
java.lang.String |
getTimedTextLanguage()
The language of the timed text.
|
java.lang.String |
getTimedTextTrackName()
The timed text track name.
|
java.lang.Boolean |
getUseContentAsIndexableText()
Whether to use the content as indexable text.
|
java.lang.String |
getVisibility()
The visibility of the new file.
|
boolean |
isConvert()
Convenience method that returns only
Boolean.TRUE or Boolean.FALSE. |
boolean |
isEnforceSingleParent()
Convenience method that returns only
Boolean.TRUE or Boolean.FALSE. |
boolean |
isOcr()
Convenience method that returns only
Boolean.TRUE or Boolean.FALSE. |
boolean |
isPinned()
Convenience method that returns only
Boolean.TRUE or Boolean.FALSE. |
boolean |
isSupportsAllDrives()
Convenience method that returns only
Boolean.TRUE or Boolean.FALSE. |
boolean |
isSupportsTeamDrives()
Convenience method that returns only
Boolean.TRUE or Boolean.FALSE. |
boolean |
isUseContentAsIndexableText()
Convenience method that returns only
Boolean.TRUE or Boolean.FALSE. |
Drive.Files.Insert |
set(java.lang.String parameterName,
java.lang.Object value) |
Drive.Files.Insert |
setAlt(java.lang.String alt)
Data format for the response.
|
Drive.Files.Insert |
setConvert(java.lang.Boolean convert)
Whether to convert this file to the corresponding Google Docs format.
|
Drive.Files.Insert |
setEnforceSingleParent(java.lang.Boolean enforceSingleParent)
Set to true to opt in to API behavior that aims for all items to have exactly one parent.
|
Drive.Files.Insert |
setFields(java.lang.String fields)
Selector specifying which fields to include in a partial response.
|
Drive.Files.Insert |
setKey(java.lang.String key)
API key.
|
Drive.Files.Insert |
setOauthToken(java.lang.String oauthToken)
OAuth 2.0 token for the current user.
|
Drive.Files.Insert |
setOcr(java.lang.Boolean ocr)
Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads.
|
Drive.Files.Insert |
setOcrLanguage(java.lang.String ocrLanguage)
If ocr is true, hints at the language to use.
|
Drive.Files.Insert |
setPinned(java.lang.Boolean pinned)
Whether to pin the head revision of the uploaded file.
|
Drive.Files.Insert |
setPrettyPrint(java.lang.Boolean prettyPrint)
Returns response with indentations and line breaks.
|
Drive.Files.Insert |
setQuotaUser(java.lang.String quotaUser)
An opaque string that represents a user for quota purposes.
|
Drive.Files.Insert |
setSupportsAllDrives(java.lang.Boolean supportsAllDrives)
Deprecated - Whether the requesting application supports both My Drives and shared drives.
|
Drive.Files.Insert |
setSupportsTeamDrives(java.lang.Boolean supportsTeamDrives)
Deprecated use supportsAllDrives instead.
|
Drive.Files.Insert |
setTimedTextLanguage(java.lang.String timedTextLanguage)
The language of the timed text.
|
Drive.Files.Insert |
setTimedTextTrackName(java.lang.String timedTextTrackName)
The timed text track name.
|
Drive.Files.Insert |
setUseContentAsIndexableText(java.lang.Boolean useContentAsIndexableText)
Whether to use the content as indexable text.
|
Drive.Files.Insert |
setUserIp(java.lang.String userIp)
Deprecated.
|
Drive.Files.Insert |
setVisibility(java.lang.String visibility)
The visibility of the new file.
|
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, setUnknownKeysclear, containsKey, containsValue, equals, hashCode, isEmpty, keySet, size, toString, valuesprotected Insert(File 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.
content - the Fileprotected Insert(File content, com.google.api.client.http.AbstractInputStreamContent mediaContent)
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.
This constructor should be used for uploading media content.
content - the File media metadata or null if nonemediaContent - The media HTTP content or null if none.public Drive.Files.Insert setAlt(java.lang.String alt)
DriveRequestsetAlt in class DriveRequest<File>public Drive.Files.Insert setFields(java.lang.String fields)
DriveRequestsetFields in class DriveRequest<File>public Drive.Files.Insert setKey(java.lang.String key)
DriveRequestsetKey in class DriveRequest<File>public Drive.Files.Insert setOauthToken(java.lang.String oauthToken)
DriveRequestsetOauthToken in class DriveRequest<File>public Drive.Files.Insert setPrettyPrint(java.lang.Boolean prettyPrint)
DriveRequestsetPrettyPrint in class DriveRequest<File>public Drive.Files.Insert setQuotaUser(java.lang.String quotaUser)
DriveRequestsetQuotaUser in class DriveRequest<File>public Drive.Files.Insert setUserIp(java.lang.String userIp)
DriveRequestsetUserIp in class DriveRequest<File>public java.lang.Boolean getConvert()
public Drive.Files.Insert setConvert(java.lang.Boolean convert)
public boolean isConvert()
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 convert this file to the corresponding Google Docs format.
public java.lang.Boolean getEnforceSingleParent()
public Drive.Files.Insert setEnforceSingleParent(java.lang.Boolean enforceSingleParent)
public boolean isEnforceSingleParent()
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.
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. Requests that specify more than one parent will fail.
public java.lang.Boolean getOcr()
public Drive.Files.Insert setOcr(java.lang.Boolean ocr)
public boolean isOcr()
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 attempt OCR on .jpg, .png, .gif, or .pdf uploads.
public java.lang.String getOcrLanguage()
public Drive.Files.Insert setOcrLanguage(java.lang.String ocrLanguage)
public java.lang.Boolean getPinned()
public Drive.Files.Insert setPinned(java.lang.Boolean pinned)
public boolean isPinned()
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 pin the head revision of the uploaded file. A file can have a maximum of 200 pinned revisions.
public java.lang.Boolean getSupportsAllDrives()
public Drive.Files.Insert setSupportsAllDrives(java.lang.Boolean supportsAllDrives)
public boolean isSupportsAllDrives()
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.
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.
public java.lang.Boolean getSupportsTeamDrives()
public Drive.Files.Insert setSupportsTeamDrives(java.lang.Boolean supportsTeamDrives)
public boolean isSupportsTeamDrives()
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.
Deprecated use supportsAllDrives instead.
public java.lang.String getTimedTextLanguage()
public Drive.Files.Insert setTimedTextLanguage(java.lang.String timedTextLanguage)
public java.lang.String getTimedTextTrackName()
public Drive.Files.Insert setTimedTextTrackName(java.lang.String timedTextTrackName)
public java.lang.Boolean getUseContentAsIndexableText()
public Drive.Files.Insert setUseContentAsIndexableText(java.lang.Boolean useContentAsIndexableText)
public boolean isUseContentAsIndexableText()
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 use the content as indexable text.
public java.lang.String getVisibility()
public Drive.Files.Insert setVisibility(java.lang.String visibility)
public Drive.Files.Insert set(java.lang.String parameterName, java.lang.Object value)
set in class DriveRequest<File>