Class SlackMemberJoinedChannelEvent

java.lang.Object
com.hubspot.slack.client.models.events.user.SlackMemberJoinedChannelEvent
All Implemented Interfaces:
HasChannel, SlackEvent, SlackMemberJoinedChannelEventIF

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

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

  • Method Details

    • getType

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

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

      public String getChannelId()
      Specified by:
      getChannelId in interface HasChannel
      Specified by:
      getChannelId in interface SlackMemberJoinedChannelEventIF
      Returns:
      The value of the channelId attribute
    • getChannelType

      public ChannelType getChannelType()
      Specified by:
      getChannelType in interface SlackMemberJoinedChannelEventIF
      Returns:
      The value of the channelType attribute
    • getTeam

      public String getTeam()
      Specified by:
      getTeam in interface SlackMemberJoinedChannelEventIF
      Returns:
      The value of the team attribute
    • getInviterId

      public Optional<String> getInviterId()
      Specified by:
      getInviterId in interface SlackMemberJoinedChannelEventIF
      Returns:
      The value of the inviterId attribute
    • withType

      public final SlackMemberJoinedChannelEvent 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
    • withUserId

      public final SlackMemberJoinedChannelEvent 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 SlackMemberJoinedChannelEvent 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
    • withChannelType

      public final SlackMemberJoinedChannelEvent withChannelType(ChannelType value)
      Copy the current immutable object by setting a value for the channelType attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for channelType
      Returns:
      A modified copy or the this object
    • withTeam

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

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

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

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

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

      Creates an immutable copy of a SlackMemberJoinedChannelEventIF 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 SlackMemberJoinedChannelEvent instance
    • builder

      public static SlackMemberJoinedChannelEvent.Builder builder()
      Creates a builder for SlackMemberJoinedChannelEvent.
       SlackMemberJoinedChannelEvent.builder()
          .setType(com.hubspot.slack.client.models.events.SlackEventType) // required type
          .setUserId(String) // required userId
          .setChannelId(String) // required channelId
          .setChannelType(com.hubspot.slack.client.models.ChannelType) // required channelType
          .setTeam(String) // required team
          .setInviterId(Optional<String>) // optional inviterId
          .build();
       
      Returns:
      A new SlackMemberJoinedChannelEvent builder