Class ImmutableObjectTickets.Builder

java.lang.Object
io.riada.insight.model.ImmutableObjectTickets.Builder
Enclosing class:
ImmutableObjectTickets

@NotThreadSafe public static final class ImmutableObjectTickets.Builder extends Object
Builds instances of type ImmutableObjectTickets. 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 ImmutableObjectTickets.Builder from(ObjectTickets instance)
      Fill a builder with attribute values from the provided ObjectTickets 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
    • addTickets

      @CanIgnoreReturnValue public final ImmutableObjectTickets.Builder addTickets(Ticket element)
      Adds one element to tickets list.
      Parameters:
      element - A tickets element
      Returns:
      this builder for use in a chained invocation
    • addTickets

      @CanIgnoreReturnValue public final ImmutableObjectTickets.Builder addTickets(Ticket... elements)
      Adds elements to tickets list.
      Parameters:
      elements - An array of tickets elements
      Returns:
      this builder for use in a chained invocation
    • setTickets

      @CanIgnoreReturnValue public final ImmutableObjectTickets.Builder setTickets(Iterable<? extends Ticket> elements)
      Sets or replaces all elements for tickets list.
      Parameters:
      elements - An iterable of tickets elements
      Returns:
      this builder for use in a chained invocation
    • addAllTickets

      @CanIgnoreReturnValue public final ImmutableObjectTickets.Builder addAllTickets(Iterable<? extends Ticket> elements)
      Adds elements to tickets list.
      Parameters:
      elements - An iterable of tickets elements
      Returns:
      this builder for use in a chained invocation
    • setAllTicketsQuery

      @CanIgnoreReturnValue public final ImmutableObjectTickets.Builder setAllTicketsQuery(String allTicketsQuery)
      Initializes the value for the allTicketsQuery attribute.
      Parameters:
      allTicketsQuery - The value for allTicketsQuery
      Returns:
      this builder for use in a chained invocation
    • build

      public ImmutableObjectTickets build()
      Returns:
      An immutable instance of ObjectTickets
      Throws:
      IllegalStateException - if any required attributes are missing