Class SlackTokensRevokedEvent

java.lang.Object
com.hubspot.slack.client.models.events.app.SlackTokensRevokedEvent
All Implemented Interfaces:
SlackTokensRevokedEventIF, SlackEvent

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

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

  • Method Details

    • getType

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

      public TokensRevoked getTokens()
      Specified by:
      getTokens in interface SlackTokensRevokedEventIF
      Returns:
      The value of the tokens attribute
    • withType

      public final SlackTokensRevokedEvent 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
    • withTokens

      public final SlackTokensRevokedEvent withTokens(TokensRevoked value)
      Copy the current immutable object by setting a value for the tokens attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for tokens
      Returns:
      A modified copy or the this object
    • equals

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

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

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

      public static SlackTokensRevokedEvent.Builder builder()
      Creates a builder for SlackTokensRevokedEvent.
       SlackTokensRevokedEvent.builder()
          .setType(com.hubspot.slack.client.models.events.SlackEventType) // required type
          .setTokens(com.hubspot.slack.client.models.events.app.TokensRevoked) // required tokens
          .build();
       
      Returns:
      A new SlackTokensRevokedEvent builder