java.lang.Object
com.hubspot.slack.client.methods.params.chat.workobject.entity.Icon
All Implemented Interfaces:
IconIF

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

Use the builder to create immutable instances: Icon.builder().

  • Method Details

    • getUrl

      public String getUrl()
      Specified by:
      getUrl in interface IconIF
      Returns:
      The value of the url attribute
    • getAltText

      public String getAltText()
      Specified by:
      getAltText in interface IconIF
      Returns:
      The value of the altText attribute
    • withUrl

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

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

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

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

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

      public static Icon.Builder builder()
      Creates a builder for Icon.
       Icon.builder()
          .setUrl(String) // required url
          .setAltText(String) // required altText
          .build();
       
      Returns:
      A new Icon builder