Class ChatPostMessageResponse
java.lang.Object
com.hubspot.slack.client.models.response.chat.ChatPostMessageResponse
- All Implemented Interfaces:
ChatPostMessageResponseIF,SlackResponse
@Generated(from="ChatPostMessageResponseIF",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class ChatPostMessageResponse
extends Object
implements ChatPostMessageResponseIF
Immutable implementation of
ChatPostMessageResponseIF.
Use the builder to create immutable instances:
ChatPostMessageResponse.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeChatPostMessageResponse. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forChatPostMessageResponse.static ChatPostMessageResponsecopyOf(ChatPostMessageResponseIF instance) Creates an immutable copy of aChatPostMessageResponseIFvalue.booleanThis instance is equal to all instances ofChatPostMessageResponsethat have equal attribute values.getTs()inthashCode()Computes a hash code from attributes:ok,responseMetadata,ts,channel,message.booleanisOk()toString()Prints the immutable valueChatPostMessageResponsewith attribute values.final ChatPostMessageResponsewithChannel(String value) Copy the current immutable object by setting a value for thechannelattribute.final ChatPostMessageResponsewithMessage(Map<String, ? extends Object> entries) Copy the current immutable object by replacing themessagemap with the specified map.final ChatPostMessageResponsewithOk(boolean value) Copy the current immutable object by setting a value for theokattribute.final ChatPostMessageResponseCopy the current immutable object by setting a present value for the optionalresponseMetadataattribute.final ChatPostMessageResponsewithResponseMetadata(Optional<? extends ResponseMetadata> optional) Copy the current immutable object by setting an optional value for theresponseMetadataattribute.final ChatPostMessageResponseCopy the current immutable object by setting a value for thetsattribute.
-
Method Details
-
isOk
public boolean isOk()- Specified by:
isOkin interfaceSlackResponse- Returns:
- The value of the
okattribute
-
getResponseMetadata
- Specified by:
getResponseMetadatain interfaceSlackResponse- Returns:
- The value of the
responseMetadataattribute
-
getTs
- Specified by:
getTsin interfaceChatPostMessageResponseIF- Returns:
- The value of the
tsattribute
-
getChannel
- Specified by:
getChannelin interfaceChatPostMessageResponseIF- Returns:
- The value of the
channelattribute
-
getMessage
- Specified by:
getMessagein interfaceChatPostMessageResponseIF- Returns:
- The value of the
messageattribute
-
withOk
Copy the current immutable object by setting a value for theokattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for ok- Returns:
- A modified copy or the
thisobject
-
withResponseMetadata
Copy the current immutable object by setting a present value for the optionalresponseMetadataattribute.- Parameters:
value- The value for responseMetadata,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withResponseMetadata
public final ChatPostMessageResponse withResponseMetadata(Optional<? extends ResponseMetadata> optional) Copy the current immutable object by setting an optional value for theresponseMetadataattribute. 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 responseMetadata- Returns:
- A modified copy or
thisif not changed
-
withTs
Copy the current immutable object by setting a value for thetsattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for ts- Returns:
- A modified copy or the
thisobject
-
withChannel
Copy the current immutable object by setting a value for thechannelattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for channel- Returns:
- A modified copy or the
thisobject
-
withMessage
Copy the current immutable object by replacing themessagemap with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
entries- The entries to replace the message map- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofChatPostMessageResponsethat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:ok,responseMetadata,ts,channel,message. -
toString
Prints the immutable valueChatPostMessageResponsewith attribute values. -
copyOf
Creates an immutable copy of aChatPostMessageResponseIFvalue. 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 ChatPostMessageResponse instance
-
builder
Creates a builder forChatPostMessageResponse.ChatPostMessageResponse.builder() .setOk(boolean) // requiredok.setResponseMetadata(Optional<ResponseMetadata>) // optionalresponseMetadata.setTs(String) // requiredts.setChannel(String) // requiredchannel.putMessage|putAllMessage(String => Object) //messagemappings .build();- Returns:
- A new ChatPostMessageResponse builder
-