Class ChatPostMessageParams
java.lang.Object
com.hubspot.slack.client.methods.params.chat.AbstractChatMessageParams
com.hubspot.slack.client.methods.params.chat.AbstractChatPostMessageParams
com.hubspot.slack.client.methods.params.chat.ChatPostMessageParams
- All Implemented Interfaces:
HasChannel,MessageParams
@Generated(from="AbstractChatPostMessageParams",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class ChatPostMessageParams
extends AbstractChatPostMessageParams
Immutable implementation of
AbstractChatPostMessageParams.
Use the builder to create immutable instances:
ChatPostMessageParams.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeChatPostMessageParams. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forChatPostMessageParams.static ChatPostMessageParamscopyOf(AbstractChatPostMessageParams instance) Creates an immutable copy of aAbstractChatPostMessageParamsvalue.booleanThis instance is equal to all instances ofChatPostMessageParamsthat have equal attribute values.getText()inthashCode()Computes a hash code from attributes:attachments,blocks,channelId,text,threadTs,username,asUser,iconEmoji,iconUrl,linkNames,unfurlLinks,unfurlMedia,replyBroadcast.toString()Prints the immutable valueChatPostMessageParamswith attribute values.final ChatPostMessageParamswithAsUser(Boolean value) Copy the current immutable object by setting a present value for the optionalasUserattribute.final ChatPostMessageParamswithAsUser(Optional<Boolean> optional) Copy the current immutable object by setting an optional value for theasUserattribute.final ChatPostMessageParamswithAttachments(Attachment... elements) Copy the current immutable object with elements that replace the content ofattachments.final ChatPostMessageParamswithAttachments(Iterable<? extends Attachment> elements) Copy the current immutable object with elements that replace the content ofattachments.final ChatPostMessageParamswithBlocks(Block... elements) Copy the current immutable object with elements that replace the content ofblocks.final ChatPostMessageParamswithBlocks(Iterable<? extends Block> elements) Copy the current immutable object with elements that replace the content ofblocks.final ChatPostMessageParamswithChannelId(String value) Copy the current immutable object by setting a value for thechannelIdattribute.final ChatPostMessageParamswithIconEmoji(String value) Copy the current immutable object by setting a present value for the optionaliconEmojiattribute.final ChatPostMessageParamswithIconEmoji(Optional<String> optional) Copy the current immutable object by setting an optional value for theiconEmojiattribute.final ChatPostMessageParamswithIconUrl(String value) Copy the current immutable object by setting a present value for the optionaliconUrlattribute.final ChatPostMessageParamswithIconUrl(Optional<String> optional) Copy the current immutable object by setting an optional value for theiconUrlattribute.final ChatPostMessageParamswithLinkNames(Boolean value) Copy the current immutable object by setting a present value for the optionallinkNamesattribute.final ChatPostMessageParamswithLinkNames(Optional<Boolean> optional) Copy the current immutable object by setting an optional value for thelinkNamesattribute.final ChatPostMessageParamswithReplyBroadcast(Boolean value) Copy the current immutable object by setting a present value for the optionalreplyBroadcastattribute.final ChatPostMessageParamswithReplyBroadcast(Optional<Boolean> optional) Copy the current immutable object by setting an optional value for thereplyBroadcastattribute.final ChatPostMessageParamsCopy the current immutable object by setting a present value for the optionaltextattribute.final ChatPostMessageParamsCopy the current immutable object by setting an optional value for thetextattribute.final ChatPostMessageParamswithThreadTs(String value) Copy the current immutable object by setting a present value for the optionalthreadTsattribute.final ChatPostMessageParamswithThreadTs(Optional<String> optional) Copy the current immutable object by setting an optional value for thethreadTsattribute.final ChatPostMessageParamswithUnfurlLinks(Boolean value) Copy the current immutable object by setting a present value for the optionalunfurlLinksattribute.final ChatPostMessageParamswithUnfurlLinks(Optional<Boolean> optional) Copy the current immutable object by setting an optional value for theunfurlLinksattribute.final ChatPostMessageParamswithUnfurlMedia(Boolean value) Copy the current immutable object by setting a present value for the optionalunfurlMediaattribute.final ChatPostMessageParamswithUnfurlMedia(Optional<Boolean> optional) Copy the current immutable object by setting an optional value for theunfurlMediaattribute.final ChatPostMessageParamswithUsername(String value) Copy the current immutable object by setting a present value for the optionalusernameattribute.final ChatPostMessageParamswithUsername(Optional<String> optional) Copy the current immutable object by setting an optional value for theusernameattribute.Methods inherited from class com.hubspot.slack.client.methods.params.chat.AbstractChatMessageParams
check
-
Method Details
-
getAttachments
- Returns:
- The value of the
attachmentsattribute
-
getBlocks
- Returns:
- The value of the
blocksattribute
-
getChannelId
- Specified by:
getChannelIdin interfaceHasChannel- Specified by:
getChannelIdin classAbstractChatMessageParams- Returns:
- The value of the
channelIdattribute
-
getText
- Specified by:
getTextin interfaceMessageParams- Specified by:
getTextin classAbstractChatMessageParams- Returns:
- The value of the
textattribute
-
getThreadTs
- Specified by:
getThreadTsin classAbstractChatMessageParams- Returns:
- The value of the
threadTsattribute
-
getUsername
- Specified by:
getUsernamein classAbstractChatMessageParams- Returns:
- The value of the
usernameattribute
-
getAsUser
- Specified by:
getAsUserin classAbstractChatMessageParams- Returns:
- The value of the
asUserattribute
-
getIconEmoji
- Specified by:
getIconEmojiin classAbstractChatMessageParams- Returns:
- The value of the
iconEmojiattribute
-
getIconUrl
- Specified by:
getIconUrlin classAbstractChatMessageParams- Returns:
- The value of the
iconUrlattribute
-
getLinkNames
- Specified by:
getLinkNamesin classAbstractChatMessageParams- Returns:
- The value of the
linkNamesattribute
-
getUnfurlLinks
- Specified by:
getUnfurlLinksin classAbstractChatMessageParams- Returns:
- The value of the
unfurlLinksattribute
-
getUnfurlMedia
- Specified by:
getUnfurlMediain classAbstractChatMessageParams- Returns:
- The value of the
unfurlMediaattribute
-
getReplyBroadcast
- Specified by:
getReplyBroadcastin classAbstractChatMessageParams- Returns:
- The value of the
replyBroadcastattribute
-
withAttachments
Copy the current immutable object with elements that replace the content ofattachments.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withAttachments
Copy the current immutable object with elements that replace the content ofattachments. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of attachments elements to set- Returns:
- A modified copy or
thisif not changed
-
withBlocks
Copy the current immutable object with elements that replace the content ofblocks.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withBlocks
Copy the current immutable object with elements that replace the content ofblocks. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of blocks elements to set- Returns:
- A modified copy or
thisif not changed
-
withChannelId
Copy the current immutable object by setting a value for thechannelIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for channelId- Returns:
- A modified copy or the
thisobject
-
withText
Copy the current immutable object by setting a present value for the optionaltextattribute.- Parameters:
value- The value for text,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withText
Copy the current immutable object by setting an optional value for thetextattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for text- Returns:
- A modified copy or
thisif not changed
-
withThreadTs
Copy the current immutable object by setting a present value for the optionalthreadTsattribute.- Parameters:
value- The value for threadTs,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withThreadTs
Copy the current immutable object by setting an optional value for thethreadTsattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for threadTs- Returns:
- A modified copy or
thisif not changed
-
withUsername
Copy the current immutable object by setting a present value for the optionalusernameattribute.- Parameters:
value- The value for username,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withUsername
Copy the current immutable object by setting an optional value for theusernameattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for username- Returns:
- A modified copy or
thisif not changed
-
withAsUser
Copy the current immutable object by setting a present value for the optionalasUserattribute.- Parameters:
value- The value for asUser,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withAsUser
Copy the current immutable object by setting an optional value for theasUserattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for asUser- Returns:
- A modified copy or
thisif not changed
-
withIconEmoji
Copy the current immutable object by setting a present value for the optionaliconEmojiattribute.- Parameters:
value- The value for iconEmoji,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withIconEmoji
Copy the current immutable object by setting an optional value for theiconEmojiattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for iconEmoji- Returns:
- A modified copy or
thisif not changed
-
withIconUrl
Copy the current immutable object by setting a present value for the optionaliconUrlattribute.- Parameters:
value- The value for iconUrl,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withIconUrl
Copy the current immutable object by setting an optional value for theiconUrlattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for iconUrl- Returns:
- A modified copy or
thisif not changed
-
withLinkNames
Copy the current immutable object by setting a present value for the optionallinkNamesattribute.- Parameters:
value- The value for linkNames,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withLinkNames
Copy the current immutable object by setting an optional value for thelinkNamesattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for linkNames- Returns:
- A modified copy or
thisif not changed
-
withUnfurlLinks
Copy the current immutable object by setting a present value for the optionalunfurlLinksattribute.- Parameters:
value- The value for unfurlLinks,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withUnfurlLinks
Copy the current immutable object by setting an optional value for theunfurlLinksattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for unfurlLinks- Returns:
- A modified copy or
thisif not changed
-
withUnfurlMedia
Copy the current immutable object by setting a present value for the optionalunfurlMediaattribute.- Parameters:
value- The value for unfurlMedia,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withUnfurlMedia
Copy the current immutable object by setting an optional value for theunfurlMediaattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for unfurlMedia- Returns:
- A modified copy or
thisif not changed
-
withReplyBroadcast
Copy the current immutable object by setting a present value for the optionalreplyBroadcastattribute.- Parameters:
value- The value for replyBroadcast,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withReplyBroadcast
Copy the current immutable object by setting an optional value for thereplyBroadcastattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for replyBroadcast- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofChatPostMessageParamsthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:attachments,blocks,channelId,text,threadTs,username,asUser,iconEmoji,iconUrl,linkNames,unfurlLinks,unfurlMedia,replyBroadcast. -
toString
Prints the immutable valueChatPostMessageParamswith attribute values. -
copyOf
Creates an immutable copy of aAbstractChatPostMessageParamsvalue. 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 ChatPostMessageParams instance
-
builder
Creates a builder forChatPostMessageParams.ChatPostMessageParams.builder() .addAttachments|addAllAttachments(com.hubspot.slack.client.models.Attachment) //attachmentselements .addBlocks|addAllBlocks(com.hubspot.slack.client.models.blocks.Block) //blockselements .setChannelId(String) // requiredchannelId.setText(Optional<String>) // optionaltext.setThreadTs(Optional<String>) // optionalthreadTs.setUsername(Optional<String>) // optionalusername.setAsUser(Optional<Boolean>) // optionalasUser.setIconEmoji(Optional<String>) // optionaliconEmoji.setIconUrl(Optional<String>) // optionaliconUrl.setLinkNames(Optional<Boolean>) // optionallinkNames.setUnfurlLinks(Optional<Boolean>) // optionalunfurlLinks.setUnfurlMedia(Optional<Boolean>) // optionalunfurlMedia.setReplyBroadcast(Optional<Boolean>) // optionalreplyBroadcast.build();- Returns:
- A new ChatPostMessageParams builder
-