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 Summary
Constructors Constructor Description Builder()
Instantiates a new builder. -
Method Summary
Modifier and Type Method Description MessageRequest.Builder
addEntity(RuntimeEntity entity)
Adds an entity to entities.MessageRequest.Builder
addIntent(RuntimeIntent intent)
Adds an intent to intents.MessageRequest.Builder
alternateIntents(Boolean alternateIntents)
Set the alternateIntents.MessageRequest
build()
Builds a MessageRequest.MessageRequest.Builder
context(Context context)
Set the context.MessageRequest.Builder
entities(List<RuntimeEntity> entities)
Set the entities.MessageRequest.Builder
input(MessageInput input)
Set the input.MessageRequest.Builder
intents(List<RuntimeIntent> intents)
Set the intents.MessageRequest.Builder
output(OutputData output)
Set the output.MessageRequest.Builder
userId(String userId)
Set the userId.
-
Constructor Details
-
Builder
public Builder()Instantiates a new builder.
-
-
Method Details
-
build
Builds a MessageRequest.- Returns:
- the new MessageRequest instance
-
addIntent
Adds an intent to intents.- Parameters:
intent
- the new intent- Returns:
- the MessageRequest builder
-
addEntity
Adds an entity to entities.- Parameters:
entity
- the new entity- Returns:
- the MessageRequest builder
-
input
Set the input.- Parameters:
input
- the input- Returns:
- the MessageRequest builder
-
intents
Set the intents. Existing intents will be replaced.- Parameters:
intents
- the intents- Returns:
- the MessageRequest builder
-
entities
Set the entities. Existing entities will be replaced.- Parameters:
entities
- the entities- Returns:
- the MessageRequest builder
-
alternateIntents
Set the alternateIntents.- Parameters:
alternateIntents
- the alternateIntents- Returns:
- the MessageRequest builder
-
context
Set the context.- Parameters:
context
- the context- Returns:
- the MessageRequest builder
-
output
Set the output.- Parameters:
output
- the output- Returns:
- the MessageRequest builder
-
userId
Set the userId.- Parameters:
userId
- the userId- Returns:
- the MessageRequest builder
-