Class ImmutableFlowProgram.Builder

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

@NotThreadSafe public static final class ImmutableFlowProgram.Builder extends Object
Builds instances of type ImmutableFlowProgram. 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 ImmutableFlowProgram.Builder from(FlowProgram instance)
      Fill a builder with attribute values from the provided FlowProgram 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
    • acceptDefs

      @CanIgnoreReturnValue public final ImmutableFlowProgram.Builder acceptDefs(Collection<TypeDef> acceptDefs)
      Initializes the value for the acceptDefs attribute.
      Parameters:
      acceptDefs - The value for acceptDefs
      Returns:
      this builder for use in a chained invocation
    • startStepId

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

      @CanIgnoreReturnValue public final ImmutableFlowProgram.Builder putSteps(String key, FlowProgram.FlowProgramStep value)
      Put one entry to the steps map.
      Parameters:
      key - The key in the steps map
      value - The associated value in the steps map
      Returns:
      this builder for use in a chained invocation
    • putSteps

      @CanIgnoreReturnValue public final ImmutableFlowProgram.Builder putSteps(Map.Entry<String,? extends FlowProgram.FlowProgramStep> entry)
      Put one entry to the steps map. Nulls are not permitted
      Parameters:
      entry - The key and value entry
      Returns:
      this builder for use in a chained invocation
    • steps

      @CanIgnoreReturnValue public final ImmutableFlowProgram.Builder steps(Map<String,? extends FlowProgram.FlowProgramStep> entries)
      Sets or replaces all mappings from the specified map as entries for the steps map. Nulls are not permitted
      Parameters:
      entries - The entries that will be added to the steps map
      Returns:
      this builder for use in a chained invocation
    • putAllSteps

      @CanIgnoreReturnValue public final ImmutableFlowProgram.Builder putAllSteps(Map<String,? extends FlowProgram.FlowProgramStep> entries)
      Put all mappings from the specified map as entries to steps map. Nulls are not permitted
      Parameters:
      entries - The entries that will be added to the steps map
      Returns:
      this builder for use in a chained invocation
    • build

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