Class SlackChannel

java.lang.Object
com.hubspot.slack.client.models.SlackChannel
All Implemented Interfaces:
SlackChannelIF

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

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

  • Method Details

    • getId

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

      public String getName()
      Specified by:
      getName in interface SlackChannelIF
      Returns:
      The value of the name attribute
    • getIsArchived

      public Optional<Boolean> getIsArchived()
      Specified by:
      getIsArchived in interface SlackChannelIF
      Returns:
      The value of the isArchived attribute
    • getIsGeneral

      public Optional<Boolean> getIsGeneral()
      Specified by:
      getIsGeneral in interface SlackChannelIF
      Returns:
      The value of the isGeneral attribute
    • getIsPrivate

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

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

      public Optional<Boolean> getIsShared()
      Specified by:
      getIsShared in interface SlackChannelIF
      Returns:
      The value of the isShared attribute
    • getChannelType

      public ChannelType getChannelType()
      Specified by:
      getChannelType in interface SlackChannelIF
      Returns:
      The computed-at-construction value of the channelType attribute
    • withId

      public final SlackChannel 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 SlackChannel withName(String value)
      Copy the current immutable object by setting a value for the name attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for name
      Returns:
      A modified copy or the this object
    • withIsArchived

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

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

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

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

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

      public final SlackChannel withIsPrivate(Optional<Boolean> optional)
      Copy the current immutable object by setting an optional value for the isPrivate 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
    • withIsMember

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

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

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

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

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of SlackChannel 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, isArchived, isGeneral, isPrivate, isMember, isShared, channelType.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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

      public static SlackChannel.Builder builder()
      Creates a builder for SlackChannel.
       SlackChannel.builder()
          .setId(String) // required id
          .setName(String) // required name
          .setIsArchived(Optional<Boolean>) // optional isArchived
          .setIsGeneral(Optional<Boolean>) // optional isGeneral
          .setIsPrivate(Optional<Boolean>) // optional isPrivate
          .setIsMember(Optional<Boolean>) // optional isMember
          .setIsShared(Optional<Boolean>) // optional isShared
          .build();
       
      Returns:
      A new SlackChannel builder