Class ToneOptions.Builder
java.lang.Object
com.ibm.watson.tone_analyzer.v3.model.ToneOptions.Builder
- Enclosing class:
- ToneOptions
public static class ToneOptions.Builder extends Object
Builder.
-
Constructor Summary
Constructors Constructor Description Builder()Instantiates a new builder. -
Method Summary
Modifier and Type Method Description ToneOptions.BuilderacceptLanguage(String acceptLanguage)Set the acceptLanguage.ToneOptions.BuilderaddTone(String tone)Adds an tone to tones.ToneOptionsbuild()Builds a ToneOptions.ToneOptions.BuildercontentLanguage(String contentLanguage)Set the contentLanguage.ToneOptions.Builderhtml(String html)Set the html.ToneOptions.Buildersentences(Boolean sentences)Set the sentences.ToneOptions.Buildertext(String text)Set the text.ToneOptions.BuildertoneInput(ToneInput toneInput)Set the toneInput.ToneOptions.Buildertones(List<String> tones)Set the tones.
-
Constructor Details
-
Builder
public Builder()Instantiates a new builder.
-
-
Method Details
-
build
Builds a ToneOptions.- Returns:
- the new ToneOptions instance
-
addTone
Adds an tone to tones.- Parameters:
tone- the new tone- Returns:
- the ToneOptions builder
-
sentences
Set the sentences.- Parameters:
sentences- the sentences- Returns:
- the ToneOptions builder
-
tones
Set the tones. Existing tones will be replaced.- Parameters:
tones- the tones- Returns:
- the ToneOptions builder
-
contentLanguage
Set the contentLanguage.- Parameters:
contentLanguage- the contentLanguage- Returns:
- the ToneOptions builder
-
acceptLanguage
Set the acceptLanguage.- Parameters:
acceptLanguage- the acceptLanguage- Returns:
- the ToneOptions builder
-
toneInput
Set the toneInput.- Parameters:
toneInput- the toneInput- Returns:
- the ToneOptions builder
-
text
Set the text.- Parameters:
text- the text- Returns:
- the ToneOptions builder
-
html
Set the html.- Parameters:
html- the html- Returns:
- the ToneOptions builder
-