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.Builder
addText(String text)
Adds an text to text.TranslateOptions
build()
Builds a TranslateOptions.TranslateOptions.Builder
modelId(String modelId)
Set the modelId.TranslateOptions.Builder
source(String source)
Set the source.TranslateOptions.Builder
target(String target)
Set the target.TranslateOptions.Builder
text(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
-