Class UploadParameters
- java.lang.Object
-
- org.springframework.social.google.api.drive.UploadParameters
-
public class UploadParameters extends Object
Builder for parameters to be used in file upload- Author:
- Gabriel Axel
-
-
Constructor Summary
Constructors Constructor Description UploadParameters()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UploadParameterssetConvert(boolean convert)UploadParameterssetOcr(boolean ocr)UploadParameterssetOcrLanguage(String ocrLanguage)UploadParameterssetPinned(boolean pinned)UploadParameterssetSourceLanguage(String sourceLanguage)UploadParameterssetTargetLanguage(String targetLanguage)UploadParameterssetTimedTextLanguage(String timedTextLanguage)UploadParameterssetTimedTextTrackName(String timedTextTrackName)StringtoString()Returns a string representation of the true and non-null parameters to be used in the query string
-
-
-
Method Detail
-
toString
public String toString()
Returns a string representation of the true and non-null parameters to be used in the query string
-
setConvert
public UploadParameters setConvert(boolean convert)
- Parameters:
convert- Whether to convert this file to the corresponding Google Docs format. (Default: false)- Returns:
- the
UploadParametersinstance
-
setOcr
public UploadParameters setOcr(boolean ocr)
- Parameters:
ocr- Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. (Default: false)- Returns:
- the
UploadParametersinstance
-
setOcrLanguage
public UploadParameters setOcrLanguage(String ocrLanguage)
- Parameters:
ocrLanguage- If ocr is true, hints at the language to use. Valid values are ISO 639-1 codes.- Returns:
- the
UploadParametersinstance
-
setPinned
public UploadParameters setPinned(boolean pinned)
- Parameters:
pinned- Whether to pin the head revision of the uploaded file. (Default: false)- Returns:
- the
UploadParametersinstance
-
setSourceLanguage
public UploadParameters setSourceLanguage(String sourceLanguage)
- Parameters:
sourceLanguage- The language of the original file to be translated.- Returns:
- the
UploadParametersinstance
-
setTargetLanguage
public UploadParameters setTargetLanguage(String targetLanguage)
- Parameters:
targetLanguage- Target language to translate the file to. If no sourceLanguage is provided, the API will attempt to detect the language.- Returns:
- the
UploadParametersinstance
-
setTimedTextLanguage
public UploadParameters setTimedTextLanguage(String timedTextLanguage)
- Parameters:
timedTextLanguage- The language of the timed text.- Returns:
- the
UploadParametersinstance
-
setTimedTextTrackName
public UploadParameters setTimedTextTrackName(String timedTextTrackName)
- Parameters:
timedTextTrackName- The timed text track name.- Returns:
- the
UploadParametersinstance
-
-