Package com.hubspot.slack.client.models
Class Reaction
java.lang.Object
com.hubspot.slack.client.models.Reaction
- All Implemented Interfaces:
ReactionIF
@Generated(from="ReactionIF",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class Reaction
extends Object
implements ReactionIF
Immutable implementation of
ReactionIF.
Use the builder to create immutable instances:
Reaction.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic Reaction.Builderbuilder()Creates a builder forReaction.static ReactioncopyOf(ReactionIF instance) Creates an immutable copy of aReactionIFvalue.booleanThis instance is equal to all instances ofReactionthat have equal attribute values.intgetCount()getName()getUsers()inthashCode()Computes a hash code from attributes:name,count,users.toString()Prints the immutable valueReactionwith attribute values.final ReactionwithCount(int value) Copy the current immutable object by setting a value for thecountattribute.final ReactionCopy the current immutable object by setting a value for thenameattribute.final ReactionCopy the current immutable object with elements that replace the content ofusers.final ReactionCopy the current immutable object with elements that replace the content ofusers.
-
Method Details
-
getName
- Specified by:
getNamein interfaceReactionIF- Returns:
- The value of the
nameattribute
-
getCount
public int getCount()- Specified by:
getCountin interfaceReactionIF- Returns:
- The value of the
countattribute
-
getUsers
- Specified by:
getUsersin interfaceReactionIF- Returns:
- The value of the
usersattribute
-
withName
Copy the current immutable object by setting a value for thenameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for name- Returns:
- A modified copy or the
thisobject
-
withCount
Copy the current immutable object by setting a value for thecountattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for count- Returns:
- A modified copy or the
thisobject
-
withUsers
Copy the current immutable object with elements that replace the content ofusers.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withUsers
Copy the current immutable object with elements that replace the content ofusers. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of users elements to set- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofReactionthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:name,count,users. -
toString
Prints the immutable valueReactionwith attribute values. -
copyOf
Creates an immutable copy of aReactionIFvalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable Reaction instance
-
builder
Creates a builder forReaction.Reaction.builder() .setName(String) // requiredname.setCount(int) // requiredcount.addUsers|addAllUsers(String) //userselements .build();- Returns:
- A new Reaction builder
-