Class RichTextBroadcastElement.Style
java.lang.Object
com.hubspot.slack.client.models.blocks.elements.richtextelements.RichTextBroadcastElement.Style
- All Implemented Interfaces:
RichTextBroadcastElementIF.StyleIF
- Enclosing class:
RichTextBroadcastElement
@Generated(from="RichTextBroadcastElementIF.StyleIF",
generator="Immutables")
@Immutable
public static final class RichTextBroadcastElement.Style
extends Object
implements RichTextBroadcastElementIF.StyleIF
Immutable implementation of
RichTextBroadcastElementIF.StyleIF.
Use the builder to create immutable instances:
RichTextBroadcastElement.Style.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forStyle.copyOf(RichTextBroadcastElementIF.StyleIF instance) Creates an immutable copy of aRichTextBroadcastElementIF.StyleIFvalue.booleanThis instance is equal to all instances ofStylethat have equal attribute values.getBold()inthashCode()Computes a hash code from attributes:bold,italic,strike,underline.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.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.
-
Method Details
-
getBold
- Specified by:
getBoldin interfaceRichTextBroadcastElementIF.StyleIF- Returns:
- The value of the
boldattribute
-
getItalic
- Specified by:
getItalicin interfaceRichTextBroadcastElementIF.StyleIF- Returns:
- The value of the
italicattribute
-
getStrike
- Specified by:
getStrikein interfaceRichTextBroadcastElementIF.StyleIF- Returns:
- The value of the
strikeattribute
-
getUnderline
- Specified by:
getUnderlinein interfaceRichTextBroadcastElementIF.StyleIF- Returns:
- The value of the
underlineattribute
-
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
-
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
-
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,underline. -
toString
Prints the immutable valueStylewith attribute values. -
copyOf
Creates an immutable copy of aRichTextBroadcastElementIF.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.RichTextBroadcastElement.Style.builder() .setBold(Optional<Boolean>) // optionalbold.setItalic(Optional<Boolean>) // optionalitalic.setStrike(Optional<Boolean>) // optionalstrike.setUnderline(Optional<Boolean>) // optionalunderline.build();- Returns:
- A new Style builder
-