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 Details

    • Builder

      public Builder()
      Instantiates a new builder.
    • Builder

      public Builder​(List<String> text)
      Instantiates a new builder with required properties.
      Parameters:
      text - the text
  • Method Details

    • build

      public TranslateOptions build()
      Builds a TranslateOptions.
      Returns:
      the new TranslateOptions instance
    • addText

      public TranslateOptions.Builder addText​(String text)
      Adds an text to text.
      Parameters:
      text - the new text
      Returns:
      the TranslateOptions builder
    • text

      public TranslateOptions.Builder text​(List<String> text)
      Set the text. Existing text will be replaced.
      Parameters:
      text - the text
      Returns:
      the TranslateOptions builder
    • modelId

      public TranslateOptions.Builder modelId​(String modelId)
      Set the modelId.
      Parameters:
      modelId - the modelId
      Returns:
      the TranslateOptions builder
    • source

      public TranslateOptions.Builder source​(String source)
      Set the source.
      Parameters:
      source - the source
      Returns:
      the TranslateOptions builder
    • target

      public TranslateOptions.Builder target​(String target)
      Set the target.
      Parameters:
      target - the target
      Returns:
      the TranslateOptions builder