Class MessageInput

java.lang.Object
com.ibm.cloud.sdk.core.service.model.DynamicModel<Object>
com.ibm.watson.assistant.v1.model.MessageInput
All Implemented Interfaces:
com.ibm.cloud.sdk.core.service.model.ObjectModel

public class MessageInput
extends com.ibm.cloud.sdk.core.service.model.DynamicModel<Object>
An input object that includes the input text.
  • Constructor Details

    • MessageInput

      public MessageInput()
  • Method Details

    • newBuilder

      public MessageInput.Builder newBuilder()
      New builder.
      Returns:
      a MessageInput builder
    • getText

      public String getText()
      Gets the text.

      The text of the user input. This string cannot contain carriage return, newline, or tab characters.

      Returns:
      the text
    • setText

      public void setText​(String text)
      Sets the text.
      Parameters:
      text - the new text
    • isSpellingSuggestions

      public Boolean isSpellingSuggestions()
      Gets the spellingSuggestions.

      Whether to use spelling correction when processing the input. This property overrides the value of the **spelling_suggestions** property in the workspace settings.

      Returns:
      the spellingSuggestions
    • setSpellingSuggestions

      public void setSpellingSuggestions​(Boolean spellingSuggestions)
      Sets the spellingSuggestions.
      Parameters:
      spellingSuggestions - the new spellingSuggestions
    • isSpellingAutoCorrect

      public Boolean isSpellingAutoCorrect()
      Gets the spellingAutoCorrect.

      Whether to use autocorrection when processing the input. If spelling correction is used and this property is `false`, any suggested corrections are returned in the **suggested_text** property of the message response. If this property is `true`, any corrections are automatically applied to the user input, and the original text is returned in the **original_text** property of the message response. This property overrides the value of the **spelling_auto_correct** property in the workspace settings.

      Returns:
      the spellingAutoCorrect
    • setSpellingAutoCorrect

      public void setSpellingAutoCorrect​(Boolean spellingAutoCorrect)
      Sets the spellingAutoCorrect.
      Parameters:
      spellingAutoCorrect - the new spellingAutoCorrect
    • getSuggestedText

      public String getSuggestedText()
      Gets the suggestedText.

      Any suggested corrections of the input text. This property is returned only if spelling correction is enabled and autocorrection is disabled.

      Returns:
      the suggestedText
    • getOriginalText

      public String getOriginalText()
      Gets the originalText.

      The original user input text. This property is returned only if autocorrection is enabled and the user input was corrected.

      Returns:
      the originalText