Class TopLevelMessageInteractionResponse
java.lang.Object
com.hubspot.slack.client.models.interaction.TopLevelMessageInteractionResponse
- All Implemented Interfaces:
TopLevelMessageInteractionResponseIF
@Generated(from="TopLevelMessageInteractionResponseIF",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class TopLevelMessageInteractionResponse
extends Object
implements TopLevelMessageInteractionResponseIF
Immutable implementation of
TopLevelMessageInteractionResponseIF.
Use the builder to create immutable instances:
TopLevelMessageInteractionResponse.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeTopLevelMessageInteractionResponse. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forTopLevelMessageInteractionResponse.copyOf(TopLevelMessageInteractionResponseIF instance) Creates an immutable copy of aTopLevelMessageInteractionResponseIFvalue.booleanThis instance is equal to all instances ofTopLevelMessageInteractionResponsethat have equal attribute values.booleanbooleangetText()inthashCode()Computes a hash code from attributes:responseType,replaceOriginal,deleteOriginal,text,attachments,blocks.toString()Prints the immutable valueTopLevelMessageInteractionResponsewith attribute values.withAttachments(Attachment... elements) Copy the current immutable object with elements that replace the content ofattachments.withAttachments(Iterable<? extends Attachment> elements) Copy the current immutable object with elements that replace the content ofattachments.withBlocks(Block... elements) Copy the current immutable object with elements that replace the content ofblocks.withBlocks(Iterable<? extends Block> elements) Copy the current immutable object with elements that replace the content ofblocks.withDeleteOriginal(boolean value) Copy the current immutable object by setting a value for thedeleteOriginalattribute.withReplaceOriginal(boolean value) Copy the current immutable object by setting a value for thereplaceOriginalattribute.Copy the current immutable object by setting a value for theresponseTypeattribute.Copy the current immutable object by setting a present value for the optionaltextattribute.Copy the current immutable object by setting an optional value for thetextattribute.Methods inherited from interface com.hubspot.slack.client.models.interaction.TopLevelMessageInteractionResponseIF
check
-
Method Details
-
getResponseType
- Specified by:
getResponseTypein interfaceTopLevelMessageInteractionResponseIF- Returns:
- The value of the
responseTypeattribute
-
getReplaceOriginal
public boolean getReplaceOriginal()- Specified by:
getReplaceOriginalin interfaceTopLevelMessageInteractionResponseIF- Returns:
- The value of the
replaceOriginalattribute
-
getDeleteOriginal
public boolean getDeleteOriginal()- Specified by:
getDeleteOriginalin interfaceTopLevelMessageInteractionResponseIF- Returns:
- The value of the
deleteOriginalattribute
-
getText
- Specified by:
getTextin interfaceTopLevelMessageInteractionResponseIF- Returns:
- The value of the
textattribute
-
getAttachments
- Specified by:
getAttachmentsin interfaceTopLevelMessageInteractionResponseIF- Returns:
- The value of the
attachmentsattribute
-
getBlocks
- Specified by:
getBlocksin interfaceTopLevelMessageInteractionResponseIF- Returns:
- The value of the
blocksattribute
-
withResponseType
Copy the current immutable object by setting a value for theresponseTypeattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for responseType- Returns:
- A modified copy or the
thisobject
-
withReplaceOriginal
Copy the current immutable object by setting a value for thereplaceOriginalattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for replaceOriginal- Returns:
- A modified copy or the
thisobject
-
withDeleteOriginal
Copy the current immutable object by setting a value for thedeleteOriginalattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for deleteOriginal- 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
-
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
public final TopLevelMessageInteractionResponse withAttachments(Iterable<? extends Attachment> elements) 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
-
equals
This instance is equal to all instances ofTopLevelMessageInteractionResponsethat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:responseType,replaceOriginal,deleteOriginal,text,attachments,blocks. -
toString
Prints the immutable valueTopLevelMessageInteractionResponsewith attribute values. -
copyOf
public static TopLevelMessageInteractionResponse copyOf(TopLevelMessageInteractionResponseIF instance) Creates an immutable copy of aTopLevelMessageInteractionResponseIFvalue. 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 TopLevelMessageInteractionResponse instance
-
builder
Creates a builder forTopLevelMessageInteractionResponse.TopLevelMessageInteractionResponse.builder() .setResponseType(com.hubspot.slack.client.models.TopLevelMessageResponseType) // requiredresponseType.setReplaceOriginal(boolean) // requiredreplaceOriginal.setDeleteOriginal(boolean) // optionaldeleteOriginal.setText(Optional<String>) // optionaltext.addAttachments|addAllAttachments(com.hubspot.slack.client.models.Attachment) //attachmentselements .addBlocks|addAllBlocks(com.hubspot.slack.client.models.blocks.Block) //blockselements .build();- Returns:
- A new TopLevelMessageInteractionResponse builder
-