Class MarkdownBlock
java.lang.Object
com.hubspot.slack.client.models.blocks.MarkdownBlock
- All Implemented Interfaces:
BlockOrAttachment,Block,MarkdownBlockIF,ChatUnfurlBlocksOrAttachment
@Generated(from="MarkdownBlockIF",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class MarkdownBlock
extends Object
implements MarkdownBlockIF
Slack's markdown block type renders standard Markdown natively (e.g. **bold**, ## headings).
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface com.hubspot.slack.client.models.blocks.MarkdownBlockIF
TYPE -
Method Summary
Modifier and TypeMethodDescriptionstatic MarkdownBlock.Builderbuilder()Creates a builder forMarkdownBlock.static MarkdownBlockcopyOf(MarkdownBlockIF instance) Creates an immutable copy of aMarkdownBlockIFvalue.booleanThis instance is equal to all instances ofMarkdownBlockthat have equal attribute values.getText()The standard markdown-formatted text.getType()inthashCode()Computes a hash code from attributes:blockId,type,text.static MarkdownBlockConstruct a new immutableMarkdownBlockinstance.toString()Prints the immutable valueMarkdownBlockwith attribute values.final MarkdownBlockwithBlockId(String value) Copy the current immutable object by setting a present value for the optionalblockIdattribute.final MarkdownBlockwithBlockId(Optional<String> optional) Copy the current immutable object by setting an optional value for theblockIdattribute.final MarkdownBlockCopy the current immutable object by setting a value for thetextattribute.
-
Method Details
-
getBlockId
- Specified by:
getBlockIdin interfaceBlock- Returns:
- The value of the
blockIdattribute
-
getType
- Specified by:
getTypein interfaceBlock- Specified by:
getTypein interfaceMarkdownBlockIF- Returns:
- The computed-at-construction value of the
typeattribute
-
getText
The standard markdown-formatted text. The cumulative limit for all markdown blocks in a single payload is 12,000 characters.- Specified by:
getTextin interfaceMarkdownBlockIF
-
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
-
withText
Copy the current immutable object by setting a value for thetextattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for text- Returns:
- A modified copy or the
thisobject
-
equals
This instance is equal to all instances ofMarkdownBlockthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:blockId,type,text. -
toString
Prints the immutable valueMarkdownBlockwith attribute values. -
of
Construct a new immutableMarkdownBlockinstance.- Parameters:
text- The value for thetextattribute- Returns:
- An immutable MarkdownBlock instance
-
copyOf
Creates an immutable copy of aMarkdownBlockIFvalue. 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 MarkdownBlock instance
-
builder
Creates a builder forMarkdownBlock.MarkdownBlock.builder() .setBlockId(Optional<String>) // optionalblockId.setText(String) // requiredtext.build();- Returns:
- A new MarkdownBlock builder
-