Class TrainingQuery.Builder

java.lang.Object
com.ibm.watson.discovery.v2.model.TrainingQuery.Builder
Enclosing class:
TrainingQuery

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

    • Builder

      public Builder()
      Instantiates a new builder.
    • Builder

      public Builder​(String naturalLanguageQuery, List<TrainingExample> examples)
      Instantiates a new builder with required properties.
      Parameters:
      naturalLanguageQuery - the naturalLanguageQuery
      examples - the examples
  • Method Details

    • build

      public TrainingQuery build()
      Builds a TrainingQuery.
      Returns:
      the new TrainingQuery instance
    • addExamples

      public TrainingQuery.Builder addExamples​(TrainingExample examples)
      Adds an examples to examples.
      Parameters:
      examples - the new examples
      Returns:
      the TrainingQuery builder
    • naturalLanguageQuery

      public TrainingQuery.Builder naturalLanguageQuery​(String naturalLanguageQuery)
      Set the naturalLanguageQuery.
      Parameters:
      naturalLanguageQuery - the naturalLanguageQuery
      Returns:
      the TrainingQuery builder
    • filter

      public TrainingQuery.Builder filter​(String filter)
      Set the filter.
      Parameters:
      filter - the filter
      Returns:
      the TrainingQuery builder
    • examples

      public TrainingQuery.Builder examples​(List<TrainingExample> examples)
      Set the examples. Existing examples will be replaced.
      Parameters:
      examples - the examples
      Returns:
      the TrainingQuery builder