Class SlackUserChangeEvent

java.lang.Object
com.hubspot.slack.client.models.events.user.SlackUserChangeEvent
All Implemented Interfaces:
SlackEvent, SlackUserChangeEventIF

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

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

  • Method Details

    • getType

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

      public SlackUser getUser()
      Specified by:
      getUser in interface SlackUserChangeEventIF
      Returns:
      The value of the user attribute
    • withType

      public final SlackUserChangeEvent 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
    • withUser

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

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

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

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

      public static SlackUserChangeEvent.Builder builder()
      Creates a builder for SlackUserChangeEvent.
       SlackUserChangeEvent.builder()
          .setType(com.hubspot.slack.client.models.events.SlackEventType) // required type
          .setUser(com.hubspot.slack.client.models.users.SlackUser) // required user
          .build();
       
      Returns:
      A new SlackUserChangeEvent builder