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().

  • Method Details

    • getBold

      public Optional<Boolean> getBold()
      Specified by:
      getBold in interface RichTextChannelElementIF.StyleIF
      Returns:
      The value of the bold attribute
    • getItalic

      public Optional<Boolean> getItalic()
      Specified by:
      getItalic in interface RichTextChannelElementIF.StyleIF
      Returns:
      The value of the italic attribute
    • getStrike

      public Optional<Boolean> getStrike()
      Specified by:
      getStrike in interface RichTextChannelElementIF.StyleIF
      Returns:
      The value of the strike attribute
    • getHighlight

      public Optional<Boolean> getHighlight()
      Specified by:
      getHighlight in interface RichTextChannelElementIF.StyleIF
      Returns:
      The value of the highlight attribute
    • getClientHighlight

      public Optional<Boolean> getClientHighlight()
      Specified by:
      getClientHighlight in interface RichTextChannelElementIF.StyleIF
      Returns:
      The value of the clientHighlight attribute
    • getUnderline

      public Optional<Boolean> getUnderline()
      Specified by:
      getUnderline in interface RichTextChannelElementIF.StyleIF
      Returns:
      The value of the underline attribute
    • getUnlink

      public Optional<Boolean> getUnlink()
      Specified by:
      getUnlink in interface RichTextChannelElementIF.StyleIF
      Returns:
      The value of the unlink attribute
    • withBold

      public final RichTextChannelElement.Style withBold(@Nullable Boolean value)
      Copy the current immutable object by setting a present value for the optional bold attribute.
      Parameters:
      value - The value for bold, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withBold

      public final RichTextChannelElement.Style withBold(Optional<Boolean> optional)
      Copy the current immutable object by setting an optional value for the bold attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for bold
      Returns:
      A modified copy or this if not changed
    • withItalic

      public final RichTextChannelElement.Style withItalic(@Nullable Boolean value)
      Copy the current immutable object by setting a present value for the optional italic attribute.
      Parameters:
      value - The value for italic, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withItalic

      public final RichTextChannelElement.Style withItalic(Optional<Boolean> optional)
      Copy the current immutable object by setting an optional value for the italic attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for italic
      Returns:
      A modified copy or this if not changed
    • withStrike

      public final RichTextChannelElement.Style withStrike(@Nullable Boolean value)
      Copy the current immutable object by setting a present value for the optional strike attribute.
      Parameters:
      value - The value for strike, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withStrike

      public final RichTextChannelElement.Style withStrike(Optional<Boolean> optional)
      Copy the current immutable object by setting an optional value for the strike attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for strike
      Returns:
      A modified copy or this if not changed
    • withHighlight

      public final RichTextChannelElement.Style withHighlight(@Nullable Boolean value)
      Copy the current immutable object by setting a present value for the optional highlight attribute.
      Parameters:
      value - The value for highlight, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withHighlight

      public final RichTextChannelElement.Style withHighlight(Optional<Boolean> optional)
      Copy the current immutable object by setting an optional value for the highlight attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for highlight
      Returns:
      A modified copy or this if not changed
    • withClientHighlight

      public final RichTextChannelElement.Style withClientHighlight(@Nullable Boolean value)
      Copy the current immutable object by setting a present value for the optional clientHighlight attribute.
      Parameters:
      value - The value for clientHighlight, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withClientHighlight

      public final RichTextChannelElement.Style withClientHighlight(Optional<Boolean> optional)
      Copy the current immutable object by setting an optional value for the clientHighlight attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for clientHighlight
      Returns:
      A modified copy or this if not changed
    • withUnderline

      public final RichTextChannelElement.Style withUnderline(@Nullable Boolean value)
      Copy the current immutable object by setting a present value for the optional underline attribute.
      Parameters:
      value - The value for underline, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withUnderline

      public final RichTextChannelElement.Style withUnderline(Optional<Boolean> optional)
      Copy the current immutable object by setting an optional value for the underline attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for underline
      Returns:
      A modified copy or this if not changed
    • withUnlink

      public final RichTextChannelElement.Style withUnlink(@Nullable Boolean value)
      Copy the current immutable object by setting a present value for the optional unlink attribute.
      Parameters:
      value - The value for unlink, null is accepted as java.util.Optional.empty()
      Returns:
      A modified copy or this if not changed
    • withUnlink

      public final RichTextChannelElement.Style withUnlink(Optional<Boolean> optional)
      Copy the current immutable object by setting an optional value for the unlink attribute. An equality check is used on inner value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for unlink
      Returns:
      A modified copy or this if not changed
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of Style that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: bold, italic, strike, highlight, clientHighlight, underline, unlink.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value Style with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      Creates an immutable copy of a RichTextChannelElementIF.StyleIF value. 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

      public static RichTextChannelElement.Style.Builder builder()
      Creates a builder for Style.
       RichTextChannelElement.Style.builder()
          .setBold(Optional<Boolean>) // optional bold
          .setItalic(Optional<Boolean>) // optional italic
          .setStrike(Optional<Boolean>) // optional strike
          .setHighlight(Optional<Boolean>) // optional highlight
          .setClientHighlight(Optional<Boolean>) // optional clientHighlight
          .setUnderline(Optional<Boolean>) // optional underline
          .setUnlink(Optional<Boolean>) // optional unlink
          .build();
       
      Returns:
      A new Style builder