Class ImmutableFlowResult.Builder

java.lang.Object
io.resys.hdes.client.api.programs.ImmutableFlowResult.Builder
Enclosing class:
ImmutableFlowResult

@NotThreadSafe public static final class ImmutableFlowResult.Builder extends Object
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 Details

    • from

      @CanIgnoreReturnValue public final ImmutableFlowResult.Builder from(FlowProgram.FlowResult instance)
      Fill a builder with attribute values from the provided FlowResult instance. 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:
      this builder for use in a chained invocation
    • stepId

      @CanIgnoreReturnValue public final ImmutableFlowResult.Builder stepId(String stepId)
      Initializes the value for the stepId attribute.
      Parameters:
      stepId - The value for stepId
      Returns:
      this builder for use in a chained invocation
    • shortHistory

      @CanIgnoreReturnValue public final ImmutableFlowResult.Builder shortHistory(String shortHistory)
      Initializes the value for the shortHistory attribute.
      Parameters:
      shortHistory - The value for shortHistory
      Returns:
      this builder for use in a chained invocation
    • addLogs

      @CanIgnoreReturnValue public final ImmutableFlowResult.Builder addLogs(FlowProgram.FlowResultLog element)
      Adds one element to logs list.
      Parameters:
      element - A logs element
      Returns:
      this builder for use in a chained invocation
    • addLogs

      @CanIgnoreReturnValue public final ImmutableFlowResult.Builder addLogs(FlowProgram.FlowResultLog... elements)
      Adds elements to logs list.
      Parameters:
      elements - An array of logs elements
      Returns:
      this builder for use in a chained invocation
    • logs

      @CanIgnoreReturnValue public final ImmutableFlowResult.Builder logs(Iterable<? extends FlowProgram.FlowResultLog> elements)
      Sets or replaces all elements for logs list.
      Parameters:
      elements - An iterable of logs elements
      Returns:
      this builder for use in a chained invocation
    • addAllLogs

      @CanIgnoreReturnValue public final ImmutableFlowResult.Builder addAllLogs(Iterable<? extends FlowProgram.FlowResultLog> elements)
      Adds elements to logs list.
      Parameters:
      elements - An iterable of logs elements
      Returns:
      this builder for use in a chained invocation
    • addLastLogs

      @CanIgnoreReturnValue public final ImmutableFlowResult.Builder addLastLogs(FlowProgram.FlowResultLog element)
      Adds one element to lastLogs list.
      Parameters:
      element - A lastLogs element
      Returns:
      this builder for use in a chained invocation
    • addLastLogs

      @CanIgnoreReturnValue public final ImmutableFlowResult.Builder addLastLogs(FlowProgram.FlowResultLog... elements)
      Adds elements to lastLogs list.
      Parameters:
      elements - An array of lastLogs elements
      Returns:
      this builder for use in a chained invocation
    • lastLogs

      @CanIgnoreReturnValue public final ImmutableFlowResult.Builder lastLogs(Iterable<? extends FlowProgram.FlowResultLog> elements)
      Sets or replaces all elements for lastLogs list.
      Parameters:
      elements - An iterable of lastLogs elements
      Returns:
      this builder for use in a chained invocation
    • addAllLastLogs

      @CanIgnoreReturnValue public final ImmutableFlowResult.Builder addAllLastLogs(Iterable<? extends FlowProgram.FlowResultLog> elements)
      Adds elements to lastLogs list.
      Parameters:
      elements - An iterable of lastLogs elements
      Returns:
      this builder for use in a chained invocation
    • status

      @CanIgnoreReturnValue public final ImmutableFlowResult.Builder status(FlowProgram.FlowExecutionStatus status)
      Initializes the value for the status attribute.
      Parameters:
      status - The value for status
      Returns:
      this builder for use in a chained invocation
    • isReturnsCollection

      @CanIgnoreReturnValue public final ImmutableFlowResult.Builder isReturnsCollection(boolean isReturnsCollection)
      Initializes the value for the isReturnsCollection attribute.
      Parameters:
      isReturnsCollection - The value for isReturnsCollection
      Returns:
      this builder for use in a chained invocation
    • putAccepts

      @CanIgnoreReturnValue public final ImmutableFlowResult.Builder putAccepts(String key, Serializable value)
      Put one entry to the accepts map.
      Parameters:
      key - The key in the accepts map
      value - The associated value in the accepts map
      Returns:
      this builder for use in a chained invocation
    • putAccepts

      @CanIgnoreReturnValue public final ImmutableFlowResult.Builder putAccepts(Map.Entry<String,? extends Serializable> entry)
      Put one entry to the accepts map. Nulls are not permitted
      Parameters:
      entry - The key and value entry
      Returns:
      this builder 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 the accepts map. Nulls are not permitted
      Parameters:
      entries - The entries that will be added to the accepts map
      Returns:
      this builder 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 to accepts map. Nulls are not permitted
      Parameters:
      entries - The entries that will be added to the accepts map
      Returns:
      this builder for use in a chained invocation
    • putReturns

      @CanIgnoreReturnValue public final ImmutableFlowResult.Builder putReturns(String key, Serializable value)
      Put one entry to the returns map.
      Parameters:
      key - The key in the returns map
      value - The associated value in the returns map
      Returns:
      this builder for use in a chained invocation
    • putReturns

      @CanIgnoreReturnValue public final ImmutableFlowResult.Builder putReturns(Map.Entry<String,? extends Serializable> entry)
      Put one entry to the returns map. Nulls are not permitted
      Parameters:
      entry - The key and value entry
      Returns:
      this builder 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 the returns map. Nulls are not permitted
      Parameters:
      entries - The entries that will be added to the returns map
      Returns:
      this builder 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 to returns map. Nulls are not permitted
      Parameters:
      entries - The entries that will be added to the returns map
      Returns:
      this builder for use in a chained invocation
    • build

      public ImmutableFlowResult build()
      Builds a new ImmutableFlowResult.
      Returns:
      An immutable instance of FlowResult
      Throws:
      IllegalStateException - if any required attributes are missing