Package io.dialob.api.proto
Class ImmutableAction.Builder
java.lang.Object
io.dialob.api.proto.ImmutableAction.Builder
- Enclosing class:
- ImmutableAction
Builds instances of type
ImmutableAction.
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 TypeMethodDescriptionfinal ImmutableAction.BuilderAdds elements toidslist.final ImmutableAction.BuilderAdds one element toidslist.final ImmutableAction.BuilderAdds elements toidslist.final ImmutableAction.BuilderInitializes the value for theanswerattribute.build()Builds a newImmutableAction.final ImmutableAction.BuilderInitializes the value for theerrorattribute.final ImmutableAction.BuilderFill a builder with attribute values from the providedActioninstance.final ImmutableAction.BuilderInitializes the value for theidattribute.final ImmutableAction.BuilderSets or replaces all elements foridslist.final ImmutableAction.Builderitem(ActionItem item) Initializes the value for theitemattribute.final ImmutableAction.BuilderInitializes the value for themessageattribute.final ImmutableAction.BuilderresourceId(String resourceId) Initializes the value for theresourceIdattribute.final ImmutableAction.BuilderserverEvent(Boolean serverEvent) Initializes the value for theserverEventattribute.final ImmutableAction.BuilderInitializes the value for thetraceattribute.final ImmutableAction.Buildertype(Action.Type type) Initializes the value for thetypeattribute.final ImmutableAction.BuilderInitializes the value for thevalueattribute.final ImmutableAction.BuilderInitializes the value for thevalueSetattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedActioninstance. 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
-
type
Initializes the value for thetypeattribute.- Parameters:
type- The value for type- Returns:
thisbuilder for use in a chained invocation
-
id
Initializes the value for theidattribute.- Parameters:
id- The value for id (can benull)- Returns:
thisbuilder for use in a chained invocation
-
message
Initializes the value for themessageattribute.- Parameters:
message- The value for message (can benull)- Returns:
thisbuilder for use in a chained invocation
-
trace
Initializes the value for thetraceattribute.- Parameters:
trace- The value for trace (can benull)- Returns:
thisbuilder for use in a chained invocation
-
item
Initializes the value for theitemattribute.- Parameters:
item- The value for item (can benull)- Returns:
thisbuilder for use in a chained invocation
-
error
Initializes the value for theerrorattribute.- Parameters:
error- The value for error (can benull)- Returns:
thisbuilder for use in a chained invocation
-
answer
Initializes the value for theanswerattribute.- Parameters:
answer- The value for answer (can benull)- Returns:
thisbuilder for use in a chained invocation
-
addIds
Adds one element toidslist.- Parameters:
element- A ids element- Returns:
thisbuilder for use in a chained invocation
-
addIds
Adds elements toidslist.- Parameters:
elements- An array of ids elements- Returns:
thisbuilder for use in a chained invocation
-
ids
Sets or replaces all elements foridslist.- Parameters:
elements- An iterable of ids elements- Returns:
thisbuilder for use in a chained invocation
-
addAllIds
Adds elements toidslist.- Parameters:
elements- An iterable of ids 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
-
valueSet
Initializes the value for thevalueSetattribute.- Parameters:
valueSet- The value for valueSet (can benull)- Returns:
thisbuilder for use in a chained invocation
-
serverEvent
Initializes the value for theserverEventattribute.- Parameters:
serverEvent- The value for serverEvent (can benull)- Returns:
thisbuilder for use in a chained invocation
-
resourceId
Initializes the value for theresourceIdattribute.- Parameters:
resourceId- The value for resourceId (can benull)- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableAction.- Returns:
- An immutable instance of Action
- Throws:
IllegalStateException- if any required attributes are missing
-