Class ImmutableComposerEntity<A>

    • Method Detail

      • getErrors

        public com.google.common.collect.ImmutableList<io.dialob.api.rest.Response> getErrors()
        Specified by:
        getErrors in interface DialobComposer.ComposerEntity<A>
        Returns:
        The value of the errors attribute
      • withId

        public final ImmutableComposerEntity<A> 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
      • withBody

        public final ImmutableComposerEntity<A> withBody​(A value)
        Copy the current immutable object by setting a value for the body attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
        Parameters:
        value - A new value for body
        Returns:
        A modified copy of the this object
      • withErrors

        public final ImmutableComposerEntity<A> withErrors​(io.dialob.api.rest.Response... elements)
        Copy the current immutable object with elements that replace the content of errors.
        Parameters:
        elements - The elements to set
        Returns:
        A modified copy of this object
      • withErrors

        public final ImmutableComposerEntity<A> withErrors​(Iterable<? extends io.dialob.api.rest.Response> 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
      • withStatus

        public final ImmutableComposerEntity<A> withStatus​(DialobStore.BodyStatus 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
      • equals

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

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

        public static <A> ImmutableComposerEntity<A> copyOf​(DialobComposer.ComposerEntity<A> instance)
        Creates an immutable copy of a DialobComposer.ComposerEntity value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
        Type Parameters:
        A - generic parameter A
        Parameters:
        instance - The instance to copy
        Returns:
        A copied immutable ComposerEntity instance
      • builder

        public static <A> ImmutableComposerEntity.Builder<A> builder()
        Creates a builder for ImmutableComposerEntity.
         ImmutableComposerEntity.&lt;A&gt;builder()
            .id(String) // required id
            .body(A) // required body
            .addErrors|addAllErrors(io.dialob.api.rest.Response) // errors elements
            .status(io.dialob.client.api.DialobStore.BodyStatus) // required status
            .build();
         
        Type Parameters:
        A - generic parameter A
        Returns:
        A new ImmutableComposerEntity builder