Class RichTextChannelElement.Style
java.lang.Object
com.hubspot.slack.client.models.blocks.elements.richtextelements.RichTextChannelElement.Style
- All Implemented Interfaces:
RichTextChannelElementIF.StyleIF
- Enclosing class:
RichTextChannelElement
@Generated(from="RichTextChannelElementIF.StyleIF",
generator="Immutables")
@Immutable
public static final class RichTextChannelElement.Style
extends Object
implements RichTextChannelElementIF.StyleIF
Immutable implementation of
RichTextChannelElementIF.StyleIF.
Use the builder to create immutable instances:
RichTextChannelElement.Style.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forStyle.static RichTextChannelElement.StylecopyOf(RichTextChannelElementIF.StyleIF instance) Creates an immutable copy of aRichTextChannelElementIF.StyleIFvalue.booleanThis instance is equal to all instances ofStylethat have equal attribute values.getBold()inthashCode()Computes a hash code from attributes:bold,italic,strike,highlight,clientHighlight,underline,unlink.toString()Prints the immutable valueStylewith attribute values.Copy the current immutable object by setting a present value for the optionalboldattribute.Copy the current immutable object by setting an optional value for theboldattribute.withClientHighlight(Boolean value) Copy the current immutable object by setting a present value for the optionalclientHighlightattribute.withClientHighlight(Optional<Boolean> optional) Copy the current immutable object by setting an optional value for theclientHighlightattribute.withHighlight(Boolean value) Copy the current immutable object by setting a present value for the optionalhighlightattribute.withHighlight(Optional<Boolean> optional) Copy the current immutable object by setting an optional value for thehighlightattribute.withItalic(Boolean value) Copy the current immutable object by setting a present value for the optionalitalicattribute.withItalic(Optional<Boolean> optional) Copy the current immutable object by setting an optional value for theitalicattribute.withStrike(Boolean value) Copy the current immutable object by setting a present value for the optionalstrikeattribute.withStrike(Optional<Boolean> optional) Copy the current immutable object by setting an optional value for thestrikeattribute.withUnderline(Boolean value) Copy the current immutable object by setting a present value for the optionalunderlineattribute.withUnderline(Optional<Boolean> optional) Copy the current immutable object by setting an optional value for theunderlineattribute.withUnlink(Boolean value) Copy the current immutable object by setting a present value for the optionalunlinkattribute.withUnlink(Optional<Boolean> optional) Copy the current immutable object by setting an optional value for theunlinkattribute.
-
Method Details
-
getBold
- Specified by:
getBoldin interfaceRichTextChannelElementIF.StyleIF- Returns:
- The value of the
boldattribute
-
getItalic
- Specified by:
getItalicin interfaceRichTextChannelElementIF.StyleIF- Returns:
- The value of the
italicattribute
-
getStrike
- Specified by:
getStrikein interfaceRichTextChannelElementIF.StyleIF- Returns:
- The value of the
strikeattribute
-
getHighlight
- Specified by:
getHighlightin interfaceRichTextChannelElementIF.StyleIF- Returns:
- The value of the
highlightattribute
-
getClientHighlight
- Specified by:
getClientHighlightin interfaceRichTextChannelElementIF.StyleIF- Returns:
- The value of the
clientHighlightattribute
-
getUnderline
- Specified by:
getUnderlinein interfaceRichTextChannelElementIF.StyleIF- Returns:
- The value of the
underlineattribute
-
getUnlink
- Specified by:
getUnlinkin interfaceRichTextChannelElementIF.StyleIF- Returns:
- The value of the
unlinkattribute
-
withBold
Copy the current immutable object by setting a present value for the optionalboldattribute.- Parameters:
value- The value for bold,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withBold
Copy the current immutable object by setting an optional value for theboldattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for bold- Returns:
- A modified copy or
thisif not changed
-
withItalic
Copy the current immutable object by setting a present value for the optionalitalicattribute.- Parameters:
value- The value for italic,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withItalic
Copy the current immutable object by setting an optional value for theitalicattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for italic- Returns:
- A modified copy or
thisif not changed
-
withStrike
Copy the current immutable object by setting a present value for the optionalstrikeattribute.- Parameters:
value- The value for strike,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withStrike
Copy the current immutable object by setting an optional value for thestrikeattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for strike- Returns:
- A modified copy or
thisif not changed
-
withHighlight
Copy the current immutable object by setting a present value for the optionalhighlightattribute.- Parameters:
value- The value for highlight,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withHighlight
Copy the current immutable object by setting an optional value for thehighlightattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for highlight- Returns:
- A modified copy or
thisif not changed
-
withClientHighlight
Copy the current immutable object by setting a present value for the optionalclientHighlightattribute.- Parameters:
value- The value for clientHighlight,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withClientHighlight
Copy the current immutable object by setting an optional value for theclientHighlightattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for clientHighlight- Returns:
- A modified copy or
thisif not changed
-
withUnderline
Copy the current immutable object by setting a present value for the optionalunderlineattribute.- Parameters:
value- The value for underline,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withUnderline
Copy the current immutable object by setting an optional value for theunderlineattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for underline- Returns:
- A modified copy or
thisif not changed
-
withUnlink
Copy the current immutable object by setting a present value for the optionalunlinkattribute.- Parameters:
value- The value for unlink,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withUnlink
Copy the current immutable object by setting an optional value for theunlinkattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for unlink- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofStylethat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:bold,italic,strike,highlight,clientHighlight,underline,unlink. -
toString
Prints the immutable valueStylewith attribute values. -
copyOf
Creates an immutable copy of aRichTextChannelElementIF.StyleIFvalue. 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 Style instance
-
builder
Creates a builder forStyle.RichTextChannelElement.Style.builder() .setBold(Optional<Boolean>) // optionalbold.setItalic(Optional<Boolean>) // optionalitalic.setStrike(Optional<Boolean>) // optionalstrike.setHighlight(Optional<Boolean>) // optionalhighlight.setClientHighlight(Optional<Boolean>) // optionalclientHighlight.setUnderline(Optional<Boolean>) // optionalunderline.setUnlink(Optional<Boolean>) // optionalunlink.build();- Returns:
- A new Style builder
-