@NotThreadSafe public static final class SlackEventWrapper.Builder<T extends SlackEvent> extends Object
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.
| Modifier and Type | Method and Description |
|---|---|
SlackEventWrapper.Builder<T> |
addAllAuthedUsers(Iterable<String> elements)
Adds elements to
authedUsers list. |
SlackEventWrapper.Builder<T> |
addAuthedUsers(String... elements)
Adds elements to
authedUsers list. |
SlackEventWrapper.Builder<T> |
addAuthedUsers(String element)
Adds one element to
authedUsers list. |
SlackEventWrapper<T> |
build()
Builds a new
SlackEventWrapper. |
SlackEventWrapper.Builder<T> |
from(SlackEventWrapperIF<T> instance)
Fill a builder with attribute values from the provided
SlackEventWrapperIF instance. |
SlackEventWrapper.Builder<T> |
setAuthedUsers(Iterable<String> elements)
Sets or replaces all elements for
authedUsers list. |
SlackEventWrapper.Builder<T> |
setEvent(T event)
Initializes the value for the
event attribute. |
SlackEventWrapper.Builder<T> |
setEventId(String eventId)
Initializes the value for the
eventId attribute. |
SlackEventWrapper.Builder<T> |
setEventTime(String eventTime)
Initializes the value for the
eventTime attribute. |
SlackEventWrapper.Builder<T> |
setTeamId(String teamId)
Initializes the value for the
teamId attribute. |
SlackEventWrapper.Builder<T> |
setToken(String token)
Initializes the value for the
token attribute. |
SlackEventWrapper.Builder<T> |
setType(SlackEventType type)
Initializes the value for the
type attribute. |
public final SlackEventWrapper.Builder<T> from(SlackEventWrapperIF<T> instance)
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.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final SlackEventWrapper.Builder<T> setToken(String token)
token attribute.token - The value for tokenthis builder for use in a chained invocationpublic final SlackEventWrapper.Builder<T> setTeamId(String teamId)
teamId attribute.teamId - The value for teamIdthis builder for use in a chained invocationpublic final SlackEventWrapper.Builder<T> setType(SlackEventType type)
type attribute.type - The value for typethis builder for use in a chained invocationpublic final SlackEventWrapper.Builder<T> addAuthedUsers(String element)
authedUsers list.element - A authedUsers elementthis builder for use in a chained invocationpublic final SlackEventWrapper.Builder<T> addAuthedUsers(String... elements)
authedUsers list.elements - An array of authedUsers elementsthis builder for use in a chained invocationpublic final SlackEventWrapper.Builder<T> setAuthedUsers(Iterable<String> elements)
authedUsers list.elements - An iterable of authedUsers elementsthis builder for use in a chained invocationpublic final SlackEventWrapper.Builder<T> addAllAuthedUsers(Iterable<String> elements)
authedUsers list.elements - An iterable of authedUsers elementsthis builder for use in a chained invocationpublic final SlackEventWrapper.Builder<T> setEventId(String eventId)
eventId attribute.eventId - The value for eventIdthis builder for use in a chained invocationpublic final SlackEventWrapper.Builder<T> setEventTime(String eventTime)
eventTime attribute.eventTime - The value for eventTimethis builder for use in a chained invocationpublic final SlackEventWrapper.Builder<T> setEvent(T event)
event attribute.event - The value for eventthis builder for use in a chained invocationpublic SlackEventWrapper<T> build() throws com.hubspot.immutables.validation.InvalidImmutableStateException
SlackEventWrapper.com.hubspot.immutables.validation.InvalidImmutableStateException - if any required attributes are missingCopyright © 2019. All rights reserved.