Class MessageRequest.Builder

java.lang.Object
com.ibm.watson.assistant.v1.model.MessageRequest.Builder
Enclosing class:
MessageRequest

public static class MessageRequest.Builder
extends Object
Builder.
  • Constructor Details

    • Builder

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

    • build

      public MessageRequest build()
      Builds a MessageRequest.
      Returns:
      the new MessageRequest instance
    • addIntent

      public MessageRequest.Builder addIntent​(RuntimeIntent intent)
      Adds an intent to intents.
      Parameters:
      intent - the new intent
      Returns:
      the MessageRequest builder
    • addEntity

      public MessageRequest.Builder addEntity​(RuntimeEntity entity)
      Adds an entity to entities.
      Parameters:
      entity - the new entity
      Returns:
      the MessageRequest builder
    • input

      public MessageRequest.Builder input​(MessageInput input)
      Set the input.
      Parameters:
      input - the input
      Returns:
      the MessageRequest builder
    • intents

      public MessageRequest.Builder intents​(List<RuntimeIntent> intents)
      Set the intents. Existing intents will be replaced.
      Parameters:
      intents - the intents
      Returns:
      the MessageRequest builder
    • entities

      public MessageRequest.Builder entities​(List<RuntimeEntity> entities)
      Set the entities. Existing entities will be replaced.
      Parameters:
      entities - the entities
      Returns:
      the MessageRequest builder
    • alternateIntents

      public MessageRequest.Builder alternateIntents​(Boolean alternateIntents)
      Set the alternateIntents.
      Parameters:
      alternateIntents - the alternateIntents
      Returns:
      the MessageRequest builder
    • context

      public MessageRequest.Builder context​(Context context)
      Set the context.
      Parameters:
      context - the context
      Returns:
      the MessageRequest builder
    • output

      public MessageRequest.Builder output​(OutputData output)
      Set the output.
      Parameters:
      output - the output
      Returns:
      the MessageRequest builder
    • userId

      public MessageRequest.Builder userId​(String userId)
      Set the userId.
      Parameters:
      userId - the userId
      Returns:
      the MessageRequest builder