public static class TranslateDocumentOptions.Builder extends Object
Constructor and Description |
---|
Builder()
Instantiates a new builder.
|
Builder(InputStream file,
String filename)
Instantiates a new builder with required properties.
|
Modifier and Type | Method and 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.
|
public Builder()
public Builder(InputStream file, String filename)
file
- the filefilename
- the filenamepublic TranslateDocumentOptions build()
public TranslateDocumentOptions.Builder file(InputStream file)
file
- the filepublic TranslateDocumentOptions.Builder filename(String filename)
filename
- the filenamepublic TranslateDocumentOptions.Builder fileContentType(String fileContentType)
fileContentType
- the fileContentTypepublic TranslateDocumentOptions.Builder modelId(String modelId)
modelId
- the modelIdpublic TranslateDocumentOptions.Builder source(String source)
source
- the sourcepublic TranslateDocumentOptions.Builder target(String target)
target
- the targetpublic TranslateDocumentOptions.Builder documentId(String documentId)
documentId
- the documentIdpublic TranslateDocumentOptions.Builder file(File file) throws FileNotFoundException
file
- the fileFileNotFoundException
- if the file could not be foundCopyright © 2021 IBM Cloud. All rights reserved.