Class SlackUsergroup.Builder

java.lang.Object
com.hubspot.slack.client.models.usergroups.SlackUsergroup.Builder
Enclosing class:
SlackUsergroup

@Generated(from="SlackUsergroupIF", generator="Immutables") @NotThreadSafe public static final class SlackUsergroup.Builder extends Object
Builds instances of type SlackUsergroup. 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 SlackUsergroup.Builder from(SlackUsergroupIF instance)
      Fill a builder with attribute values from the provided SlackUsergroupIF 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 SlackUsergroup.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
    • setTeamId

      public final SlackUsergroup.Builder setTeamId(String teamId)
      Initializes the value for the teamId attribute.
      Parameters:
      teamId - The value for teamId
      Returns:
      this builder for use in a chained invocation
    • setUsergroup

      public final SlackUsergroup.Builder setUsergroup(boolean usergroup)
      Initializes the value for the usergroup attribute.
      Parameters:
      usergroup - The value for usergroup
      Returns:
      this builder for use in a chained invocation
    • setName

      public final SlackUsergroup.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
    • setDescription

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

      public final SlackUsergroup.Builder setDescription(Optional<String> description)
      Initializes the optional value description to description.
      Parameters:
      description - The value for description
      Returns:
      this builder for use in a chained invocation
    • setHandle

      public final SlackUsergroup.Builder setHandle(String handle)
      Initializes the value for the handle attribute.
      Parameters:
      handle - The value for handle
      Returns:
      this builder for use in a chained invocation
    • setExternal

      public final SlackUsergroup.Builder setExternal(boolean external)
      Initializes the value for the external attribute.
      Parameters:
      external - The value for external
      Returns:
      this builder for use in a chained invocation
    • setDateCreatedEpochSeconds

      public final SlackUsergroup.Builder setDateCreatedEpochSeconds(int dateCreatedEpochSeconds)
      Initializes the value for the dateCreatedEpochSeconds attribute.
      Parameters:
      dateCreatedEpochSeconds - The value for dateCreatedEpochSeconds
      Returns:
      this builder for use in a chained invocation
    • setDateUpdatedEpochSeconds

      public final SlackUsergroup.Builder setDateUpdatedEpochSeconds(int dateUpdatedEpochSeconds)
      Initializes the value for the dateUpdatedEpochSeconds attribute.
      Parameters:
      dateUpdatedEpochSeconds - The value for dateUpdatedEpochSeconds
      Returns:
      this builder for use in a chained invocation
    • setDateDeletedEpochSeconds

      public final SlackUsergroup.Builder setDateDeletedEpochSeconds(int dateDeletedEpochSeconds)
      Initializes the value for the dateDeletedEpochSeconds attribute.
      Parameters:
      dateDeletedEpochSeconds - The value for dateDeletedEpochSeconds
      Returns:
      this builder for use in a chained invocation
    • setAutoType

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

      public final SlackUsergroup.Builder setAutoType(Optional<String> autoType)
      Initializes the optional value autoType to autoType.
      Parameters:
      autoType - The value for autoType
      Returns:
      this builder for use in a chained invocation
    • setCreatedBy

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

      public final SlackUsergroup.Builder setCreatedBy(Optional<String> createdBy)
      Initializes the optional value createdBy to createdBy.
      Parameters:
      createdBy - The value for createdBy
      Returns:
      this builder for use in a chained invocation
    • setUpdatedBy

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

      public final SlackUsergroup.Builder setUpdatedBy(Optional<String> updatedBy)
      Initializes the optional value updatedBy to updatedBy.
      Parameters:
      updatedBy - The value for updatedBy
      Returns:
      this builder for use in a chained invocation
    • setDeletedBy

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

      public final SlackUsergroup.Builder setDeletedBy(Optional<String> deletedBy)
      Initializes the optional value deletedBy to deletedBy.
      Parameters:
      deletedBy - The value for deletedBy
      Returns:
      this builder for use in a chained invocation
    • setPreferences

      public final SlackUsergroup.Builder setPreferences(UsergroupPreferences preferences)
      Initializes the value for the preferences attribute.
      Parameters:
      preferences - The value for preferences
      Returns:
      this builder for use in a chained invocation
    • addUserIdsInGroup

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

      public final SlackUsergroup.Builder addUserIdsInGroup(String... elements)
      Adds elements to userIdsInGroup list.
      Parameters:
      elements - An array of userIdsInGroup elements
      Returns:
      this builder for use in a chained invocation
    • setUserIdsInGroup

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

      public final SlackUsergroup.Builder addAllUserIdsInGroup(Iterable<String> elements)
      Adds elements to userIdsInGroup list.
      Parameters:
      elements - An iterable of userIdsInGroup elements
      Returns:
      this builder for use in a chained invocation
    • setUserCount

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

      public final SlackUsergroup.Builder setUserCount(Optional<Integer> userCount)
      Initializes the optional value userCount to userCount.
      Parameters:
      userCount - The value for userCount
      Returns:
      this builder for use in a chained invocation
    • build

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