Class ImmutableFlowResult

java.lang.Object
io.resys.hdes.client.api.programs.ImmutableFlowResult
All Implemented Interfaces:
FlowProgram.FlowResult, Program.ProgramResult, Serializable

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableFlowResult extends Object implements FlowProgram.FlowResult
Immutable implementation of FlowProgram.FlowResult.

Use the builder to create immutable instances: ImmutableFlowResult.builder().

See Also:
  • Method Details

    • getStepId

      public String getStepId()
      Specified by:
      getStepId in interface FlowProgram.FlowResult
      Returns:
      The value of the stepId attribute
    • getShortHistory

      public String getShortHistory()
      Specified by:
      getShortHistory in interface FlowProgram.FlowResult
      Returns:
      The value of the shortHistory attribute
    • getLogs

      public com.google.common.collect.ImmutableList<FlowProgram.FlowResultLog> getLogs()
      Specified by:
      getLogs in interface FlowProgram.FlowResult
      Returns:
      The value of the logs attribute
    • getLastLogs

      public com.google.common.collect.ImmutableList<FlowProgram.FlowResultLog> getLastLogs()
      Specified by:
      getLastLogs in interface FlowProgram.FlowResult
      Returns:
      The value of the lastLogs attribute
    • getStatus

      public FlowProgram.FlowExecutionStatus getStatus()
      Specified by:
      getStatus in interface FlowProgram.FlowResult
      Returns:
      The value of the status attribute
    • isReturnsCollection

      public boolean isReturnsCollection()
      Specified by:
      isReturnsCollection in interface FlowProgram.FlowResult
      Returns:
      The value of the isReturnsCollection attribute
    • getAccepts

      public com.google.common.collect.ImmutableMap<String,Serializable> getAccepts()
      Specified by:
      getAccepts in interface FlowProgram.FlowResult
      Returns:
      The value of the accepts attribute
    • getReturns

      public com.google.common.collect.ImmutableMap<String,Serializable> getReturns()
      Specified by:
      getReturns in interface FlowProgram.FlowResult
      Returns:
      The value of the returns attribute
    • withStepId

      public final ImmutableFlowResult withStepId(String value)
      Copy the current immutable object by setting a value for the stepId attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for stepId
      Returns:
      A modified copy of the this object
    • withShortHistory

      public final ImmutableFlowResult withShortHistory(String value)
      Copy the current immutable object by setting a value for the shortHistory attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for shortHistory
      Returns:
      A modified copy of the this object
    • withLogs

      public final ImmutableFlowResult withLogs(FlowProgram.FlowResultLog... elements)
      Copy the current immutable object with elements that replace the content of logs.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withLogs

      public final ImmutableFlowResult withLogs(Iterable<? extends FlowProgram.FlowResultLog> elements)
      Copy the current immutable object with elements that replace the content of logs. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of logs elements to set
      Returns:
      A modified copy of this object
    • withLastLogs

      public final ImmutableFlowResult withLastLogs(FlowProgram.FlowResultLog... elements)
      Copy the current immutable object with elements that replace the content of lastLogs.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withLastLogs

      public final ImmutableFlowResult withLastLogs(Iterable<? extends FlowProgram.FlowResultLog> elements)
      Copy the current immutable object with elements that replace the content of lastLogs. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of lastLogs elements to set
      Returns:
      A modified copy of this object
    • withStatus

      public final ImmutableFlowResult withStatus(FlowProgram.FlowExecutionStatus value)
      Copy the current immutable object by setting a value for the status attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for status
      Returns:
      A modified copy of the this object
    • withIsReturnsCollection

      public final ImmutableFlowResult withIsReturnsCollection(boolean value)
      Copy the current immutable object by setting a value for the isReturnsCollection attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for isReturnsCollection
      Returns:
      A modified copy of the this object
    • withAccepts

      public final ImmutableFlowResult withAccepts(Map<String,? extends Serializable> entries)
      Copy the current immutable object by replacing the accepts map with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      entries - The entries to be added to the accepts map
      Returns:
      A modified copy of this object
    • withReturns

      public final ImmutableFlowResult withReturns(Map<String,? extends Serializable> entries)
      Copy the current immutable object by replacing the returns map with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      entries - The entries to be added to the returns map
      Returns:
      A modified copy of this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableFlowResult that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: stepId, shortHistory, logs, lastLogs, status, isReturnsCollection, accepts, returns.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value FlowResult with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      public static ImmutableFlowResult copyOf(FlowProgram.FlowResult instance)
      Creates an immutable copy of a FlowProgram.FlowResult value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
      Parameters:
      instance - The instance to copy
      Returns:
      A copied immutable FlowResult instance
    • builder

      public static ImmutableFlowResult.Builder builder()
      Creates a builder for ImmutableFlowResult.
       ImmutableFlowResult.builder()
          .stepId(String) // required stepId
          .shortHistory(String) // required shortHistory
          .addLogs|addAllLogs(io.resys.hdes.client.api.programs.FlowProgram.FlowResultLog) // logs elements
          .addLastLogs|addAllLastLogs(io.resys.hdes.client.api.programs.FlowProgram.FlowResultLog) // lastLogs elements
          .status(io.resys.hdes.client.api.programs.FlowProgram.FlowExecutionStatus) // required status
          .isReturnsCollection(boolean) // required isReturnsCollection
          .putAccepts|putAllAccepts(String => java.io.Serializable) // accepts mappings
          .putReturns|putAllReturns(String => java.io.Serializable) // returns mappings
          .build();
       
      Returns:
      A new ImmutableFlowResult builder