Class SlackLinkSharedEvent

java.lang.Object
com.hubspot.slack.client.models.events.links.SlackLinkSharedEvent
All Implemented Interfaces:
SlackLinkSharedEventIF, SlackEvent

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

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

  • Method Details

    • getType

      public SlackEventType getType()
      Specified by:
      getType in interface SlackEvent
      Returns:
      The value of the type attribute
    • getChannelId

      public String getChannelId()
      Specified by:
      getChannelId in interface SlackLinkSharedEventIF
      Returns:
      The value of the channelId attribute
    • getUserId

      public String getUserId()
      Specified by:
      getUserId in interface SlackLinkSharedEventIF
      Returns:
      The value of the userId attribute
    • getMessageTs

      public String getMessageTs()
      Specified by:
      getMessageTs in interface SlackLinkSharedEventIF
      Returns:
      The value of the messageTs attribute
    • getThreadTs

      public Optional<String> getThreadTs()
      Specified by:
      getThreadTs in interface SlackLinkSharedEventIF
      Returns:
      The value of the threadTs attribute
    • getLinks

      public List<Link> getLinks()
      Specified by:
      getLinks in interface SlackLinkSharedEventIF
      Returns:
      The value of the links attribute
    • withType

      public final SlackLinkSharedEvent withType(SlackEventType value)
      Copy the current immutable object by setting a value for the type attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for type
      Returns:
      A modified copy or the this object
    • withChannelId

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

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

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

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

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

      public final SlackLinkSharedEvent withLinks(Link... elements)
      Copy the current immutable object with elements that replace the content of links.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withLinks

      public final SlackLinkSharedEvent withLinks(Iterable<? extends Link> elements)
      Copy the current immutable object with elements that replace the content of links. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of links elements to set
      Returns:
      A modified copy or this if not changed
    • equals

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

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

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

      public static SlackLinkSharedEvent.Builder builder()
      Creates a builder for SlackLinkSharedEvent.
       SlackLinkSharedEvent.builder()
          .setType(com.hubspot.slack.client.models.events.SlackEventType) // required type
          .setChannelId(String) // required channelId
          .setUserId(String) // required userId
          .setMessageTs(String) // required messageTs
          .setThreadTs(Optional<String>) // optional threadTs
          .addLinks|addAllLinks(Link) // links elements
          .build();
       
      Returns:
      A new SlackLinkSharedEvent builder