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 TranslateDocumentOptionsbuild()Builds a TranslateDocumentOptions.TranslateDocumentOptions.BuilderdocumentId(String documentId)Set the documentId.TranslateDocumentOptions.Builderfile(File file)Set the file.TranslateDocumentOptions.Builderfile(InputStream file)Set the file.TranslateDocumentOptions.BuilderfileContentType(String fileContentType)Set the fileContentType.TranslateDocumentOptions.Builderfilename(String filename)Set the filename.TranslateDocumentOptions.BuildermodelId(String modelId)Set the modelId.TranslateDocumentOptions.Buildersource(String source)Set the source.TranslateDocumentOptions.Buildertarget(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
-