Class ConversationsFilter

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

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

Use the builder to create immutable instances: ConversationsFilter.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
    • withShouldExcludeArchived

      public final ConversationsFilter 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 ConversationsFilter 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 ConversationsFilter 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 ConversationsFilter 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
    • equals

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

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

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

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