Class Value.Builder

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

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

    • Builder

      public Builder()
      Instantiates a new builder.
    • Builder

      public Builder​(String value, String type)
      Instantiates a new builder with required properties.
      Parameters:
      value - the value
      type - the type
  • Method Details

    • build

      public Value build()
      Builds a Value.
      Returns:
      the new Value instance
    • addSynonym

      public Value.Builder addSynonym​(String synonym)
      Adds an synonym to synonyms.
      Parameters:
      synonym - the new synonym
      Returns:
      the Value builder
    • addPattern

      public Value.Builder addPattern​(String pattern)
      Adds an pattern to patterns.
      Parameters:
      pattern - the new pattern
      Returns:
      the Value builder
    • value

      public Value.Builder value​(String value)
      Set the value.
      Parameters:
      value - the value
      Returns:
      the Value builder
    • metadata

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

      public Value.Builder type​(String type)
      Set the type.
      Parameters:
      type - the type
      Returns:
      the Value builder
    • synonyms

      public Value.Builder synonyms​(List<String> synonyms)
      Set the synonyms. Existing synonyms will be replaced.
      Parameters:
      synonyms - the synonyms
      Returns:
      the Value builder
    • patterns

      public Value.Builder patterns​(List<String> patterns)
      Set the patterns. Existing patterns will be replaced.
      Parameters:
      patterns - the patterns
      Returns:
      the Value builder