Class SlackEventWrapper<T extends SlackEvent>
java.lang.Object
com.hubspot.slack.client.models.events.SlackEventWrapper<T>
- All Implemented Interfaces:
SlackEventWrapperIF<T>
@Generated(from="SlackEventWrapperIF",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class SlackEventWrapper<T extends SlackEvent>
extends Object
implements SlackEventWrapperIF<T>
Immutable implementation of
SlackEventWrapperIF.
Use the builder to create immutable instances:
SlackEventWrapper.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classSlackEventWrapper.Builder<T extends SlackEvent>Builds instances of typeSlackEventWrapper. -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends SlackEvent>
SlackEventWrapper.Builder<T> builder()Creates a builder forSlackEventWrapper.static <T extends SlackEvent>
SlackEventWrapper<T> copyOf(SlackEventWrapperIF<T> instance) Creates an immutable copy of aSlackEventWrapperIFvalue.booleanThis instance is equal to all instances ofSlackEventWrapperthat have equal attribute values.getEvent()getToken()getType()inthashCode()Computes a hash code from attributes:token,teamId,contextTeamId,type,authedUsers,eventId,eventTime,event.toString()Prints the immutable valueSlackEventWrapperwith attribute values.final SlackEventWrapper<T> withAuthedUsers(Iterable<String> elements) Copy the current immutable object with elements that replace the content ofauthedUsers.final SlackEventWrapper<T> withAuthedUsers(String... elements) Copy the current immutable object with elements that replace the content ofauthedUsers.final SlackEventWrapper<T> withContextTeamId(String value) Copy the current immutable object by setting a present value for the optionalcontextTeamIdattribute.final SlackEventWrapper<T> withContextTeamId(Optional<String> optional) Copy the current immutable object by setting an optional value for thecontextTeamIdattribute.final SlackEventWrapper<T> Copy the current immutable object by setting a value for theeventattribute.final SlackEventWrapper<T> withEventId(String value) Copy the current immutable object by setting a value for theeventIdattribute.final SlackEventWrapper<T> withEventTime(String value) Copy the current immutable object by setting a value for theeventTimeattribute.final SlackEventWrapper<T> withTeamId(String value) Copy the current immutable object by setting a value for theteamIdattribute.final SlackEventWrapper<T> Copy the current immutable object by setting a value for thetokenattribute.final SlackEventWrapper<T> withType(SlackEventType value) Copy the current immutable object by setting a value for thetypeattribute.
-
Method Details
-
getToken
- Specified by:
getTokenin interfaceSlackEventWrapperIF<T extends SlackEvent>- Returns:
- The value of the
tokenattribute
-
getTeamId
- Specified by:
getTeamIdin interfaceSlackEventWrapperIF<T extends SlackEvent>- Returns:
- The value of the
teamIdattribute
-
getContextTeamId
- Specified by:
getContextTeamIdin interfaceSlackEventWrapperIF<T extends SlackEvent>- Returns:
- The value of the
contextTeamIdattribute
-
getType
- Specified by:
getTypein interfaceSlackEventWrapperIF<T extends SlackEvent>- Returns:
- The value of the
typeattribute
-
getAuthedUsers
- Specified by:
getAuthedUsersin interfaceSlackEventWrapperIF<T extends SlackEvent>- Returns:
- The value of the
authedUsersattribute
-
getEventId
- Specified by:
getEventIdin interfaceSlackEventWrapperIF<T extends SlackEvent>- Returns:
- The value of the
eventIdattribute
-
getEventTime
- Specified by:
getEventTimein interfaceSlackEventWrapperIF<T extends SlackEvent>- Returns:
- The value of the
eventTimeattribute
-
getEvent
- Specified by:
getEventin interfaceSlackEventWrapperIF<T extends SlackEvent>- Returns:
- The value of the
eventattribute
-
withToken
Copy the current immutable object by setting a value for thetokenattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for token- Returns:
- A modified copy or the
thisobject
-
withTeamId
Copy the current immutable object by setting a value for theteamIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for teamId- Returns:
- A modified copy or the
thisobject
-
withContextTeamId
Copy the current immutable object by setting a present value for the optionalcontextTeamIdattribute.- Parameters:
value- The value for contextTeamId,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withContextTeamId
Copy the current immutable object by setting an optional value for thecontextTeamIdattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for contextTeamId- Returns:
- A modified copy or
thisif not changed
-
withType
Copy the current immutable object by setting a value for thetypeattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for type- Returns:
- A modified copy or the
thisobject
-
withAuthedUsers
Copy the current immutable object with elements that replace the content ofauthedUsers.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withAuthedUsers
Copy the current immutable object with elements that replace the content ofauthedUsers. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of authedUsers elements to set- Returns:
- A modified copy or
thisif not changed
-
withEventId
Copy the current immutable object by setting a value for theeventIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for eventId- Returns:
- A modified copy or the
thisobject
-
withEventTime
Copy the current immutable object by setting a value for theeventTimeattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for eventTime- Returns:
- A modified copy or the
thisobject
-
withEvent
Copy the current immutable object by setting a value for theeventattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for event- Returns:
- A modified copy or the
thisobject
-
equals
This instance is equal to all instances ofSlackEventWrapperthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:token,teamId,contextTeamId,type,authedUsers,eventId,eventTime,event. -
toString
Prints the immutable valueSlackEventWrapperwith attribute values. -
copyOf
Creates an immutable copy of aSlackEventWrapperIFvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Type Parameters:
T- generic parameter T- Parameters:
instance- The instance to copy- Returns:
- A copied immutable SlackEventWrapper instance
-
builder
Creates a builder forSlackEventWrapper.SlackEventWrapper.<T>builder() .setToken(String) // requiredtoken.setTeamId(String) // requiredteamId.setContextTeamId(Optional<String>) // optionalcontextTeamId.setType(com.hubspot.slack.client.models.events.SlackEventType) // requiredtype.addAuthedUsers|addAllAuthedUsers(String) //authedUserselements .setEventId(String) // requiredeventId.setEventTime(String) // requiredeventTime.setEvent(T) // requiredevent.build();- Type Parameters:
T- generic parameter T- Returns:
- A new SlackEventWrapper builder
-