Class TranslateOptions.Builder
java.lang.Object
com.ibm.watson.language_translator.v3.model.TranslateOptions.Builder
- Enclosing class:
- TranslateOptions
public static class TranslateOptions.Builder extends Object
Builder.
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description TranslateOptions.BuilderaddText(String text)Adds an text to text.TranslateOptionsbuild()Builds a TranslateOptions.TranslateOptions.BuildermodelId(String modelId)Set the modelId.TranslateOptions.Buildersource(String source)Set the source.TranslateOptions.Buildertarget(String target)Set the target.TranslateOptions.Buildertext(List<String> text)Set the text.
-
Constructor Details
-
Builder
public Builder()Instantiates a new builder. -
Builder
Instantiates a new builder with required properties.- Parameters:
text- the text
-
-
Method Details
-
build
Builds a TranslateOptions.- Returns:
- the new TranslateOptions instance
-
addText
Adds an text to text.- Parameters:
text- the new text- Returns:
- the TranslateOptions builder
-
text
Set the text. Existing text will be replaced.- Parameters:
text- the text- Returns:
- the TranslateOptions builder
-
modelId
Set the modelId.- Parameters:
modelId- the modelId- Returns:
- the TranslateOptions builder
-
source
Set the source.- Parameters:
source- the source- Returns:
- the TranslateOptions builder
-
target
Set the target.- Parameters:
target- the target- Returns:
- the TranslateOptions builder
-