Class ChannelsHistoryParams

java.lang.Object
com.hubspot.slack.client.methods.params.channels.AbstractChannelsHistoryParams
com.hubspot.slack.client.methods.params.channels.ChannelsHistoryParams
All Implemented Interfaces:
HasChannel, TimeIntervalFilter

@Generated(from="AbstractChannelsHistoryParams", generator="Immutables") @ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class ChannelsHistoryParams extends AbstractChannelsHistoryParams
Immutable implementation of AbstractChannelsHistoryParams.

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

  • Method Details

    • getNewestTimestamp

      public Optional<String> getNewestTimestamp()
      Returns:
      The value of the newestTimestamp attribute
    • getOldestTimestamp

      public Optional<String> getOldestTimestamp()
      Returns:
      The value of the oldestTimestamp attribute
    • getPagingDirection

      public PagingDirection getPagingDirection()
      Returns:
      The computed-at-construction value of the pagingDirection attribute
    • getChannelId

      public String getChannelId()
      Specified by:
      getChannelId in interface HasChannel
      Specified by:
      getChannelId in class AbstractChannelsHistoryParams
      Returns:
      The value of the channelId attribute
    • getCount

      public Optional<Integer> getCount()
      Specified by:
      getCount in class AbstractChannelsHistoryParams
      Returns:
      The value of the count attribute
    • isInclusive

      public Optional<Boolean> isInclusive()
      Specified by:
      isInclusive in interface TimeIntervalFilter
      Specified by:
      isInclusive in class AbstractChannelsHistoryParams
      Returns:
      The value of the inclusive attribute
    • shouldIncludeUnreads

      public Optional<Boolean> shouldIncludeUnreads()
      Specified by:
      shouldIncludeUnreads in class AbstractChannelsHistoryParams
      Returns:
      The value of the shouldIncludeUnreads attribute
    • withNewestTimestamp

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

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

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

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

      public final ChannelsHistoryParams 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
    • withCount

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

      public final ChannelsHistoryParams withCount(Optional<Integer> optional)
      Copy the current immutable object by setting an optional value for the count 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 count
      Returns:
      A modified copy or this if not changed
    • withInclusive

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

      public final ChannelsHistoryParams withInclusive(Optional<Boolean> optional)
      Copy the current immutable object by setting an optional value for the inclusive 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 inclusive
      Returns:
      A modified copy or this if not changed
    • withShouldIncludeUnreads

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

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

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

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

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

      public static ChannelsHistoryParams.Builder builder()
      Creates a builder for ChannelsHistoryParams.
       ChannelsHistoryParams.builder()
          .setNewestTimestamp(Optional<String>) // optional newestTimestamp
          .setOldestTimestamp(Optional<String>) // optional oldestTimestamp
          .setChannelId(String) // required channelId
          .setCount(Optional<Integer>) // optional count
          .setInclusive(Optional<Boolean>) // optional inclusive
          .setShouldIncludeUnreads(Optional<Boolean>) // optional shouldIncludeUnreads
          .build();
       
      Returns:
      A new ChannelsHistoryParams builder