Class CreateValue.Builder

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

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

    • Builder

      public Builder()
      Instantiates a new builder.
    • Builder

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

    • build

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

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

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

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

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

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

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

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