Package io.dialob.api.proto
Class ImmutableActionItem.Builder
java.lang.Object
io.dialob.api.proto.ImmutableActionItem.Builder
- Enclosing class:
- ImmutableActionItem
Builds instances of type
ImmutableActionItem.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Method Summary
Modifier and TypeMethodDescriptionactiveItem(String activeItem) Initializes the value for theactiveItemattribute.addAllAllowedActions(Iterable<Action.Type> elements) Adds elements toallowedActionsset.addAllAvailableItems(Iterable<String> elements) Adds elements toavailableItemslist.addAllClassName(Iterable<String> elements) Adds elements toclassNamelist.addAllItems(Iterable<String> elements) Adds elements toitemslist.addAllowedActions(Action.Type element) Adds one element toallowedActionsset.addAllowedActions(Action.Type... elements) Adds elements toallowedActionsset.addAvailableItems(String element) Adds one element toavailableItemslist.addAvailableItems(String... elements) Adds elements toavailableItemslist.addClassName(String element) Adds one element toclassNamelist.addClassName(String... elements) Adds elements toclassNamelist.Adds one element toitemslist.Adds elements toitemslist.allowedActions(Iterable<Action.Type> elements) Sets or replaces all elements forallowedActionsset.Initializes the value for theansweredattribute.availableItems(Iterable<String> elements) Sets or replaces all elements foravailableItemslist.build()Builds a newImmutableActionItem.Sets or replaces all elements forclassNamelist.description(String description) Initializes the value for thedescriptionattribute.Initializes the value for thedisabledattribute.from(ActionItem instance) Fill a builder with attribute values from the providedActionIteminstance.Initializes the value for theidattribute.Initializes the value for theinactiveattribute.Sets or replaces all elements foritemslist.Initializes the value for thelabelattribute.Sets or replaces all mappings from the specified map as entries for thepropsmap.putAllProps(Map<String, ? extends Object> entries) Put all mappings from the specified map as entries topropsmap.Put one entry to thepropsmap.Put one entry to thepropsmap.Initializes the value for therequiredattribute.Initializes the value for thetypeattribute.Initializes the value for thevalueattribute.valueSetId(String valueSetId) Initializes the value for thevalueSetIdattribute.Initializes the value for theviewattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedActionIteminstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
id
Initializes the value for theidattribute.- Parameters:
id- The value for id- Returns:
thisbuilder for use in a chained invocation
-
type
Initializes the value for thetypeattribute.- Parameters:
type- The value for type- Returns:
thisbuilder for use in a chained invocation
-
view
Initializes the value for theviewattribute.- Parameters:
view- The value for view (can benull)- Returns:
thisbuilder for use in a chained invocation
-
label
Initializes the value for thelabelattribute.- Parameters:
label- The value for label (can benull)- Returns:
thisbuilder for use in a chained invocation
-
description
Initializes the value for thedescriptionattribute.- Parameters:
description- The value for description (can benull)- Returns:
thisbuilder for use in a chained invocation
-
inactive
Initializes the value for theinactiveattribute.- Parameters:
inactive- The value for inactive (can benull)- Returns:
thisbuilder for use in a chained invocation
-
disabled
Initializes the value for thedisabledattribute.- Parameters:
disabled- The value for disabled (can benull)- Returns:
thisbuilder for use in a chained invocation
-
required
Initializes the value for therequiredattribute.- Parameters:
required- The value for required (can benull)- Returns:
thisbuilder for use in a chained invocation
-
addClassName
Adds one element toclassNamelist.- Parameters:
element- A className element- Returns:
thisbuilder for use in a chained invocation
-
addClassName
Adds elements toclassNamelist.- Parameters:
elements- An array of className elements- Returns:
thisbuilder for use in a chained invocation
-
className
Sets or replaces all elements forclassNamelist.- Parameters:
elements- An iterable of className elements- Returns:
thisbuilder for use in a chained invocation
-
addAllClassName
Adds elements toclassNamelist.- Parameters:
elements- An iterable of className elements- Returns:
thisbuilder for use in a chained invocation
-
value
Initializes the value for thevalueattribute.- Parameters:
value- The value for value (can benull)- Returns:
thisbuilder for use in a chained invocation
-
addItems
Adds one element toitemslist.- Parameters:
element- A items element- Returns:
thisbuilder for use in a chained invocation
-
addItems
Adds elements toitemslist.- Parameters:
elements- An array of items elements- Returns:
thisbuilder for use in a chained invocation
-
items
Sets or replaces all elements foritemslist.- Parameters:
elements- An iterable of items elements- Returns:
thisbuilder for use in a chained invocation
-
addAllItems
Adds elements toitemslist.- Parameters:
elements- An iterable of items elements- Returns:
thisbuilder for use in a chained invocation
-
activeItem
Initializes the value for theactiveItemattribute.- Parameters:
activeItem- The value for activeItem (can benull)- Returns:
thisbuilder for use in a chained invocation
-
addAvailableItems
Adds one element toavailableItemslist.- Parameters:
element- A availableItems element- Returns:
thisbuilder for use in a chained invocation
-
addAvailableItems
Adds elements toavailableItemslist.- Parameters:
elements- An array of availableItems elements- Returns:
thisbuilder for use in a chained invocation
-
availableItems
Sets or replaces all elements foravailableItemslist.- Parameters:
elements- An iterable of availableItems elements- Returns:
thisbuilder for use in a chained invocation
-
addAllAvailableItems
Adds elements toavailableItemslist.- Parameters:
elements- An iterable of availableItems elements- Returns:
thisbuilder for use in a chained invocation
-
addAllowedActions
Adds one element toallowedActionsset.- Parameters:
element- A allowedActions element- Returns:
thisbuilder for use in a chained invocation
-
addAllowedActions
Adds elements toallowedActionsset.- Parameters:
elements- An array of allowedActions elements- Returns:
thisbuilder for use in a chained invocation
-
allowedActions
Sets or replaces all elements forallowedActionsset.- Parameters:
elements- An iterable of allowedActions elements- Returns:
thisbuilder for use in a chained invocation
-
addAllAllowedActions
Adds elements toallowedActionsset.- Parameters:
elements- An iterable of allowedActions elements- Returns:
thisbuilder for use in a chained invocation
-
answered
Initializes the value for theansweredattribute.- Parameters:
answered- The value for answered (can benull)- Returns:
thisbuilder for use in a chained invocation
-
valueSetId
Initializes the value for thevalueSetIdattribute.- Parameters:
valueSetId- The value for valueSetId (can benull)- Returns:
thisbuilder for use in a chained invocation
-
putProps
Put one entry to thepropsmap.- Parameters:
key- The key in the props mapvalue- The associated value in the props map- Returns:
thisbuilder for use in a chained invocation
-
putProps
Put one entry to thepropsmap. Nulls are not permitted- Parameters:
entry- The key and value entry- Returns:
thisbuilder for use in a chained invocation
-
props
Sets or replaces all mappings from the specified map as entries for thepropsmap. Nulls are not permitted as keys or values, but parameter itself can be null- Parameters:
entries- The entries that will be added to the props map- Returns:
thisbuilder for use in a chained invocation
-
putAllProps
Put all mappings from the specified map as entries topropsmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the props map- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableActionItem.- Returns:
- An immutable instance of ActionItem
- Throws:
IllegalStateException- if any required attributes are missing
-