Class SlackGroup
java.lang.Object
com.hubspot.slack.client.models.group.SlackGroup
- All Implemented Interfaces:
SlackGroupIF
@Generated(from="SlackGroupIF",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class SlackGroup
extends Object
implements SlackGroupIF
Immutable implementation of
SlackGroupIF.
Use the builder to create immutable instances:
SlackGroup.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic SlackGroup.Builderbuilder()Creates a builder forSlackGroup.static SlackGroupcopyOf(SlackGroupIF instance) Creates an immutable copy of aSlackGroupIFvalue.booleanThis instance is equal to all instances ofSlackGroupthat have equal attribute values.longgetId()getName()getTopic()inthashCode()Computes a hash code from attributes:id,name,createdEpochSeconds,creatorId,archived,mpim,memberIds,topic,purpose,latest.booleanbooleanisMpim()toString()Prints the immutable valueSlackGroupwith attribute values.final SlackGroupwithArchived(boolean value) Copy the current immutable object by setting a value for thearchivedattribute.final SlackGroupwithCreatedEpochSeconds(long value) Copy the current immutable object by setting a value for thecreatedEpochSecondsattribute.final SlackGroupwithCreatorId(String value) Copy the current immutable object by setting a value for thecreatorIdattribute.final SlackGroupCopy the current immutable object by setting a value for theidattribute.final SlackGroupwithLatest(Message value) Copy the current immutable object by setting a present value for the optionallatestattribute.final SlackGroupwithLatest(Optional<? extends Message> optional) Copy the current immutable object by setting an optional value for thelatestattribute.final SlackGroupwithMemberIds(Iterable<String> elements) Copy the current immutable object with elements that replace the content ofmemberIds.final SlackGroupwithMemberIds(String... elements) Copy the current immutable object with elements that replace the content ofmemberIds.final SlackGroupwithMpim(boolean value) Copy the current immutable object by setting a value for thempimattribute.final SlackGroupCopy the current immutable object by setting a value for thenameattribute.final SlackGroupwithPurpose(ChannelMetadata value) Copy the current immutable object by setting a value for thepurposeattribute.final SlackGroupwithTopic(ChannelMetadata value) Copy the current immutable object by setting a value for thetopicattribute.
-
Method Details
-
getId
- Specified by:
getIdin interfaceSlackGroupIF- Returns:
- The value of the
idattribute
-
getName
- Specified by:
getNamein interfaceSlackGroupIF- Returns:
- The value of the
nameattribute
-
getCreatedEpochSeconds
public long getCreatedEpochSeconds()- Specified by:
getCreatedEpochSecondsin interfaceSlackGroupIF- Returns:
- The value of the
createdEpochSecondsattribute
-
getCreatorId
- Specified by:
getCreatorIdin interfaceSlackGroupIF- Returns:
- The value of the
creatorIdattribute
-
isArchived
public boolean isArchived()- Specified by:
isArchivedin interfaceSlackGroupIF- Returns:
- The value of the
archivedattribute
-
isMpim
public boolean isMpim()- Specified by:
isMpimin interfaceSlackGroupIF- Returns:
- The value of the
mpimattribute
-
getMemberIds
- Specified by:
getMemberIdsin interfaceSlackGroupIF- Returns:
- The value of the
memberIdsattribute
-
getTopic
- Specified by:
getTopicin interfaceSlackGroupIF- Returns:
- The value of the
topicattribute
-
getPurpose
- Specified by:
getPurposein interfaceSlackGroupIF- Returns:
- The value of the
purposeattribute
-
getLatest
- Specified by:
getLatestin interfaceSlackGroupIF- Returns:
- The value of the
latestattribute
-
withId
Copy the current immutable object by setting a value for theidattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for id- Returns:
- A modified copy or the
thisobject
-
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
-
withCreatedEpochSeconds
Copy the current immutable object by setting a value for thecreatedEpochSecondsattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for createdEpochSeconds- Returns:
- A modified copy or the
thisobject
-
withCreatorId
Copy the current immutable object by setting a value for thecreatorIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for creatorId- Returns:
- A modified copy or the
thisobject
-
withArchived
Copy the current immutable object by setting a value for thearchivedattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for archived- Returns:
- A modified copy or the
thisobject
-
withMpim
Copy the current immutable object by setting a value for thempimattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for mpim- Returns:
- A modified copy or the
thisobject
-
withMemberIds
Copy the current immutable object with elements that replace the content ofmemberIds.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withMemberIds
Copy the current immutable object with elements that replace the content ofmemberIds. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of memberIds elements to set- Returns:
- A modified copy or
thisif not changed
-
withTopic
Copy the current immutable object by setting a value for thetopicattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for topic- Returns:
- A modified copy or the
thisobject
-
withPurpose
Copy the current immutable object by setting a value for thepurposeattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for purpose- Returns:
- A modified copy or the
thisobject
-
withLatest
Copy the current immutable object by setting a present value for the optionallatestattribute.- Parameters:
value- The value for latest,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withLatest
Copy the current immutable object by setting an optional value for thelatestattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for latest- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofSlackGroupthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:id,name,createdEpochSeconds,creatorId,archived,mpim,memberIds,topic,purpose,latest. -
toString
Prints the immutable valueSlackGroupwith attribute values. -
copyOf
Creates an immutable copy of aSlackGroupIFvalue. 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 SlackGroup instance
-
builder
Creates a builder forSlackGroup.SlackGroup.builder() .setId(String) // requiredid.setName(String) // requiredname.setCreatedEpochSeconds(long) // requiredcreatedEpochSeconds.setCreatorId(String) // requiredcreatorId.setArchived(boolean) // requiredarchived.setMpim(boolean) // requiredmpim.addMemberIds|addAllMemberIds(String) //memberIdselements .setTopic(com.hubspot.slack.client.models.ChannelMetadata) // requiredtopic.setPurpose(com.hubspot.slack.client.models.ChannelMetadata) // requiredpurpose.setLatest(Optional<com.hubspot.slack.client.models.Message>) // optionallatest.build();- Returns:
- A new SlackGroup builder
-