Class SlackUser.Builder

java.lang.Object
com.hubspot.slack.client.models.users.SlackUser.Builder
Enclosing class:
SlackUser

@Generated(from="SlackUserIF", generator="Immutables") @NotThreadSafe public static final class SlackUser.Builder extends Object
Builds instances of type SlackUser. 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 SlackUser.Builder from(SlackUserIF instance)
      Fill a builder with attribute values from the provided com.hubspot.slack.client.models.users.SlackUserIF instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • from

      public final SlackUser.Builder from(SlackUserCore instance)
      Fill a builder with attribute values from the provided com.hubspot.slack.client.models.users.SlackUserCore instance.
      Parameters:
      instance - The instance from which to copy values
      Returns:
      this builder for use in a chained invocation
    • setId

      public final SlackUser.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
    • setUsername

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

      public final SlackUser.Builder setUsername(Optional<String> username)
      Initializes the optional value username to username.
      Parameters:
      username - The value for username
      Returns:
      this builder for use in a chained invocation
    • setProfile

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

      public final SlackUser.Builder setProfile(Optional<? extends UserProfile> profile)
      Initializes the optional value profile to profile.
      Parameters:
      profile - The value for profile
      Returns:
      this builder for use in a chained invocation
    • setDeleted

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

      public final SlackUser.Builder setDeleted(Optional<Boolean> deleted)
      Initializes the optional value deleted to deleted.
      Parameters:
      deleted - The value for deleted
      Returns:
      this builder for use in a chained invocation
    • setColor

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

      public final SlackUser.Builder setColor(Optional<String> color)
      Initializes the optional value color to color.
      Parameters:
      color - The value for color
      Returns:
      this builder for use in a chained invocation
    • setAdmin

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

      public final SlackUser.Builder setAdmin(Optional<String> admin)
      Initializes the optional value admin to admin.
      Parameters:
      admin - The value for admin
      Returns:
      this builder for use in a chained invocation
    • setOwner

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

      public final SlackUser.Builder setOwner(Optional<String> owner)
      Initializes the optional value owner to owner.
      Parameters:
      owner - The value for owner
      Returns:
      this builder for use in a chained invocation
    • setTeamId

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

      public final SlackUser.Builder setTeamId(Optional<String> teamId)
      Initializes the optional value teamId to teamId.
      Parameters:
      teamId - The value for teamId
      Returns:
      this builder for use in a chained invocation
    • setExternalTeamId

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

      public final SlackUser.Builder setExternalTeamId(Optional<String> externalTeamId)
      Initializes the optional value externalTeamId to externalTeamId.
      Parameters:
      externalTeamId - The value for externalTeamId
      Returns:
      this builder for use in a chained invocation
    • setRealName

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

      public final SlackUser.Builder setRealName(Optional<String> realName)
      Initializes the optional value realName to realName.
      Parameters:
      realName - The value for realName
      Returns:
      this builder for use in a chained invocation
    • setPrimaryOwner

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

      public final SlackUser.Builder setPrimaryOwner(Optional<Boolean> primaryOwner)
      Initializes the optional value primaryOwner to primaryOwner.
      Parameters:
      primaryOwner - The value for primaryOwner
      Returns:
      this builder for use in a chained invocation
    • setRestricted

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

      public final SlackUser.Builder setRestricted(Optional<Boolean> restricted)
      Initializes the optional value restricted to restricted.
      Parameters:
      restricted - The value for restricted
      Returns:
      this builder for use in a chained invocation
    • setUltraRestricted

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

      public final SlackUser.Builder setUltraRestricted(Optional<Boolean> ultraRestricted)
      Initializes the optional value ultraRestricted to ultraRestricted.
      Parameters:
      ultraRestricted - The value for ultraRestricted
      Returns:
      this builder for use in a chained invocation
    • setBot

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

      public final SlackUser.Builder setBot(Optional<Boolean> bot)
      Initializes the optional value bot to bot.
      Parameters:
      bot - The value for bot
      Returns:
      this builder for use in a chained invocation
    • setAppUser

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

      public final SlackUser.Builder setAppUser(Optional<Boolean> appUser)
      Initializes the optional value appUser to appUser.
      Parameters:
      appUser - The value for appUser
      Returns:
      this builder for use in a chained invocation
    • setTimezone

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

      public final SlackUser.Builder setTimezone(Optional<String> timezone)
      Initializes the optional value timezone to timezone.
      Parameters:
      timezone - The value for timezone
      Returns:
      this builder for use in a chained invocation
    • setTimezoneLabel

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

      public final SlackUser.Builder setTimezoneLabel(Optional<String> timezoneLabel)
      Initializes the optional value timezoneLabel to timezoneLabel.
      Parameters:
      timezoneLabel - The value for timezoneLabel
      Returns:
      this builder for use in a chained invocation
    • setTimezoneOffset

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

      public final SlackUser.Builder setTimezoneOffset(Optional<String> timezoneOffset)
      Initializes the optional value timezoneOffset to timezoneOffset.
      Parameters:
      timezoneOffset - The value for timezoneOffset
      Returns:
      this builder for use in a chained invocation
    • setRawUpdated

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

      public final SlackUser.Builder setRawUpdated(Optional<Integer> rawUpdated)
      Initializes the optional value rawUpdated to rawUpdated.
      Parameters:
      rawUpdated - The value for rawUpdated
      Returns:
      this builder for use in a chained invocation
    • setLocale

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

      public final SlackUser.Builder setLocale(Optional<String> locale)
      Initializes the optional value locale to locale.
      Parameters:
      locale - The value for locale
      Returns:
      this builder for use in a chained invocation
    • build

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