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 Details

    • Builder

      public Builder()
      Instantiates a new builder.
  • Method Details

    • build

      public ToneOptions build()
      Builds a ToneOptions.
      Returns:
      the new ToneOptions instance
    • addTone

      public ToneOptions.Builder addTone​(String tone)
      Adds an tone to tones.
      Parameters:
      tone - the new tone
      Returns:
      the ToneOptions builder
    • sentences

      public ToneOptions.Builder sentences​(Boolean sentences)
      Set the sentences.
      Parameters:
      sentences - the sentences
      Returns:
      the ToneOptions builder
    • tones

      public ToneOptions.Builder tones​(List<String> tones)
      Set the tones. Existing tones will be replaced.
      Parameters:
      tones - the tones
      Returns:
      the ToneOptions builder
    • contentLanguage

      public ToneOptions.Builder contentLanguage​(String contentLanguage)
      Set the contentLanguage.
      Parameters:
      contentLanguage - the contentLanguage
      Returns:
      the ToneOptions builder
    • acceptLanguage

      public ToneOptions.Builder acceptLanguage​(String acceptLanguage)
      Set the acceptLanguage.
      Parameters:
      acceptLanguage - the acceptLanguage
      Returns:
      the ToneOptions builder
    • toneInput

      public ToneOptions.Builder toneInput​(ToneInput toneInput)
      Set the toneInput.
      Parameters:
      toneInput - the toneInput
      Returns:
      the ToneOptions builder
    • text

      public ToneOptions.Builder text​(String text)
      Set the text.
      Parameters:
      text - the text
      Returns:
      the ToneOptions builder
    • html

      public ToneOptions.Builder html​(String html)
      Set the html.
      Parameters:
      html - the html
      Returns:
      the ToneOptions builder