Class ImmutableQueryEnvelope.Builder<T extends ThenaContainer>

java.lang.Object
io.resys.thena.api.envelope.ImmutableQueryEnvelope.Builder<T>
Enclosing class:
ImmutableQueryEnvelope<T extends ThenaContainer>

@Generated(from="QueryEnvelope", generator="Immutables") public static final class ImmutableQueryEnvelope.Builder<T extends ThenaContainer> extends Object
Builds instances of type ImmutableQueryEnvelope. Initialize attributes and then invoke the build() method to create an immutable instance.

Builder is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.

  • Method Details

    • from

      @CanIgnoreReturnValue public final ImmutableQueryEnvelope.Builder<T> from(QueryEnvelope<T> instance)
      Fill a builder with attribute values from the provided QueryEnvelope instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • repo

      @CanIgnoreReturnValue public final ImmutableQueryEnvelope.Builder<T> repo(@Nullable Tenant repo)
      Initializes the value for the repo attribute.
      Parameters:
      repo - The value for repo (can be null)
      Returns:
      this builder for use in a chained invocation
    • objects

      @CanIgnoreReturnValue public final ImmutableQueryEnvelope.Builder<T> objects(@Nullable T objects)
      Initializes the value for the objects attribute.
      Parameters:
      objects - The value for objects (can be null)
      Returns:
      this builder for use in a chained invocation
    • status

      @CanIgnoreReturnValue public final ImmutableQueryEnvelope.Builder<T> status(QueryEnvelope.QueryEnvelopeStatus status)
      Initializes the value for the status attribute.
      Parameters:
      status - The value for status
      Returns:
      this builder for use in a chained invocation
    • addMessages

      @CanIgnoreReturnValue public final ImmutableQueryEnvelope.Builder<T> addMessages(Message element)
      Adds one element to messages list.
      Parameters:
      element - A messages element
      Returns:
      this builder for use in a chained invocation
    • addMessages

      @CanIgnoreReturnValue public final ImmutableQueryEnvelope.Builder<T> addMessages(Message... elements)
      Adds elements to messages list.
      Parameters:
      elements - An array of messages elements
      Returns:
      this builder for use in a chained invocation
    • messages

      @CanIgnoreReturnValue public final ImmutableQueryEnvelope.Builder<T> messages(Iterable<? extends Message> elements)
      Sets or replaces all elements for messages list.
      Parameters:
      elements - An iterable of messages elements
      Returns:
      this builder for use in a chained invocation
    • addAllMessages

      @CanIgnoreReturnValue public final ImmutableQueryEnvelope.Builder<T> addAllMessages(Iterable<? extends Message> elements)
      Adds elements to messages list.
      Parameters:
      elements - An iterable of messages elements
      Returns:
      this builder for use in a chained invocation
    • build

      public ImmutableQueryEnvelope<T> build()
      Returns:
      An immutable instance of QueryEnvelope
      Throws:
      IllegalStateException - if any required attributes are missing