Class RichTextChannelElement
java.lang.Object
com.hubspot.slack.client.models.blocks.elements.richtextelements.RichTextChannelElement
- All Implemented Interfaces:
BlockElement,RichTextChannelElementIF,RichTextElement
@Generated(from="RichTextChannelElementIF",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class RichTextChannelElement
extends Object
implements RichTextChannelElementIF
Immutable implementation of
RichTextChannelElementIF.
Use the builder to create immutable instances:
RichTextChannelElement.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeRichTextChannelElement.static final classImmutable implementation ofRichTextChannelElementIF.StyleIF.Nested classes/interfaces inherited from interface com.hubspot.slack.client.models.blocks.elements.richtextelements.RichTextChannelElementIF
RichTextChannelElementIF.StyleIF -
Field Summary
Fields inherited from interface com.hubspot.slack.client.models.blocks.elements.richtextelements.RichTextChannelElementIF
TYPE -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forRichTextChannelElement.static RichTextChannelElementcopyOf(RichTextChannelElementIF instance) Creates an immutable copy of aRichTextChannelElementIFvalue.booleanThis instance is equal to all instances ofRichTextChannelElementthat have equal attribute values.getStyle()getType()inthashCode()Computes a hash code from attributes:type,channelId,style.toString()Prints the immutable valueRichTextChannelElementwith attribute values.final RichTextChannelElementwithChannelId(String value) Copy the current immutable object by setting a value for thechannelIdattribute.final RichTextChannelElementCopy the current immutable object by setting a present value for the optionalstyleattribute.final RichTextChannelElementwithStyle(Optional<? extends RichTextChannelElementIF.StyleIF> optional) Copy the current immutable object by setting an optional value for thestyleattribute.
-
Method Details
-
getType
- Specified by:
getTypein interfaceBlockElement- Specified by:
getTypein interfaceRichTextChannelElementIF- Returns:
- The computed-at-construction value of the
typeattribute
-
getChannelId
- Specified by:
getChannelIdin interfaceRichTextChannelElementIF- Returns:
- The value of the
channelIdattribute
-
getStyle
- Specified by:
getStylein interfaceRichTextChannelElementIF- Returns:
- The value of the
styleattribute
-
withChannelId
Copy the current immutable object by setting a value for thechannelIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for channelId- Returns:
- A modified copy or the
thisobject
-
withStyle
Copy the current immutable object by setting a present value for the optionalstyleattribute.- Parameters:
value- The value for style,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withStyle
public final RichTextChannelElement withStyle(Optional<? extends RichTextChannelElementIF.StyleIF> optional) Copy the current immutable object by setting an optional value for thestyleattribute. 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 style- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofRichTextChannelElementthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:type,channelId,style. -
toString
Prints the immutable valueRichTextChannelElementwith attribute values. -
copyOf
Creates an immutable copy of aRichTextChannelElementIFvalue. 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 RichTextChannelElement instance
-
builder
Creates a builder forRichTextChannelElement.RichTextChannelElement.builder() .setChannelId(String) // requiredchannelId.setStyle(Optional<com.hubspot.slack.client.models.blocks.elements.richtextelements.RichTextChannelElementIF.StyleIF>) // optionalstyle.build();- Returns:
- A new RichTextChannelElement builder
-