Class ImmutableFlowResult.Builder
java.lang.Object
io.resys.hdes.client.api.programs.ImmutableFlowResult.Builder
- Enclosing class:
- ImmutableFlowResult
Builds instances of type
ImmutableFlowResult.
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 TypeMethodDescriptionaccepts(Map<String, ? extends Serializable> entries) Sets or replaces all mappings from the specified map as entries for theacceptsmap.addAllLastLogs(Iterable<? extends FlowProgram.FlowResultLog> elements) Adds elements tolastLogslist.addAllLogs(Iterable<? extends FlowProgram.FlowResultLog> elements) Adds elements tologslist.addLastLogs(FlowProgram.FlowResultLog element) Adds one element tolastLogslist.addLastLogs(FlowProgram.FlowResultLog... elements) Adds elements tolastLogslist.addLogs(FlowProgram.FlowResultLog element) Adds one element tologslist.addLogs(FlowProgram.FlowResultLog... elements) Adds elements tologslist.build()Builds a newImmutableFlowResult.from(FlowProgram.FlowResult instance) Fill a builder with attribute values from the providedFlowResultinstance.isReturnsCollection(boolean isReturnsCollection) Initializes the value for theisReturnsCollectionattribute.lastLogs(Iterable<? extends FlowProgram.FlowResultLog> elements) Sets or replaces all elements forlastLogslist.logs(Iterable<? extends FlowProgram.FlowResultLog> elements) Sets or replaces all elements forlogslist.putAccepts(String key, Serializable value) Put one entry to theacceptsmap.putAccepts(Map.Entry<String, ? extends Serializable> entry) Put one entry to theacceptsmap.putAllAccepts(Map<String, ? extends Serializable> entries) Put all mappings from the specified map as entries toacceptsmap.putAllReturns(Map<String, ? extends Serializable> entries) Put all mappings from the specified map as entries toreturnsmap.putReturns(String key, Serializable value) Put one entry to thereturnsmap.putReturns(Map.Entry<String, ? extends Serializable> entry) Put one entry to thereturnsmap.returns(Map<String, ? extends Serializable> entries) Sets or replaces all mappings from the specified map as entries for thereturnsmap.shortHistory(String shortHistory) Initializes the value for theshortHistoryattribute.Initializes the value for thestatusattribute.Initializes the value for thestepIdattribute.
-
Method Details
-
from
@CanIgnoreReturnValue public final ImmutableFlowResult.Builder from(FlowProgram.FlowResult instance) Fill a builder with attribute values from the providedFlowResultinstance. 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
-
stepId
Initializes the value for thestepIdattribute.- Parameters:
stepId- The value for stepId- Returns:
thisbuilder for use in a chained invocation
-
shortHistory
Initializes the value for theshortHistoryattribute.- Parameters:
shortHistory- The value for shortHistory- Returns:
thisbuilder for use in a chained invocation
-
addLogs
@CanIgnoreReturnValue public final ImmutableFlowResult.Builder addLogs(FlowProgram.FlowResultLog element) Adds one element tologslist.- Parameters:
element- A logs element- Returns:
thisbuilder for use in a chained invocation
-
addLogs
@CanIgnoreReturnValue public final ImmutableFlowResult.Builder addLogs(FlowProgram.FlowResultLog... elements) Adds elements tologslist.- Parameters:
elements- An array of logs elements- Returns:
thisbuilder for use in a chained invocation
-
logs
@CanIgnoreReturnValue public final ImmutableFlowResult.Builder logs(Iterable<? extends FlowProgram.FlowResultLog> elements) Sets or replaces all elements forlogslist.- Parameters:
elements- An iterable of logs elements- Returns:
thisbuilder for use in a chained invocation
-
addAllLogs
@CanIgnoreReturnValue public final ImmutableFlowResult.Builder addAllLogs(Iterable<? extends FlowProgram.FlowResultLog> elements) Adds elements tologslist.- Parameters:
elements- An iterable of logs elements- Returns:
thisbuilder for use in a chained invocation
-
addLastLogs
@CanIgnoreReturnValue public final ImmutableFlowResult.Builder addLastLogs(FlowProgram.FlowResultLog element) Adds one element tolastLogslist.- Parameters:
element- A lastLogs element- Returns:
thisbuilder for use in a chained invocation
-
addLastLogs
@CanIgnoreReturnValue public final ImmutableFlowResult.Builder addLastLogs(FlowProgram.FlowResultLog... elements) Adds elements tolastLogslist.- Parameters:
elements- An array of lastLogs elements- Returns:
thisbuilder for use in a chained invocation
-
lastLogs
@CanIgnoreReturnValue public final ImmutableFlowResult.Builder lastLogs(Iterable<? extends FlowProgram.FlowResultLog> elements) Sets or replaces all elements forlastLogslist.- Parameters:
elements- An iterable of lastLogs elements- Returns:
thisbuilder for use in a chained invocation
-
addAllLastLogs
@CanIgnoreReturnValue public final ImmutableFlowResult.Builder addAllLastLogs(Iterable<? extends FlowProgram.FlowResultLog> elements) Adds elements tolastLogslist.- Parameters:
elements- An iterable of lastLogs elements- Returns:
thisbuilder for use in a chained invocation
-
status
@CanIgnoreReturnValue public final ImmutableFlowResult.Builder status(FlowProgram.FlowExecutionStatus status) Initializes the value for thestatusattribute.- Parameters:
status- The value for status- Returns:
thisbuilder for use in a chained invocation
-
isReturnsCollection
@CanIgnoreReturnValue public final ImmutableFlowResult.Builder isReturnsCollection(boolean isReturnsCollection) Initializes the value for theisReturnsCollectionattribute.- Parameters:
isReturnsCollection- The value for isReturnsCollection- Returns:
thisbuilder for use in a chained invocation
-
putAccepts
@CanIgnoreReturnValue public final ImmutableFlowResult.Builder putAccepts(String key, Serializable value) Put one entry to theacceptsmap.- Parameters:
key- The key in the accepts mapvalue- The associated value in the accepts map- Returns:
thisbuilder for use in a chained invocation
-
putAccepts
@CanIgnoreReturnValue public final ImmutableFlowResult.Builder putAccepts(Map.Entry<String, ? extends Serializable> entry) Put one entry to theacceptsmap. Nulls are not permitted- Parameters:
entry- The key and value entry- Returns:
thisbuilder for use in a chained invocation
-
accepts
@CanIgnoreReturnValue public final ImmutableFlowResult.Builder accepts(Map<String, ? extends Serializable> entries) Sets or replaces all mappings from the specified map as entries for theacceptsmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the accepts map- Returns:
thisbuilder for use in a chained invocation
-
putAllAccepts
@CanIgnoreReturnValue public final ImmutableFlowResult.Builder putAllAccepts(Map<String, ? extends Serializable> entries) Put all mappings from the specified map as entries toacceptsmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the accepts map- Returns:
thisbuilder for use in a chained invocation
-
putReturns
@CanIgnoreReturnValue public final ImmutableFlowResult.Builder putReturns(String key, Serializable value) Put one entry to thereturnsmap.- Parameters:
key- The key in the returns mapvalue- The associated value in the returns map- Returns:
thisbuilder for use in a chained invocation
-
putReturns
@CanIgnoreReturnValue public final ImmutableFlowResult.Builder putReturns(Map.Entry<String, ? extends Serializable> entry) Put one entry to thereturnsmap. Nulls are not permitted- Parameters:
entry- The key and value entry- Returns:
thisbuilder for use in a chained invocation
-
returns
@CanIgnoreReturnValue public final ImmutableFlowResult.Builder returns(Map<String, ? extends Serializable> entries) Sets or replaces all mappings from the specified map as entries for thereturnsmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the returns map- Returns:
thisbuilder for use in a chained invocation
-
putAllReturns
@CanIgnoreReturnValue public final ImmutableFlowResult.Builder putAllReturns(Map<String, ? extends Serializable> entries) Put all mappings from the specified map as entries toreturnsmap. Nulls are not permitted- Parameters:
entries- The entries that will be added to the returns map- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newImmutableFlowResult.- Returns:
- An immutable instance of FlowResult
- Throws:
IllegalStateException- if any required attributes are missing
-