Class ConversationsListParams

java.lang.Object
com.hubspot.slack.client.methods.params.conversations.ConversationsListParams
All Implemented Interfaces:
BaseConversationsFilter, ConversationsListParamsIF

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

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

  • Method Details

    • shouldExcludeArchived

      public Optional<Boolean> shouldExcludeArchived()
      Specified by:
      shouldExcludeArchived in interface BaseConversationsFilter
      Returns:
      The value of the shouldExcludeArchived attribute
    • getTypes

      public String getTypes()
      Specified by:
      getTypes in interface BaseConversationsFilter
      Returns:
      The computed-at-construction value of the types attribute
    • getConversationTypes

      public Set<ConversationType> getConversationTypes()
      Specified by:
      getConversationTypes in interface BaseConversationsFilter
      Returns:
      The value of the conversationTypes attribute
    • getCursor

      public Optional<String> getCursor()
      Specified by:
      getCursor in interface ConversationsListParamsIF
      Returns:
      The value of the cursor attribute
    • getLimit

      public Optional<Integer> getLimit()
      Specified by:
      getLimit in interface ConversationsListParamsIF
      Returns:
      The value of the limit attribute
    • withShouldExcludeArchived

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

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

      public final ConversationsListParams withConversationTypes(ConversationType... elements)
      Copy the current immutable object with elements that replace the content of conversationTypes.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withConversationTypes

      public final ConversationsListParams withConversationTypes(Iterable<ConversationType> elements)
      Copy the current immutable object with elements that replace the content of conversationTypes. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      elements - An iterable of conversationTypes elements to set
      Returns:
      A modified copy or this if not changed
    • withCursor

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

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

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

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

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

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

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

      public static ConversationsListParams.Builder builder()
      Creates a builder for ConversationsListParams.
       ConversationsListParams.builder()
          .setShouldExcludeArchived(Optional<Boolean>) // optional shouldExcludeArchived
          .addConversationTypes|addAllConversationTypes(com.hubspot.slack.client.models.conversations.ConversationType) // conversationTypes elements
          .setCursor(Optional<String>) // optional cursor
          .setLimit(Optional<Integer>) // optional limit
          .build();
       
      Returns:
      A new ConversationsListParams builder