Class SlackEventSkeleton

java.lang.Object
com.hubspot.slack.client.models.events.SlackEventSkeleton
All Implemented Interfaces:
SlackEvent, SlackEventSkeletonIF

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

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

  • Method Details

    • getType

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

      public Optional<String> getChannelMaybe()
      Specified by:
      getChannelMaybe in interface SlackEventSkeletonIF
      Returns:
      The value of the channelMaybe attribute
    • withType

      public final SlackEventSkeleton 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
    • withChannelMaybe

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

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

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

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

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

      public static SlackEventSkeleton.Builder builder()
      Creates a builder for SlackEventSkeleton.
       SlackEventSkeleton.builder()
          .setType(com.hubspot.slack.client.models.events.SlackEventType) // required type
          .setChannelMaybe(Optional<String>) // optional channelMaybe
          .build();
       
      Returns:
      A new SlackEventSkeleton builder