Class RichTextBroadcastElement
java.lang.Object
com.hubspot.slack.client.models.blocks.elements.richtextelements.RichTextBroadcastElement
- All Implemented Interfaces:
BlockElement,RichTextBroadcastElementIF,RichTextElement
@Generated(from="RichTextBroadcastElementIF",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class RichTextBroadcastElement
extends Object
implements RichTextBroadcastElementIF
Immutable implementation of
RichTextBroadcastElementIF.
Use the builder to create immutable instances:
RichTextBroadcastElement.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeRichTextBroadcastElement.static final classImmutable implementation ofRichTextBroadcastElementIF.StyleIF.Nested classes/interfaces inherited from interface com.hubspot.slack.client.models.blocks.elements.richtextelements.RichTextBroadcastElementIF
RichTextBroadcastElementIF.StyleIF -
Field Summary
Fields inherited from interface com.hubspot.slack.client.models.blocks.elements.richtextelements.RichTextBroadcastElementIF
TYPE -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forRichTextBroadcastElement.static RichTextBroadcastElementcopyOf(RichTextBroadcastElementIF instance) Creates an immutable copy of aRichTextBroadcastElementIFvalue.booleanThis instance is equal to all instances ofRichTextBroadcastElementthat have equal attribute values.getRange()getStyle()getType()inthashCode()Computes a hash code from attributes:type,range,style.toString()Prints the immutable valueRichTextBroadcastElementwith attribute values.final RichTextBroadcastElementwithRange(RichTextBroadcastRange value) Copy the current immutable object by setting a value for therangeattribute.final RichTextBroadcastElementCopy the current immutable object by setting a present value for the optionalstyleattribute.final RichTextBroadcastElementwithStyle(Optional<? extends RichTextBroadcastElementIF.StyleIF> optional) Copy the current immutable object by setting an optional value for thestyleattribute.
-
Method Details
-
getType
- Specified by:
getTypein interfaceBlockElement- Specified by:
getTypein interfaceRichTextBroadcastElementIF- Returns:
- The computed-at-construction value of the
typeattribute
-
getRange
- Specified by:
getRangein interfaceRichTextBroadcastElementIF- Returns:
- The value of the
rangeattribute
-
getStyle
- Specified by:
getStylein interfaceRichTextBroadcastElementIF- Returns:
- The value of the
styleattribute
-
withRange
Copy the current immutable object by setting a value for therangeattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for range- 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 RichTextBroadcastElement withStyle(Optional<? extends RichTextBroadcastElementIF.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 ofRichTextBroadcastElementthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:type,range,style. -
toString
Prints the immutable valueRichTextBroadcastElementwith attribute values. -
copyOf
Creates an immutable copy of aRichTextBroadcastElementIFvalue. 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 RichTextBroadcastElement instance
-
builder
Creates a builder forRichTextBroadcastElement.RichTextBroadcastElement.builder() .setRange(com.hubspot.slack.client.models.blocks.elements.richtextelements.RichTextBroadcastRange) // requiredrange.setStyle(Optional<com.hubspot.slack.client.models.blocks.elements.richtextelements.RichTextBroadcastElementIF.StyleIF>) // optionalstyle.build();- Returns:
- A new RichTextBroadcastElement builder
-