Class ConversationsUserParams

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

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

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

      public Optional<String> getUserId()
      Specified by:
      getUserId in interface ConversationsUserParamsIF
      Returns:
      The value of the userId attribute
    • getCursor

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

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

      public final ConversationsUserParams 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 ConversationsUserParams 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 ConversationsUserParams 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 ConversationsUserParams 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
    • withUserId

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

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

      public final ConversationsUserParams 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 ConversationsUserParams 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 ConversationsUserParams 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 ConversationsUserParams 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 ConversationsUserParams 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, userId, cursor, limit.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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

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