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 Summary
-
Method Summary
Modifier and Type Method Description Value.BuilderaddPattern(String pattern)Adds an pattern to patterns.Value.BuilderaddSynonym(String synonym)Adds an synonym to synonyms.Valuebuild()Builds a Value.Value.Buildermetadata(Map<String,Object> metadata)Set the metadata.Value.Builderpatterns(List<String> patterns)Set the patterns.Value.Buildersynonyms(List<String> synonyms)Set the synonyms.Value.Buildertype(String type)Set the type.Value.Buildervalue(String value)Set the value.
-
Constructor Details
-
Builder
public Builder()Instantiates a new builder. -
Builder
Instantiates a new builder with required properties.- Parameters:
value- the valuetype- the type
-
-
Method Details
-
build
Builds a Value.- Returns:
- the new Value instance
-
addSynonym
Adds an synonym to synonyms.- Parameters:
synonym- the new synonym- Returns:
- the Value builder
-
addPattern
Adds an pattern to patterns.- Parameters:
pattern- the new pattern- Returns:
- the Value builder
-
value
Set the value.- Parameters:
value- the value- Returns:
- the Value builder
-
metadata
Set the metadata.- Parameters:
metadata- the metadata- Returns:
- the Value builder
-
type
Set the type.- Parameters:
type- the type- Returns:
- the Value builder
-
synonyms
Set the synonyms. Existing synonyms will be replaced.- Parameters:
synonyms- the synonyms- Returns:
- the Value builder
-
patterns
Set the patterns. Existing patterns will be replaced.- Parameters:
patterns- the patterns- Returns:
- the Value builder
-