Class ImmutableProgramMessage

java.lang.Object
io.resys.hdes.client.api.programs.ImmutableProgramMessage
All Implemented Interfaces:
ProgramEnvir.ProgramMessage

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableProgramMessage extends Object implements ProgramEnvir.ProgramMessage
Immutable implementation of ProgramEnvir.ProgramMessage.

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

  • Method Details

    • getId

      public String getId()
      Specified by:
      getId in interface ProgramEnvir.ProgramMessage
      Returns:
      The value of the id attribute
    • getMsg

      public String getMsg()
      Specified by:
      getMsg in interface ProgramEnvir.ProgramMessage
      Returns:
      The value of the msg attribute
    • getRow

      @Nullable public Integer getRow()
      Specified by:
      getRow in interface ProgramEnvir.ProgramMessage
      Returns:
      The value of the row attribute
    • getColumn

      @Nullable public Integer getColumn()
      Specified by:
      getColumn in interface ProgramEnvir.ProgramMessage
      Returns:
      The value of the column attribute
    • getException

      @Nullable public Exception getException()
      Specified by:
      getException in interface ProgramEnvir.ProgramMessage
      Returns:
      The value of the exception attribute
    • withId

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

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

      public final ImmutableProgramMessage withRow(@Nullable Integer value)
      Copy the current immutable object by setting a value for the row attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for row (can be null)
      Returns:
      A modified copy of the this object
    • withColumn

      public final ImmutableProgramMessage withColumn(@Nullable Integer value)
      Copy the current immutable object by setting a value for the column attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for column (can be null)
      Returns:
      A modified copy of the this object
    • withException

      public final ImmutableProgramMessage withException(@Nullable Exception value)
      Copy the current immutable object by setting a value for the exception attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for exception (can be null)
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableProgramMessage 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: id, msg, row, column, exception.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static ImmutableProgramMessage copyOf(ProgramEnvir.ProgramMessage instance)
      Creates an immutable copy of a ProgramEnvir.ProgramMessage 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 ProgramMessage instance
    • builder

      public static ImmutableProgramMessage.Builder builder()
      Creates a builder for ImmutableProgramMessage.
       ImmutableProgramMessage.builder()
          .id(String) // required id
          .msg(String) // required msg
          .row(Integer | null) // nullable row
          .column(Integer | null) // nullable column
          .exception(Exception | null) // nullable exception
          .build();
       
      Returns:
      A new ImmutableProgramMessage builder