Class TranslateDocumentOptions.Builder
java.lang.Object
com.ibm.watson.language_translator.v3.model.TranslateDocumentOptions.Builder
- Enclosing class:
- TranslateDocumentOptions
public static class TranslateDocumentOptions.Builder extends Object
Builder.
-
Constructor Summary
Constructors Constructor Description Builder()
Instantiates a new builder.Builder(InputStream file, String filename)
Instantiates a new builder with required properties. -
Method Summary
Modifier and Type Method Description TranslateDocumentOptions
build()
Builds a TranslateDocumentOptions.TranslateDocumentOptions.Builder
documentId(String documentId)
Set the documentId.TranslateDocumentOptions.Builder
file(File file)
Set the file.TranslateDocumentOptions.Builder
file(InputStream file)
Set the file.TranslateDocumentOptions.Builder
fileContentType(String fileContentType)
Set the fileContentType.TranslateDocumentOptions.Builder
filename(String filename)
Set the filename.TranslateDocumentOptions.Builder
modelId(String modelId)
Set the modelId.TranslateDocumentOptions.Builder
source(String source)
Set the source.TranslateDocumentOptions.Builder
target(String target)
Set the target.
-
Constructor Details
-
Builder
public Builder()Instantiates a new builder. -
Builder
Instantiates a new builder with required properties.- Parameters:
file
- the filefilename
- the filename
-
-
Method Details
-
build
Builds a TranslateDocumentOptions.- Returns:
- the new TranslateDocumentOptions instance
-
file
Set the file.- Parameters:
file
- the file- Returns:
- the TranslateDocumentOptions builder
-
filename
Set the filename.- Parameters:
filename
- the filename- Returns:
- the TranslateDocumentOptions builder
-
fileContentType
Set the fileContentType.- Parameters:
fileContentType
- the fileContentType- Returns:
- the TranslateDocumentOptions builder
-
modelId
Set the modelId.- Parameters:
modelId
- the modelId- Returns:
- the TranslateDocumentOptions builder
-
source
Set the source.- Parameters:
source
- the source- Returns:
- the TranslateDocumentOptions builder
-
target
Set the target.- Parameters:
target
- the target- Returns:
- the TranslateDocumentOptions builder
-
documentId
Set the documentId.- Parameters:
documentId
- the documentId- Returns:
- the TranslateDocumentOptions builder
-
file
Set the file.- Parameters:
file
- the file- Returns:
- the TranslateDocumentOptions builder
- Throws:
FileNotFoundException
- if the file could not be found
-