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.Builder
addPattern(String pattern)
Adds an pattern to patterns.Value.Builder
addSynonym(String synonym)
Adds an synonym to synonyms.Value
build()
Builds a Value.Value.Builder
metadata(Map<String,Object> metadata)
Set the metadata.Value.Builder
patterns(List<String> patterns)
Set the patterns.Value.Builder
synonyms(List<String> synonyms)
Set the synonyms.Value.Builder
type(String type)
Set the type.Value.Builder
value(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
-