Class Conversation

java.lang.Object
com.hubspot.slack.client.models.conversations.Conversation
All Implemented Interfaces:
ConversationIF

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

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

  • Method Details

    • getId

      public String getId()
      Specified by:
      getId in interface ConversationIF
      Returns:
      The value of the id attribute
    • getName

      public Optional<String> getName()
      Specified by:
      getName in interface ConversationIF
      Returns:
      The value of the name attribute
    • isChannel

      public Optional<Boolean> isChannel()
      Specified by:
      isChannel in interface ConversationIF
      Returns:
      The value of the channel attribute
    • isGroup

      public Optional<Boolean> isGroup()
      Specified by:
      isGroup in interface ConversationIF
      Returns:
      The value of the group attribute
    • isMpim

      public Optional<Boolean> isMpim()
      Specified by:
      isMpim in interface ConversationIF
      Returns:
      The value of the mpim attribute
    • isIm

      public Optional<Boolean> isIm()
      Specified by:
      isIm in interface ConversationIF
      Returns:
      The value of the im attribute
    • isArchived

      public Optional<Boolean> isArchived()
      Specified by:
      isArchived in interface ConversationIF
      Returns:
      The value of the archived attribute
    • isGeneral

      public Optional<Boolean> isGeneral()
      Specified by:
      isGeneral in interface ConversationIF
      Returns:
      The value of the general attribute
    • isPrivate

      public Optional<Boolean> isPrivate()
      Specified by:
      isPrivate in interface ConversationIF
      Returns:
      The value of the isPrivate attribute
    • isMember

      public Optional<Boolean> isMember()
      Specified by:
      isMember in interface ConversationIF
      Returns:
      The value of the member attribute
    • isShared

      public Optional<Boolean> isShared()
      Specified by:
      isShared in interface ConversationIF
      Returns:
      The value of the shared attribute
    • getNumMembers

      public Optional<Integer> getNumMembers()
      Specified by:
      getNumMembers in interface ConversationIF
      Returns:
      The value of the numMembers attribute
    • withId

      public final Conversation withId(String value)
      Copy the current immutable object by setting a value for the id attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for id
      Returns:
      A modified copy or the this object
    • withName

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of Conversation 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: id, name, channel, group, mpim, im, archived, general, isPrivate, member, shared, numMembers.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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

      public static Conversation.Builder builder()
      Creates a builder for Conversation.
       Conversation.builder()
          .setId(String) // required id
          .setName(Optional<String>) // optional name
          .setChannel(Optional<Boolean>) // optional channel
          .setGroup(Optional<Boolean>) // optional group
          .setMpim(Optional<Boolean>) // optional mpim
          .setIm(Optional<Boolean>) // optional im
          .setArchived(Optional<Boolean>) // optional archived
          .setGeneral(Optional<Boolean>) // optional general
          .setPrivate(Optional<Boolean>) // optional private
          .setMember(Optional<Boolean>) // optional member
          .setShared(Optional<Boolean>) // optional shared
          .setNumMembers(Optional<Integer>) // optional numMembers
          .build();
       
      Returns:
      A new Conversation builder