Class ImmutableQueryEnvelopePage<T extends ThenaContainer>

java.lang.Object
io.resys.thena.api.envelope.ImmutableQueryEnvelopePage<T>
All Implemented Interfaces:
QueryEnvelopePage<T>, ThenaEnvelope

@Generated(from="QueryEnvelopePage", generator="Immutables") @Generated("org.immutables.processor.ProxyProcessor") public final class ImmutableQueryEnvelopePage<T extends ThenaContainer> extends Object implements QueryEnvelopePage<T>
Immutable implementation of QueryEnvelopePage.

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

  • Method Details

    • getRepo

      @Nullable public Tenant getRepo()
      Specified by:
      getRepo in interface QueryEnvelopePage<T extends ThenaContainer>
      Returns:
      The value of the repo attribute
    • getCurrentPageObjects

      @Nullable public com.google.common.collect.ImmutableList<T> getCurrentPageObjects()
      Specified by:
      getCurrentPageObjects in interface QueryEnvelopePage<T extends ThenaContainer>
      Returns:
      The value of the currentPageObjects attribute
    • getCurrentPageNumber

      @Nullable public Integer getCurrentPageNumber()
      Specified by:
      getCurrentPageNumber in interface QueryEnvelopePage<T extends ThenaContainer>
      Returns:
      The value of the currentPageNumber attribute
    • getTotalPages

      @Nullable public Integer getTotalPages()
      Specified by:
      getTotalPages in interface QueryEnvelopePage<T extends ThenaContainer>
      Returns:
      The value of the totalPages attribute
    • getTotalObjectsOnPages

      @Nullable public Long getTotalObjectsOnPages()
      Specified by:
      getTotalObjectsOnPages in interface QueryEnvelopePage<T extends ThenaContainer>
      Returns:
      The value of the totalObjectsOnPages attribute
    • getStatus

      Specified by:
      getStatus in interface QueryEnvelopePage<T extends ThenaContainer>
      Returns:
      The value of the status attribute
    • getMessages

      public com.google.common.collect.ImmutableList<Message> getMessages()
      Specified by:
      getMessages in interface QueryEnvelopePage<T extends ThenaContainer>
      Returns:
      The value of the messages attribute
    • withRepo

      public final ImmutableQueryEnvelopePage<T> withRepo(@Nullable Tenant value)
      Copy the current immutable object by setting a value for the repo attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for repo (can be null)
      Returns:
      A modified copy or the this object
    • withCurrentPageObjects

      @SafeVarargs public final ImmutableQueryEnvelopePage<T> withCurrentPageObjects(@Nullable T... elements)
      Copy the current immutable object with elements that replace the content of currentPageObjects.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withCurrentPageObjects

      public final ImmutableQueryEnvelopePage<T> withCurrentPageObjects(@Nullable Iterable<? extends T> elements)
      Copy the current immutable object with elements that replace the content of currentPageObjects. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of currentPageObjects elements to set
      Returns:
      A modified copy or this if not changed
    • withCurrentPageNumber

      public final ImmutableQueryEnvelopePage<T> withCurrentPageNumber(@Nullable Integer value)
      Copy the current immutable object by setting a value for the currentPageNumber attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for currentPageNumber (can be null)
      Returns:
      A modified copy or the this object
    • withTotalPages

      public final ImmutableQueryEnvelopePage<T> withTotalPages(@Nullable Integer value)
      Copy the current immutable object by setting a value for the totalPages attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for totalPages (can be null)
      Returns:
      A modified copy or the this object
    • withTotalObjectsOnPages

      public final ImmutableQueryEnvelopePage<T> withTotalObjectsOnPages(@Nullable Long value)
      Copy the current immutable object by setting a value for the totalObjectsOnPages attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for totalObjectsOnPages (can be null)
      Returns:
      A modified copy or the this object
    • withStatus

      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 or the this object
    • withMessages

      public final ImmutableQueryEnvelopePage<T> withMessages(Message... elements)
      Copy the current immutable object with elements that replace the content of messages.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withMessages

      public final ImmutableQueryEnvelopePage<T> withMessages(Iterable<? extends Message> elements)
      Copy the current immutable object with elements that replace the content of messages. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of messages elements to set
      Returns:
      A modified copy or this if not changed
    • equals

      public boolean equals(Object another)
      This instance is equal to all instances of ImmutableQueryEnvelopePage 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: repo, currentPageObjects, currentPageNumber, totalPages, totalObjectsOnPages, status, messages.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static <T extends ThenaContainer> ImmutableQueryEnvelopePage<T> copyOf(QueryEnvelopePage<T> instance)
      Creates an immutable copy of a QueryEnvelopePage 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:
      T - generic parameter T
      Parameters:
      instance - The instance to copy
      Returns:
      A copied immutable QueryEnvelopePage instance
    • builder

      public static <T extends ThenaContainer> ImmutableQueryEnvelopePage.Builder<T> builder()
      Creates a builder for ImmutableQueryEnvelopePage.
       ImmutableQueryEnvelopePage.<T>builder()
          .repo(io.resys.thena.api.entities.Tenant | null) // nullable repo
          .currentPageObjects(List<T> | null) // nullable currentPageObjects
          .currentPageNumber(Integer | null) // nullable currentPageNumber
          .totalPages(Integer | null) // nullable totalPages
          .totalObjectsOnPages(Long | null) // nullable totalObjectsOnPages
          .status(io.resys.thena.api.envelope.QueryEnvelope.QueryEnvelopeStatus) // required status
          .addMessages|addAllMessages(io.resys.thena.api.envelope.Message) // messages elements
          .build();
       
      Type Parameters:
      T - generic parameter T
      Returns:
      A new ImmutableQueryEnvelopePage builder