Class SlackGroup

java.lang.Object
com.hubspot.slack.client.models.group.SlackGroup
All Implemented Interfaces:
SlackGroupIF

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

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

  • Method Details

    • getId

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

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

      public long getCreatedEpochSeconds()
      Specified by:
      getCreatedEpochSeconds in interface SlackGroupIF
      Returns:
      The value of the createdEpochSeconds attribute
    • getCreatorId

      public String getCreatorId()
      Specified by:
      getCreatorId in interface SlackGroupIF
      Returns:
      The value of the creatorId attribute
    • isArchived

      public boolean isArchived()
      Specified by:
      isArchived in interface SlackGroupIF
      Returns:
      The value of the archived attribute
    • isMpim

      public boolean isMpim()
      Specified by:
      isMpim in interface SlackGroupIF
      Returns:
      The value of the mpim attribute
    • getMemberIds

      public List<String> getMemberIds()
      Specified by:
      getMemberIds in interface SlackGroupIF
      Returns:
      The value of the memberIds attribute
    • getTopic

      public ChannelMetadata getTopic()
      Specified by:
      getTopic in interface SlackGroupIF
      Returns:
      The value of the topic attribute
    • getPurpose

      public ChannelMetadata getPurpose()
      Specified by:
      getPurpose in interface SlackGroupIF
      Returns:
      The value of the purpose attribute
    • getLatest

      public Optional<Message> getLatest()
      Specified by:
      getLatest in interface SlackGroupIF
      Returns:
      The value of the latest attribute
    • withId

      public final SlackGroup 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 SlackGroup 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
    • withCreatedEpochSeconds

      public final SlackGroup withCreatedEpochSeconds(long value)
      Copy the current immutable object by setting a value for the createdEpochSeconds attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for createdEpochSeconds
      Returns:
      A modified copy or the this object
    • withCreatorId

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

      public final SlackGroup withArchived(boolean value)
      Copy the current immutable object by setting a value for the archived attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for archived
      Returns:
      A modified copy or the this object
    • withMpim

      public final SlackGroup withMpim(boolean value)
      Copy the current immutable object by setting a value for the mpim attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for mpim
      Returns:
      A modified copy or the this object
    • withMemberIds

      public final SlackGroup withMemberIds(String... elements)
      Copy the current immutable object with elements that replace the content of memberIds.
      Parameters:
      elements - The elements to set
      Returns:
      A modified copy of this object
    • withMemberIds

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

      public final SlackGroup withTopic(ChannelMetadata value)
      Copy the current immutable object by setting a value for the topic attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for topic
      Returns:
      A modified copy or the this object
    • withPurpose

      public final SlackGroup withPurpose(ChannelMetadata value)
      Copy the current immutable object by setting a value for the purpose attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for purpose
      Returns:
      A modified copy or the this object
    • withLatest

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

      public final SlackGroup withLatest(Optional<? extends Message> optional)
      Copy the current immutable object by setting an optional value for the latest attribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.
      Parameters:
      optional - An optional value for latest
      Returns:
      A modified copy or this if not changed
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of SlackGroup 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, createdEpochSeconds, creatorId, archived, mpim, memberIds, topic, purpose, latest.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

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

      public static SlackGroup.Builder builder()
      Creates a builder for SlackGroup.
       SlackGroup.builder()
          .setId(String) // required id
          .setName(String) // required name
          .setCreatedEpochSeconds(long) // required createdEpochSeconds
          .setCreatorId(String) // required creatorId
          .setArchived(boolean) // required archived
          .setMpim(boolean) // required mpim
          .addMemberIds|addAllMemberIds(String) // memberIds elements
          .setTopic(com.hubspot.slack.client.models.ChannelMetadata) // required topic
          .setPurpose(com.hubspot.slack.client.models.ChannelMetadata) // required purpose
          .setLatest(Optional<com.hubspot.slack.client.models.Message>) // optional latest
          .build();
       
      Returns:
      A new SlackGroup builder