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 Summary
Modifier and TypeMethodDescriptionfinal SlackEventWrapper.Builder<T> addAllAuthedUsers(Iterable<String> elements) Adds elements toauthedUserslist.final SlackEventWrapper.Builder<T> addAuthedUsers(String element) Adds one element toauthedUserslist.final SlackEventWrapper.Builder<T> addAuthedUsers(String... elements) Adds elements toauthedUserslist.build()Builds a newSlackEventWrapper.final SlackEventWrapper.Builder<T> from(SlackEventWrapperIF<T> instance) Fill a builder with attribute values from the providedSlackEventWrapperIFinstance.final SlackEventWrapper.Builder<T> setAuthedUsers(Iterable<String> elements) Sets or replaces all elements forauthedUserslist.final SlackEventWrapper.Builder<T> setContextTeamId(String contextTeamId) Initializes the optional valuecontextTeamIdto contextTeamId.final SlackEventWrapper.Builder<T> setContextTeamId(Optional<String> contextTeamId) Initializes the optional valuecontextTeamIdto contextTeamId.final SlackEventWrapper.Builder<T> Initializes the value for theeventattribute.final SlackEventWrapper.Builder<T> setEventId(String eventId) Initializes the value for theeventIdattribute.final SlackEventWrapper.Builder<T> setEventTime(String eventTime) Initializes the value for theeventTimeattribute.final SlackEventWrapper.Builder<T> Initializes the value for theteamIdattribute.final SlackEventWrapper.Builder<T> Initializes the value for thetokenattribute.final SlackEventWrapper.Builder<T> setType(SlackEventType type) Initializes the value for thetypeattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedSlackEventWrapperIFinstance. 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:
thisbuilder for use in a chained invocation
-
setToken
Initializes the value for thetokenattribute.- Parameters:
token- The value for token- Returns:
thisbuilder for use in a chained invocation
-
setTeamId
Initializes the value for theteamIdattribute.- Parameters:
teamId- The value for teamId- Returns:
thisbuilder for use in a chained invocation
-
setContextTeamId
Initializes the optional valuecontextTeamIdto contextTeamId.- Parameters:
contextTeamId- The value for contextTeamId,nullis accepted asjava.util.Optional.empty()- Returns:
thisbuilder for chained invocation
-
setContextTeamId
Initializes the optional valuecontextTeamIdto contextTeamId.- Parameters:
contextTeamId- The value for contextTeamId- Returns:
thisbuilder for use in a chained invocation
-
setType
Initializes the value for thetypeattribute.- Parameters:
type- The value for type- Returns:
thisbuilder for use in a chained invocation
-
addAuthedUsers
Adds one element toauthedUserslist.- Parameters:
element- A authedUsers element- Returns:
thisbuilder for use in a chained invocation
-
addAuthedUsers
Adds elements toauthedUserslist.- Parameters:
elements- An array of authedUsers elements- Returns:
thisbuilder for use in a chained invocation
-
setAuthedUsers
Sets or replaces all elements forauthedUserslist.- Parameters:
elements- An iterable of authedUsers elements- Returns:
thisbuilder for use in a chained invocation
-
addAllAuthedUsers
Adds elements toauthedUserslist.- Parameters:
elements- An iterable of authedUsers elements- Returns:
thisbuilder for use in a chained invocation
-
setEventId
Initializes the value for theeventIdattribute.- Parameters:
eventId- The value for eventId- Returns:
thisbuilder for use in a chained invocation
-
setEventTime
Initializes the value for theeventTimeattribute.- Parameters:
eventTime- The value for eventTime- Returns:
thisbuilder for use in a chained invocation
-
setEvent
Initializes the value for theeventattribute.- Parameters:
event- The value for event- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newSlackEventWrapper.- Returns:
- An immutable instance of SlackEventWrapper
- Throws:
com.hubspot.immutables.validation.InvalidImmutableStateException- if any required attributes are missing
-