Class ImmutableProgramMessage

    • Method Detail

      • getSrc

        @Nullable
        public io.dialob.api.form.FormValidationError getSrc()
        Specified by:
        getSrc in interface DialobClient.ProgramMessage
        Returns:
        The value of the src 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​(@Nullable
                                                     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 (can be null)
        Returns:
        A modified copy of the this object
      • withSrc

        public final ImmutableProgramMessage withSrc​(@Nullable
                                                     io.dialob.api.form.FormValidationError value)
        Copy the current immutable object by setting a value for the src attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for src (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, src, 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​(DialobClient.ProgramMessage instance)
        Creates an immutable copy of a DialobClient.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 | null) // nullable msg
            .src(io.dialob.api.form.FormValidationError | null) // nullable src
            .exception(Exception | null) // nullable exception
            .build();
         
        Returns:
        A new ImmutableProgramMessage builder