Class CreateValue.Builder
java.lang.Object
com.ibm.watson.assistant.v1.model.CreateValue.Builder
- Enclosing class:
- CreateValue
public static class CreateValue.Builder extends Object
Builder.
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description CreateValue.Builder
addPattern(String pattern)
Adds an pattern to patterns.CreateValue.Builder
addSynonym(String synonym)
Adds an synonym to synonyms.CreateValue
build()
Builds a CreateValue.CreateValue.Builder
metadata(Map<String,Object> metadata)
Set the metadata.CreateValue.Builder
patterns(List<String> patterns)
Set the patterns.CreateValue.Builder
synonyms(List<String> synonyms)
Set the synonyms.CreateValue.Builder
type(String type)
Set the type.CreateValue.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 value
-
-
Method Details
-
build
Builds a CreateValue.- Returns:
- the new CreateValue instance
-
addSynonym
Adds an synonym to synonyms.- Parameters:
synonym
- the new synonym- Returns:
- the CreateValue builder
-
addPattern
Adds an pattern to patterns.- Parameters:
pattern
- the new pattern- Returns:
- the CreateValue builder
-
value
Set the value.- Parameters:
value
- the value- Returns:
- the CreateValue builder
-
metadata
Set the metadata.- Parameters:
metadata
- the metadata- Returns:
- the CreateValue builder
-
type
Set the type.- Parameters:
type
- the type- Returns:
- the CreateValue builder
-
synonyms
Set the synonyms. Existing synonyms will be replaced.- Parameters:
synonyms
- the synonyms- Returns:
- the CreateValue builder
-
patterns
Set the patterns. Existing patterns will be replaced.- Parameters:
patterns
- the patterns- Returns:
- the CreateValue builder
-