Class Context.Builder

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

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

    • Builder

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

    • build

      public Context build()
      Builds a Context.
      Returns:
      the new Context instance
    • conversationId

      public Context.Builder conversationId​(String conversationId)
      Set the conversationId.
      Parameters:
      conversationId - the conversationId
      Returns:
      the Context builder
    • system

      public Context.Builder system​(Map<String,​Object> system)
      Set the system.
      Parameters:
      system - the system
      Returns:
      the Context builder
    • metadata

      public Context.Builder metadata​(MessageContextMetadata metadata)
      Set the metadata.
      Parameters:
      metadata - the metadata
      Returns:
      the Context builder
    • add

      public Context.Builder add​(String name, Object value)
      Add an arbitrary property.
      Parameters:
      name - the name of the property to add
      value - the value of the property to add
      Returns:
      the Context builder