Class SlackAppHomeOpenedEvent

java.lang.Object
com.hubspot.slack.client.models.events.bot.SlackAppHomeOpenedEvent
All Implemented Interfaces:
HasUser, SlackAppHomeOpenedEventIF, SlackEvent

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

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

  • Method Details

    • getType

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

      public Optional<String> getTab()
      Specified by:
      getTab in interface SlackAppHomeOpenedEventIF
      Returns:
      The value of the tab attribute
    • getView

      public Optional<HomeTabViewResponse> getView()
      Specified by:
      getView in interface SlackAppHomeOpenedEventIF
      Returns:
      The value of the view attribute
    • getUserId

      public String getUserId()
      Specified by:
      getUserId in interface HasUser
      Specified by:
      getUserId in interface SlackAppHomeOpenedEventIF
      Returns:
      The value of the userId attribute
    • getChannelId

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

      public final SlackAppHomeOpenedEvent 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
    • withTab

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

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

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

      public final SlackAppHomeOpenedEvent withView(Optional<? extends HomeTabViewResponse> optional)
      Copy the current immutable object by setting an optional value for the view 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 view
      Returns:
      A modified copy or this if not changed
    • withUserId

      public final SlackAppHomeOpenedEvent 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
    • withChannelId

      public final SlackAppHomeOpenedEvent 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
    • equals

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

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

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

      public static SlackAppHomeOpenedEvent.Builder builder()
      Creates a builder for SlackAppHomeOpenedEvent.
       SlackAppHomeOpenedEvent.builder()
          .setType(com.hubspot.slack.client.models.events.SlackEventType) // required type
          .setTab(Optional<String>) // optional tab
          .setView(Optional<com.hubspot.slack.client.models.response.views.HomeTabViewResponse>) // optional view
          .setUserId(String) // required userId
          .setChannelId(String) // required channelId
          .build();
       
      Returns:
      A new SlackAppHomeOpenedEvent builder