Class RichTextBlock
java.lang.Object
com.hubspot.slack.client.models.blocks.elements.richtextelements.RichTextBlock
- All Implemented Interfaces:
BlockOrAttachment,Block,ContainerChildBlock,RichTextBlockIF,ChatUnfurlBlocksOrAttachment
@Generated(from="RichTextBlockIF",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class RichTextBlock
extends Object
implements RichTextBlockIF
Slack's Rich text block displays formatted, structured representation of text.
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface com.hubspot.slack.client.models.blocks.elements.richtextelements.RichTextBlockIF
TYPE -
Method Summary
Modifier and TypeMethodDescriptionstatic RichTextBlock.Builderbuilder()Creates a builder forRichTextBlock.static RichTextBlockcopyOf(RichTextBlockIF instance) Creates an immutable copy of aRichTextBlockIFvalue.booleanThis instance is equal to all instances ofRichTextBlockthat have equal attribute values.com.google.common.collect.ImmutableList<RichTextObject> getType()inthashCode()Computes a hash code from attributes:blockId,type,elements.toString()Prints the immutable valueRichTextBlockwith attribute values.final RichTextBlockwithBlockId(String value) Copy the current immutable object by setting a present value for the optionalblockIdattribute.final RichTextBlockwithBlockId(Optional<String> optional) Copy the current immutable object by setting an optional value for theblockIdattribute.final RichTextBlockwithElements(RichTextObject... elements) Copy the current immutable object with elements that replace the content ofelements.final RichTextBlockwithElements(Iterable<? extends RichTextObject> elements) Copy the current immutable object with elements that replace the content ofelements.
-
Method Details
-
getBlockId
- Specified by:
getBlockIdin interfaceBlock- Returns:
- The value of the
blockIdattribute
-
getType
- Specified by:
getTypein interfaceBlock- Specified by:
getTypein interfaceRichTextBlockIF- Returns:
- The computed-at-construction value of the
typeattribute
-
getElements
- Specified by:
getElementsin interfaceRichTextBlockIF- Returns:
- The value of the
elementsattribute
-
withBlockId
Copy the current immutable object by setting a present value for the optionalblockIdattribute.- Parameters:
value- The value for blockId,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withBlockId
Copy the current immutable object by setting an optional value for theblockIdattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for blockId- Returns:
- A modified copy or
thisif not changed
-
withElements
Copy the current immutable object with elements that replace the content ofelements.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withElements
Copy the current immutable object with elements that replace the content ofelements. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of elements elements to set- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofRichTextBlockthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:blockId,type,elements. -
toString
Prints the immutable valueRichTextBlockwith attribute values. -
copyOf
Creates an immutable copy of aRichTextBlockIFvalue. 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 RichTextBlock instance
-
builder
Creates a builder forRichTextBlock.RichTextBlock.builder() .setBlockId(Optional<String>) // optionalblockId.addElements|addAllElements(com.hubspot.slack.client.models.blocks.elements.richtextelements.RichTextObject) //elementselements .build();- Returns:
- A new RichTextBlock builder
-