Class ImmutableProgramWrapper

    • Method Detail

      • withSource

        public final ImmutableProgramWrapper withSource​(DialobStore.StoreEntity value)
        Copy the current immutable object by setting a value for the source attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for source
        Returns:
        A modified copy of the this object
      • withDocument

        public final ImmutableProgramWrapper withDocument​(DialobDocument.FormDocument value)
        Copy the current immutable object by setting a value for the document attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for document
        Returns:
        A modified copy of the this object
      • withId

        public final ImmutableProgramWrapper 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
      • withStatus

        public final ImmutableProgramWrapper withStatus​(DialobClient.ProgramStatus 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
      • withErrors

        public final ImmutableProgramWrapper withErrors​(Iterable<? extends DialobClient.ProgramMessage> elements)
        Copy the current immutable object with elements that replace the content of errors. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        elements - An iterable of errors elements to set
        Returns:
        A modified copy of this object
      • withProgram

        public final ImmutableProgramWrapper withProgram​(DialobProgram value)
        Copy the current immutable object by setting a present value for the optional program attribute.
        Parameters:
        value - The value for program
        Returns:
        A modified copy of this object
      • withProgram

        public final ImmutableProgramWrapper withProgram​(Optional<? extends DialobProgram> optional)
        Copy the current immutable object by setting an optional value for the program attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
        Parameters:
        optional - A value for program
        Returns:
        A modified copy of this object
      • equals

        public boolean equals​(@Nullable
                              Object another)
        This instance is equal to all instances of ImmutableProgramWrapper 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: source, document, id, status, errors, program.
        Overrides:
        hashCode in class Object
        Returns:
        hashCode value
      • toString

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

        public static ImmutableProgramWrapper copyOf​(DialobClient.ProgramWrapper instance)
        Creates an immutable copy of a DialobClient.ProgramWrapper 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 ProgramWrapper instance
      • builder

        public static ImmutableProgramWrapper.Builder builder()
        Creates a builder for ImmutableProgramWrapper.
         ImmutableProgramWrapper.builder()
            .source(io.dialob.client.api.DialobStore.StoreEntity) // required source
            .document(io.dialob.client.api.DialobDocument.FormDocument) // required document
            .id(String) // required id
            .status(io.dialob.client.api.DialobClient.ProgramStatus) // required status
            .addErrors|addAllErrors(io.dialob.client.api.DialobClient.ProgramMessage) // errors elements
            .program(io.dialob.program.DialobProgram) // optional program
            .build();
         
        Returns:
        A new ImmutableProgramWrapper builder