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 Summary
Constructors Constructor Description Builder()
Instantiates a new builder.Builder(String naturalLanguageQuery, List<TrainingExample> examples)
Instantiates a new builder with required properties. -
Method Summary
Modifier and Type Method Description TrainingQuery.Builder
addExamples(TrainingExample examples)
Adds an examples to examples.TrainingQuery
build()
Builds a TrainingQuery.TrainingQuery.Builder
examples(List<TrainingExample> examples)
Set the examples.TrainingQuery.Builder
filter(String filter)
Set the filter.TrainingQuery.Builder
naturalLanguageQuery(String naturalLanguageQuery)
Set the naturalLanguageQuery.
-
Constructor Details
-
Builder
public Builder()Instantiates a new builder. -
Builder
Instantiates a new builder with required properties.- Parameters:
naturalLanguageQuery
- the naturalLanguageQueryexamples
- the examples
-
-
Method Details
-
build
Builds a TrainingQuery.- Returns:
- the new TrainingQuery instance
-
addExamples
Adds an examples to examples.- Parameters:
examples
- the new examples- Returns:
- the TrainingQuery builder
-
naturalLanguageQuery
Set the naturalLanguageQuery.- Parameters:
naturalLanguageQuery
- the naturalLanguageQuery- Returns:
- the TrainingQuery builder
-
filter
Set the filter.- Parameters:
filter
- the filter- Returns:
- the TrainingQuery builder
-
examples
Set the examples. Existing examples will be replaced.- Parameters:
examples
- the examples- Returns:
- the TrainingQuery builder
-