Class ContainerBlock
java.lang.Object
com.hubspot.slack.client.models.blocks.ContainerBlock
- All Implemented Interfaces:
BlockOrAttachment,Block,ContainerBlockIF,ChatUnfurlBlocksOrAttachment
@Generated(from="ContainerBlockIF",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class ContainerBlock
extends Object
implements ContainerBlockIF
Immutable implementation of
ContainerBlockIF.
Use the builder to create immutable instances:
ContainerBlock.builder().
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface com.hubspot.slack.client.models.blocks.ContainerBlockIF
TYPE -
Method Summary
Modifier and TypeMethodDescriptionstatic ContainerBlock.Builderbuilder()Creates a builder forContainerBlock.static ContainerBlockcopyOf(ContainerBlockIF instance) Creates an immutable copy of aContainerBlockIFvalue.booleanThis instance is equal to all instances ofContainerBlockthat have equal attribute values.com.google.common.collect.ImmutableList<ContainerChildBlock> getIcon()getTitle()getType()getWidth()inthashCode()Computes a hash code from attributes:blockId,type,title,richTextTitle,childBlocks,subtitle,icon,width,hasHeaderDivider,collapsible,defaultCollapsed.toString()Prints the immutable valueContainerBlockwith attribute values.final ContainerBlockwithBlockId(String value) Copy the current immutable object by setting a present value for the optionalblockIdattribute.final ContainerBlockwithBlockId(Optional<String> optional) Copy the current immutable object by setting an optional value for theblockIdattribute.final ContainerBlockwithChildBlocks(ContainerChildBlock... elements) Copy the current immutable object with elements that replace the content ofchildBlocks.final ContainerBlockwithChildBlocks(Iterable<? extends ContainerChildBlock> elements) Copy the current immutable object with elements that replace the content ofchildBlocks.final ContainerBlockwithCollapsible(Boolean value) Copy the current immutable object by setting a present value for the optionalcollapsibleattribute.final ContainerBlockwithCollapsible(Optional<Boolean> optional) Copy the current immutable object by setting an optional value for thecollapsibleattribute.final ContainerBlockwithDefaultCollapsed(Boolean value) Copy the current immutable object by setting a present value for the optionaldefaultCollapsedattribute.final ContainerBlockwithDefaultCollapsed(Optional<Boolean> optional) Copy the current immutable object by setting an optional value for thedefaultCollapsedattribute.final ContainerBlockwithHasHeaderDivider(Boolean value) Copy the current immutable object by setting a present value for the optionalhasHeaderDividerattribute.final ContainerBlockwithHasHeaderDivider(Optional<Boolean> optional) Copy the current immutable object by setting an optional value for thehasHeaderDividerattribute.final ContainerBlockCopy the current immutable object by setting a present value for the optionaliconattribute.final ContainerBlockCopy the current immutable object by setting an optional value for theiconattribute.final ContainerBlockwithRichTextTitle(RichTextBlock value) Copy the current immutable object by setting a present value for the optionalrichTextTitleattribute.final ContainerBlockwithRichTextTitle(Optional<? extends RichTextBlock> optional) Copy the current immutable object by setting an optional value for therichTextTitleattribute.final ContainerBlockwithSubtitle(Text value) Copy the current immutable object by setting a present value for the optionalsubtitleattribute.final ContainerBlockwithSubtitle(Optional<? extends Text> optional) Copy the current immutable object by setting an optional value for thesubtitleattribute.final ContainerBlockCopy the current immutable object by setting a present value for the optionaltitleattribute.final ContainerBlockCopy the current immutable object by setting an optional value for thetitleattribute.final ContainerBlockwithWidth(ContainerBlockWidth value) Copy the current immutable object by setting a present value for the optionalwidthattribute.final ContainerBlockwithWidth(Optional<? extends ContainerBlockWidth> optional) Copy the current immutable object by setting an optional value for thewidthattribute.Methods inherited from interface com.hubspot.slack.client.models.blocks.ContainerBlockIF
check
-
Method Details
-
getBlockId
- Specified by:
getBlockIdin interfaceBlock- Returns:
- The value of the
blockIdattribute
-
getType
- Specified by:
getTypein interfaceBlock- Specified by:
getTypein interfaceContainerBlockIF- Returns:
- The computed-at-construction value of the
typeattribute
-
getTitle
- Specified by:
getTitlein interfaceContainerBlockIF- Returns:
- The value of the
titleattribute
-
getRichTextTitle
- Specified by:
getRichTextTitlein interfaceContainerBlockIF- Returns:
- The value of the
richTextTitleattribute
-
getChildBlocks
- Specified by:
getChildBlocksin interfaceContainerBlockIF- Returns:
- The value of the
childBlocksattribute
-
getSubtitle
- Specified by:
getSubtitlein interfaceContainerBlockIF- Returns:
- The value of the
subtitleattribute
-
getIcon
- Specified by:
getIconin interfaceContainerBlockIF- Returns:
- The value of the
iconattribute
-
getWidth
- Specified by:
getWidthin interfaceContainerBlockIF- Returns:
- The value of the
widthattribute
-
getHasHeaderDivider
- Specified by:
getHasHeaderDividerin interfaceContainerBlockIF- Returns:
- The value of the
hasHeaderDividerattribute
-
isCollapsible
- Specified by:
isCollapsiblein interfaceContainerBlockIF- Returns:
- The value of the
collapsibleattribute
-
isDefaultCollapsed
- Specified by:
isDefaultCollapsedin interfaceContainerBlockIF- Returns:
- The value of the
defaultCollapsedattribute
-
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
-
withTitle
Copy the current immutable object by setting a present value for the optionaltitleattribute.- Parameters:
value- The value for title,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withTitle
Copy the current immutable object by setting an optional value for thetitleattribute. 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 title- Returns:
- A modified copy or
thisif not changed
-
withRichTextTitle
Copy the current immutable object by setting a present value for the optionalrichTextTitleattribute.- Parameters:
value- The value for richTextTitle,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withRichTextTitle
Copy the current immutable object by setting an optional value for therichTextTitleattribute. 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 richTextTitle- Returns:
- A modified copy or
thisif not changed
-
withChildBlocks
Copy the current immutable object with elements that replace the content ofchildBlocks.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withChildBlocks
Copy the current immutable object with elements that replace the content ofchildBlocks. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of childBlocks elements to set- Returns:
- A modified copy or
thisif not changed
-
withSubtitle
Copy the current immutable object by setting a present value for the optionalsubtitleattribute.- Parameters:
value- The value for subtitle,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withSubtitle
Copy the current immutable object by setting an optional value for thesubtitleattribute. 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 subtitle- Returns:
- A modified copy or
thisif not changed
-
withIcon
Copy the current immutable object by setting a present value for the optionaliconattribute.- Parameters:
value- The value for icon,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withIcon
Copy the current immutable object by setting an optional value for theiconattribute. 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 icon- Returns:
- A modified copy or
thisif not changed
-
withWidth
Copy the current immutable object by setting a present value for the optionalwidthattribute.- Parameters:
value- The value for width,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withWidth
Copy the current immutable object by setting an optional value for thewidthattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for width- Returns:
- A modified copy or
thisif not changed
-
withHasHeaderDivider
Copy the current immutable object by setting a present value for the optionalhasHeaderDividerattribute.- Parameters:
value- The value for hasHeaderDivider,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withHasHeaderDivider
Copy the current immutable object by setting an optional value for thehasHeaderDividerattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for hasHeaderDivider- Returns:
- A modified copy or
thisif not changed
-
withCollapsible
Copy the current immutable object by setting a present value for the optionalcollapsibleattribute.- Parameters:
value- The value for collapsible,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withCollapsible
Copy the current immutable object by setting an optional value for thecollapsibleattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for collapsible- Returns:
- A modified copy or
thisif not changed
-
withDefaultCollapsed
Copy the current immutable object by setting a present value for the optionaldefaultCollapsedattribute.- Parameters:
value- The value for defaultCollapsed,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withDefaultCollapsed
Copy the current immutable object by setting an optional value for thedefaultCollapsedattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for defaultCollapsed- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofContainerBlockthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:blockId,type,title,richTextTitle,childBlocks,subtitle,icon,width,hasHeaderDivider,collapsible,defaultCollapsed. -
toString
Prints the immutable valueContainerBlockwith attribute values. -
copyOf
Creates an immutable copy of aContainerBlockIFvalue. 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 ContainerBlock instance
-
builder
Creates a builder forContainerBlock.ContainerBlock.builder() .setBlockId(Optional<String>) // optionalblockId.setTitle(Optional<com.hubspot.slack.client.models.blocks.objects.Text>) // optionaltitle.setRichTextTitle(Optional<com.hubspot.slack.client.models.blocks.elements.richtextelements.RichTextBlock>) // optionalrichTextTitle.addChildBlocks|addAllChildBlocks(com.hubspot.slack.client.models.blocks.ContainerChildBlock) //childBlockselements .setSubtitle(Optional<com.hubspot.slack.client.models.blocks.objects.Text>) // optionalsubtitle.setIcon(Optional<com.hubspot.slack.client.models.blocks.elements.Image>) // optionalicon.setWidth(Optional<com.hubspot.slack.client.models.blocks.ContainerBlockWidth>) // optionalwidth.setHasHeaderDivider(Optional<Boolean>) // optionalhasHeaderDivider.setCollapsible(Optional<Boolean>) // optionalcollapsible.setDefaultCollapsed(Optional<Boolean>) // optionaldefaultCollapsed.build();- Returns:
- A new ContainerBlock builder
-