Class RuntimeEntity.Builder

java.lang.Object
com.ibm.watson.assistant.v2.model.RuntimeEntity.Builder
Enclosing class:
RuntimeEntity

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

    • Builder

      public Builder()
      Instantiates a new builder.
    • Builder

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

    • build

      public RuntimeEntity build()
      Builds a RuntimeEntity.
      Returns:
      the new RuntimeEntity instance
    • addLocation

      public RuntimeEntity.Builder addLocation​(Long location)
      Adds an location to location.
      Parameters:
      location - the new location
      Returns:
      the RuntimeEntity builder
    • addGroups

      public RuntimeEntity.Builder addGroups​(CaptureGroup groups)
      Adds an groups to groups.
      Parameters:
      groups - the new groups
      Returns:
      the RuntimeEntity builder
    • addAlternatives

      public RuntimeEntity.Builder addAlternatives​(RuntimeEntityAlternative alternatives)
      Adds an alternatives to alternatives.
      Parameters:
      alternatives - the new alternatives
      Returns:
      the RuntimeEntity builder
    • entity

      public RuntimeEntity.Builder entity​(String entity)
      Set the entity.
      Parameters:
      entity - the entity
      Returns:
      the RuntimeEntity builder
    • location

      public RuntimeEntity.Builder location​(List<Long> location)
      Set the location. Existing location will be replaced.
      Parameters:
      location - the location
      Returns:
      the RuntimeEntity builder
    • value

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

      public RuntimeEntity.Builder confidence​(Double confidence)
      Set the confidence.
      Parameters:
      confidence - the confidence
      Returns:
      the RuntimeEntity builder
    • metadata

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

      public RuntimeEntity.Builder groups​(List<CaptureGroup> groups)
      Set the groups. Existing groups will be replaced.
      Parameters:
      groups - the groups
      Returns:
      the RuntimeEntity builder
    • interpretation

      public RuntimeEntity.Builder interpretation​(RuntimeEntityInterpretation interpretation)
      Set the interpretation.
      Parameters:
      interpretation - the interpretation
      Returns:
      the RuntimeEntity builder
    • alternatives

      public RuntimeEntity.Builder alternatives​(List<RuntimeEntityAlternative> alternatives)
      Set the alternatives. Existing alternatives will be replaced.
      Parameters:
      alternatives - the alternatives
      Returns:
      the RuntimeEntity builder
    • role

      Set the role.
      Parameters:
      role - the role
      Returns:
      the RuntimeEntity builder