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

  • Method Details

    • getType

      public String getType()
      Specified by:
      getType in interface BlockElement
      Specified by:
      getType in interface RichTextBroadcastElementIF
      Returns:
      The computed-at-construction value of the type attribute
    • getRange

      public RichTextBroadcastRange getRange()
      Specified by:
      getRange in interface RichTextBroadcastElementIF
      Returns:
      The value of the range attribute
    • getStyle

      Specified by:
      getStyle in interface RichTextBroadcastElementIF
      Returns:
      The value of the style attribute
    • withRange

      public final RichTextBroadcastElement withRange(RichTextBroadcastRange value)
      Copy the current immutable object by setting a value for the range attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for range
      Returns:
      A modified copy or the this object
    • withStyle

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

      public final RichTextBroadcastElement withStyle(Optional<? extends RichTextBroadcastElementIF.StyleIF> optional)
      Copy the current immutable object by setting an optional value for the style attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for style
      Returns:
      A modified copy or this if not changed
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of RichTextBroadcastElement 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: type, range, style.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static RichTextBroadcastElement copyOf(RichTextBroadcastElementIF instance)
      Creates an immutable copy of a RichTextBroadcastElementIF 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 RichTextBroadcastElement instance
    • builder

      public static RichTextBroadcastElement.Builder builder()
      Creates a builder for RichTextBroadcastElement.
       RichTextBroadcastElement.builder()
          .setRange(com.hubspot.slack.client.models.blocks.elements.richtextelements.RichTextBroadcastRange) // required range
          .setStyle(Optional<com.hubspot.slack.client.models.blocks.elements.richtextelements.RichTextBroadcastElementIF.StyleIF>) // optional style
          .build();
       
      Returns:
      A new RichTextBroadcastElement builder