Class SlackChannelCreatedEvent

java.lang.Object
com.hubspot.slack.client.models.events.channel.SlackChannelCreatedEvent
All Implemented Interfaces:
SlackChannelCreatedEventIF, SlackConversationEventCore, SlackConversationEventWithChannel, SlackEvent

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

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

  • Method Details

    • getType

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

      public SlackChannel getChannel()
      Specified by:
      getChannel in interface SlackConversationEventWithChannel
      Returns:
      The value of the channel attribute
    • getChannelId

      public String getChannelId()
      Specified by:
      getChannelId in interface SlackConversationEventCore
      Specified by:
      getChannelId in interface SlackConversationEventWithChannel
      Returns:
      The computed-at-construction value of the channelId attribute
    • withType

      public final SlackChannelCreatedEvent 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
    • withChannel

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

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

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

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

      public static SlackChannelCreatedEvent.Builder builder()
      Creates a builder for SlackChannelCreatedEvent.
       SlackChannelCreatedEvent.builder()
          .setType(com.hubspot.slack.client.models.events.SlackEventType) // required type
          .setChannel(com.hubspot.slack.client.models.SlackChannel) // required channel
          .build();
       
      Returns:
      A new SlackChannelCreatedEvent builder