Class UploadParameters


  • public class UploadParameters
    extends Object
    Builder for parameters to be used in file upload
    Author:
    Gabriel Axel
    • Constructor Detail

      • UploadParameters

        public UploadParameters()
    • Method Detail

      • toString

        public String toString()
        Returns a string representation of the true and non-null parameters to be used in the query string
        Overrides:
        toString in class Object
      • setConvert

        public UploadParameters setConvert​(boolean convert)
        Parameters:
        convert - Whether to convert this file to the corresponding Google Docs format. (Default: false)
        Returns:
        the UploadParameters instance
      • setOcr

        public UploadParameters setOcr​(boolean ocr)
        Parameters:
        ocr - Whether to attempt OCR on .jpg, .png, .gif, or .pdf uploads. (Default: false)
        Returns:
        the UploadParameters instance
      • 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 UploadParameters instance
      • setPinned

        public UploadParameters setPinned​(boolean pinned)
        Parameters:
        pinned - Whether to pin the head revision of the uploaded file. (Default: false)
        Returns:
        the UploadParameters instance
      • setSourceLanguage

        public UploadParameters setSourceLanguage​(String sourceLanguage)
        Parameters:
        sourceLanguage - The language of the original file to be translated.
        Returns:
        the UploadParameters instance
      • 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 UploadParameters instance
      • setTimedTextLanguage

        public UploadParameters setTimedTextLanguage​(String timedTextLanguage)
        Parameters:
        timedTextLanguage - The language of the timed text.
        Returns:
        the UploadParameters instance
      • setTimedTextTrackName

        public UploadParameters setTimedTextTrackName​(String timedTextTrackName)
        Parameters:
        timedTextTrackName - The timed text track name.
        Returns:
        the UploadParameters instance