java.lang.Object
com.hubspot.slack.client.models.blocks.elements.richtextelements.RichTextEmojiElement
All Implemented Interfaces:
BlockElement, RichTextElement, RichTextEmojiElementIF

@Generated(from="RichTextEmojiElementIF", generator="Immutables") @ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class RichTextEmojiElement extends Object implements RichTextEmojiElementIF
Immutable implementation of RichTextEmojiElementIF.

Use the builder to create immutable instances: RichTextEmojiElement.builder(). Use the static factory method to create immutable instances: RichTextEmojiElement.of().

  • Method Details

    • getType

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

      public String getName()
      Specified by:
      getName in interface RichTextEmojiElementIF
      Returns:
      The value of the name attribute
    • getUnicode

      public Optional<String> getUnicode()
      Specified by:
      getUnicode in interface RichTextEmojiElementIF
      Returns:
      The value of the unicode attribute
    • withName

      public final RichTextEmojiElement withName(String value)
      Copy the current immutable object by setting a value for the name attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for name
      Returns:
      A modified copy or the this object
    • withUnicode

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

      public final RichTextEmojiElement withUnicode(Optional<String> optional)
      Copy the current immutable object by setting an optional value for the unicode 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 unicode
      Returns:
      A modified copy or this if not changed
    • equals

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

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

      public static RichTextEmojiElement of(String name)
      Construct a new immutable RichTextEmojiElement instance.
      Parameters:
      name - The value for the name attribute
      Returns:
      An immutable RichTextEmojiElement instance
    • copyOf

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

      public static RichTextEmojiElement.Builder builder()
      Creates a builder for RichTextEmojiElement.
       RichTextEmojiElement.builder()
          .setName(String) // required name
          .setUnicode(Optional<String>) // optional unicode
          .build();
       
      Returns:
      A new RichTextEmojiElement builder