Class SlackGroup.Builder

java.lang.Object
com.hubspot.slack.client.models.group.SlackGroup.Builder
Enclosing class:
SlackGroup

@Generated(from="SlackGroupIF", generator="Immutables") @NotThreadSafe public static final class SlackGroup.Builder extends Object
Builds instances of type SlackGroup. Initialize attributes and then invoke the build() method to create an immutable instance.

Builder is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.

  • Method Details

    • from

      public final SlackGroup.Builder from(SlackGroupIF instance)
      Fill a builder with attribute values from the provided SlackGroupIF instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • setId

      public final SlackGroup.Builder setId(String id)
      Initializes the value for the id attribute.
      Parameters:
      id - The value for id
      Returns:
      this builder for use in a chained invocation
    • setName

      public final SlackGroup.Builder setName(String name)
      Initializes the value for the name attribute.
      Parameters:
      name - The value for name
      Returns:
      this builder for use in a chained invocation
    • setCreatedEpochSeconds

      public final SlackGroup.Builder setCreatedEpochSeconds(long createdEpochSeconds)
      Initializes the value for the createdEpochSeconds attribute.
      Parameters:
      createdEpochSeconds - The value for createdEpochSeconds
      Returns:
      this builder for use in a chained invocation
    • setCreatorId

      public final SlackGroup.Builder setCreatorId(String creatorId)
      Initializes the value for the creatorId attribute.
      Parameters:
      creatorId - The value for creatorId
      Returns:
      this builder for use in a chained invocation
    • setArchived

      public final SlackGroup.Builder setArchived(boolean archived)
      Initializes the value for the archived attribute.
      Parameters:
      archived - The value for archived
      Returns:
      this builder for use in a chained invocation
    • setMpim

      public final SlackGroup.Builder setMpim(boolean mpim)
      Initializes the value for the mpim attribute.
      Parameters:
      mpim - The value for mpim
      Returns:
      this builder for use in a chained invocation
    • addMemberIds

      public final SlackGroup.Builder addMemberIds(String element)
      Adds one element to memberIds list.
      Parameters:
      element - A memberIds element
      Returns:
      this builder for use in a chained invocation
    • addMemberIds

      public final SlackGroup.Builder addMemberIds(String... elements)
      Adds elements to memberIds list.
      Parameters:
      elements - An array of memberIds elements
      Returns:
      this builder for use in a chained invocation
    • setMemberIds

      public final SlackGroup.Builder setMemberIds(Iterable<String> elements)
      Sets or replaces all elements for memberIds list.
      Parameters:
      elements - An iterable of memberIds elements
      Returns:
      this builder for use in a chained invocation
    • addAllMemberIds

      public final SlackGroup.Builder addAllMemberIds(Iterable<String> elements)
      Adds elements to memberIds list.
      Parameters:
      elements - An iterable of memberIds elements
      Returns:
      this builder for use in a chained invocation
    • setTopic

      public final SlackGroup.Builder setTopic(ChannelMetadata topic)
      Initializes the value for the topic attribute.
      Parameters:
      topic - The value for topic
      Returns:
      this builder for use in a chained invocation
    • setPurpose

      public final SlackGroup.Builder setPurpose(ChannelMetadata purpose)
      Initializes the value for the purpose attribute.
      Parameters:
      purpose - The value for purpose
      Returns:
      this builder for use in a chained invocation
    • setLatest

      public final SlackGroup.Builder setLatest(@Nullable Message latest)
      Initializes the optional value latest to latest.
      Parameters:
      latest - The value for latest, null is accepted as java.util.Optional.empty()
      Returns:
      this builder for chained invocation
    • setLatest

      public final SlackGroup.Builder setLatest(Optional<? extends Message> latest)
      Initializes the optional value latest to latest.
      Parameters:
      latest - The value for latest
      Returns:
      this builder for use in a chained invocation
    • build

      public SlackGroup build()
      Builds a new SlackGroup.
      Returns:
      An immutable instance of SlackGroup
      Throws:
      com.hubspot.immutables.validation.InvalidImmutableStateException - if any required attributes are missing