Class SlackEventWrapper.Builder<T extends SlackEvent>

java.lang.Object
com.hubspot.slack.client.models.events.SlackEventWrapper.Builder<T>
Enclosing class:
SlackEventWrapper<T extends SlackEvent>

@Generated(from="SlackEventWrapperIF", generator="Immutables") @NotThreadSafe public static final class SlackEventWrapper.Builder<T extends SlackEvent> extends Object
Builds instances of type SlackEventWrapper. 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

      public final SlackEventWrapper.Builder<T> from(SlackEventWrapperIF<T> instance)
      Fill a builder with attribute values from the provided SlackEventWrapperIF 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
    • setToken

      public final SlackEventWrapper.Builder<T> setToken(String token)
      Initializes the value for the token attribute.
      Parameters:
      token - The value for token
      Returns:
      this builder for use in a chained invocation
    • setTeamId

      public final SlackEventWrapper.Builder<T> setTeamId(String teamId)
      Initializes the value for the teamId attribute.
      Parameters:
      teamId - The value for teamId
      Returns:
      this builder for use in a chained invocation
    • setContextTeamId

      public final SlackEventWrapper.Builder<T> setContextTeamId(@Nullable String contextTeamId)
      Initializes the optional value contextTeamId to contextTeamId.
      Parameters:
      contextTeamId - The value for contextTeamId, null is accepted as java.util.Optional.empty()
      Returns:
      this builder for chained invocation
    • setContextTeamId

      public final SlackEventWrapper.Builder<T> setContextTeamId(Optional<String> contextTeamId)
      Initializes the optional value contextTeamId to contextTeamId.
      Parameters:
      contextTeamId - The value for contextTeamId
      Returns:
      this builder for use in a chained invocation
    • setType

      public final SlackEventWrapper.Builder<T> setType(SlackEventType type)
      Initializes the value for the type attribute.
      Parameters:
      type - The value for type
      Returns:
      this builder for use in a chained invocation
    • addAuthedUsers

      public final SlackEventWrapper.Builder<T> addAuthedUsers(String element)
      Adds one element to authedUsers list.
      Parameters:
      element - A authedUsers element
      Returns:
      this builder for use in a chained invocation
    • addAuthedUsers

      public final SlackEventWrapper.Builder<T> addAuthedUsers(String... elements)
      Adds elements to authedUsers list.
      Parameters:
      elements - An array of authedUsers elements
      Returns:
      this builder for use in a chained invocation
    • setAuthedUsers

      public final SlackEventWrapper.Builder<T> setAuthedUsers(Iterable<String> elements)
      Sets or replaces all elements for authedUsers list.
      Parameters:
      elements - An iterable of authedUsers elements
      Returns:
      this builder for use in a chained invocation
    • addAllAuthedUsers

      public final SlackEventWrapper.Builder<T> addAllAuthedUsers(Iterable<String> elements)
      Adds elements to authedUsers list.
      Parameters:
      elements - An iterable of authedUsers elements
      Returns:
      this builder for use in a chained invocation
    • setEventId

      public final SlackEventWrapper.Builder<T> setEventId(String eventId)
      Initializes the value for the eventId attribute.
      Parameters:
      eventId - The value for eventId
      Returns:
      this builder for use in a chained invocation
    • setEventTime

      public final SlackEventWrapper.Builder<T> setEventTime(String eventTime)
      Initializes the value for the eventTime attribute.
      Parameters:
      eventTime - The value for eventTime
      Returns:
      this builder for use in a chained invocation
    • setEvent

      public final SlackEventWrapper.Builder<T> setEvent(T event)
      Initializes the value for the event attribute.
      Parameters:
      event - The value for event
      Returns:
      this builder for use in a chained invocation
    • build

      public SlackEventWrapper<T> build()
      Builds a new SlackEventWrapper.
      Returns:
      An immutable instance of SlackEventWrapper
      Throws:
      com.hubspot.immutables.validation.InvalidImmutableStateException - if any required attributes are missing