Class SlackUser
java.lang.Object
com.hubspot.slack.client.models.users.SlackUser
- All Implemented Interfaces:
SlackUserCore,SlackUserIF
@Generated(from="SlackUserIF",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class SlackUser
extends Object
implements SlackUserIF
Immutable implementation of
SlackUserIF.
Use the builder to create immutable instances:
SlackUser.builder().
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic SlackUser.Builderbuilder()Creates a builder forSlackUser.static SlackUsercopyOf(SlackUserIF instance) Creates an immutable copy of aSlackUserIFvalue.booleanThis instance is equal to all instances ofSlackUserthat have equal attribute values.getColor()For external (Slack Connect) users cached against a workspace they do not belong to, this holds their real home workspace team ID;getTeamId()then holds the workspace the user is cached/scoped under.getId()inthashCode()Computes a hash code from attributes:id,username,profile,deleted,color,admin,owner,teamId,externalTeamId,external,realName,primaryOwner,restricted,ultraRestricted,bot,appUser,timezone,timezoneLabel,timezoneOffset,rawUpdated,locale,updatedAt.isAdmin()isBot()booleanWhether this user is external (a Slack Connect member) relative to the workspace this record is scoped to.isOwner()toString()Prints the immutable valueSlackUserwith attribute values.final SlackUserCopy the current immutable object by setting a present value for the optionaladminattribute.final SlackUserCopy the current immutable object by setting an optional value for theadminattribute.final SlackUserwithAppUser(Boolean value) Copy the current immutable object by setting a present value for the optionalappUserattribute.final SlackUserwithAppUser(Optional<Boolean> optional) Copy the current immutable object by setting an optional value for theappUserattribute.final SlackUserCopy the current immutable object by setting a present value for the optionalbotattribute.final SlackUserCopy the current immutable object by setting an optional value for thebotattribute.final SlackUserCopy the current immutable object by setting a present value for the optionalcolorattribute.final SlackUserCopy the current immutable object by setting an optional value for thecolorattribute.final SlackUserwithDeleted(Boolean value) Copy the current immutable object by setting a present value for the optionaldeletedattribute.final SlackUserwithDeleted(Optional<Boolean> optional) Copy the current immutable object by setting an optional value for thedeletedattribute.final SlackUserwithExternalTeamId(String value) Copy the current immutable object by setting a present value for the optionalexternalTeamIdattribute.final SlackUserwithExternalTeamId(Optional<String> optional) Copy the current immutable object by setting an optional value for theexternalTeamIdattribute.final SlackUserCopy the current immutable object by setting a value for theidattribute.final SlackUserwithLocale(String value) Copy the current immutable object by setting a present value for the optionallocaleattribute.final SlackUserwithLocale(Optional<String> optional) Copy the current immutable object by setting an optional value for thelocaleattribute.final SlackUserCopy the current immutable object by setting a present value for the optionalownerattribute.final SlackUserCopy the current immutable object by setting an optional value for theownerattribute.final SlackUserwithPrimaryOwner(Boolean value) Copy the current immutable object by setting a present value for the optionalprimaryOwnerattribute.final SlackUserwithPrimaryOwner(Optional<Boolean> optional) Copy the current immutable object by setting an optional value for theprimaryOwnerattribute.final SlackUserwithProfile(UserProfile value) Copy the current immutable object by setting a present value for the optionalprofileattribute.final SlackUserwithProfile(Optional<? extends UserProfile> optional) Copy the current immutable object by setting an optional value for theprofileattribute.final SlackUserwithRawUpdated(Integer value) Copy the current immutable object by setting a present value for the optionalrawUpdatedattribute.final SlackUserwithRawUpdated(Optional<Integer> optional) Copy the current immutable object by setting an optional value for therawUpdatedattribute.final SlackUserwithRealName(String value) Copy the current immutable object by setting a present value for the optionalrealNameattribute.final SlackUserwithRealName(Optional<String> optional) Copy the current immutable object by setting an optional value for therealNameattribute.final SlackUserwithRestricted(Boolean value) Copy the current immutable object by setting a present value for the optionalrestrictedattribute.final SlackUserwithRestricted(Optional<Boolean> optional) Copy the current immutable object by setting an optional value for therestrictedattribute.final SlackUserwithTeamId(String value) Copy the current immutable object by setting a present value for the optionalteamIdattribute.final SlackUserwithTeamId(Optional<String> optional) Copy the current immutable object by setting an optional value for theteamIdattribute.final SlackUserwithTimezone(String value) Copy the current immutable object by setting a present value for the optionaltimezoneattribute.final SlackUserwithTimezone(Optional<String> optional) Copy the current immutable object by setting an optional value for thetimezoneattribute.final SlackUserwithTimezoneLabel(String value) Copy the current immutable object by setting a present value for the optionaltimezoneLabelattribute.final SlackUserwithTimezoneLabel(Optional<String> optional) Copy the current immutable object by setting an optional value for thetimezoneLabelattribute.final SlackUserwithTimezoneOffset(String value) Copy the current immutable object by setting a present value for the optionaltimezoneOffsetattribute.final SlackUserwithTimezoneOffset(Optional<String> optional) Copy the current immutable object by setting an optional value for thetimezoneOffsetattribute.final SlackUserwithUltraRestricted(Boolean value) Copy the current immutable object by setting a present value for the optionalultraRestrictedattribute.final SlackUserwithUltraRestricted(Optional<Boolean> optional) Copy the current immutable object by setting an optional value for theultraRestrictedattribute.final SlackUserwithUsername(String value) Copy the current immutable object by setting a present value for the optionalusernameattribute.final SlackUserwithUsername(Optional<String> optional) Copy the current immutable object by setting an optional value for theusernameattribute.
-
Method Details
-
getId
- Specified by:
getIdin interfaceSlackUserCore- Returns:
- The value of the
idattribute
-
getUsername
- Specified by:
getUsernamein interfaceSlackUserCore- Returns:
- The value of the
usernameattribute
-
getProfile
- Specified by:
getProfilein interfaceSlackUserIF- Returns:
- The value of the
profileattribute
-
isDeleted
- Specified by:
isDeletedin interfaceSlackUserIF- Returns:
- The value of the
deletedattribute
-
getColor
- Specified by:
getColorin interfaceSlackUserIF- Returns:
- The value of the
colorattribute
-
isAdmin
- Specified by:
isAdminin interfaceSlackUserIF- Returns:
- The value of the
adminattribute
-
isOwner
- Specified by:
isOwnerin interfaceSlackUserIF- Returns:
- The value of the
ownerattribute
-
getTeamId
- Specified by:
getTeamIdin interfaceSlackUserIF- Returns:
- The value of the
teamIdattribute
-
getExternalTeamId
For external (Slack Connect) users cached against a workspace they do not belong to, this holds their real home workspace team ID;getTeamId()then holds the workspace the user is cached/scoped under. Empty for regular (internal) users, so its presence is the single source of truth for whether a user is external.- Specified by:
getExternalTeamIdin interfaceSlackUserIF
-
isExternal
public boolean isExternal()Whether this user is external (a Slack Connect member) relative to the workspace this record is scoped to. Derived purely fromgetExternalTeamId()— there is no separate persisted/serialized field, so all logic can rely on this convenience method.- Specified by:
isExternalin interfaceSlackUserIF
-
getRealName
- Specified by:
getRealNamein interfaceSlackUserIF- Returns:
- The value of the
realNameattribute
-
isPrimaryOwner
- Specified by:
isPrimaryOwnerin interfaceSlackUserIF- Returns:
- The value of the
primaryOwnerattribute
-
isRestricted
- Specified by:
isRestrictedin interfaceSlackUserIF- Returns:
- The value of the
restrictedattribute
-
isUltraRestricted
- Specified by:
isUltraRestrictedin interfaceSlackUserIF- Returns:
- The value of the
ultraRestrictedattribute
-
isBot
- Specified by:
isBotin interfaceSlackUserIF- Returns:
- The value of the
botattribute
-
isAppUser
- Specified by:
isAppUserin interfaceSlackUserIF- Returns:
- The value of the
appUserattribute
-
getTimezone
- Specified by:
getTimezonein interfaceSlackUserIF- Returns:
- The value of the
timezoneattribute
-
getTimezoneLabel
- Specified by:
getTimezoneLabelin interfaceSlackUserIF- Returns:
- The value of the
timezoneLabelattribute
-
getTimezoneOffset
- Specified by:
getTimezoneOffsetin interfaceSlackUserIF- Returns:
- The value of the
timezoneOffsetattribute
-
getRawUpdated
- Specified by:
getRawUpdatedin interfaceSlackUserIF- Returns:
- The value of the
rawUpdatedattribute
-
getLocale
- Specified by:
getLocalein interfaceSlackUserIF- Returns:
- The value of the
localeattribute
-
getUpdatedAt
- Specified by:
getUpdatedAtin interfaceSlackUserIF- Returns:
- The computed-at-construction value of the
updatedAtattribute
-
withId
Copy the current immutable object by setting a value for theidattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for id- Returns:
- A modified copy or the
thisobject
-
withUsername
Copy the current immutable object by setting a present value for the optionalusernameattribute.- Parameters:
value- The value for username,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withUsername
Copy the current immutable object by setting an optional value for theusernameattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for username- Returns:
- A modified copy or
thisif not changed
-
withProfile
Copy the current immutable object by setting a present value for the optionalprofileattribute.- Parameters:
value- The value for profile,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withProfile
Copy the current immutable object by setting an optional value for theprofileattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for profile- Returns:
- A modified copy or
thisif not changed
-
withDeleted
Copy the current immutable object by setting a present value for the optionaldeletedattribute.- Parameters:
value- The value for deleted,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withDeleted
Copy the current immutable object by setting an optional value for thedeletedattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for deleted- Returns:
- A modified copy or
thisif not changed
-
withColor
Copy the current immutable object by setting a present value for the optionalcolorattribute.- Parameters:
value- The value for color,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withColor
Copy the current immutable object by setting an optional value for thecolorattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for color- Returns:
- A modified copy or
thisif not changed
-
withAdmin
Copy the current immutable object by setting a present value for the optionaladminattribute.- Parameters:
value- The value for admin,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withAdmin
Copy the current immutable object by setting an optional value for theadminattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for admin- Returns:
- A modified copy or
thisif not changed
-
withOwner
Copy the current immutable object by setting a present value for the optionalownerattribute.- Parameters:
value- The value for owner,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withOwner
Copy the current immutable object by setting an optional value for theownerattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for owner- Returns:
- A modified copy or
thisif not changed
-
withTeamId
Copy the current immutable object by setting a present value for the optionalteamIdattribute.- Parameters:
value- The value for teamId,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withTeamId
Copy the current immutable object by setting an optional value for theteamIdattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for teamId- Returns:
- A modified copy or
thisif not changed
-
withExternalTeamId
Copy the current immutable object by setting a present value for the optionalexternalTeamIdattribute.- Parameters:
value- The value for externalTeamId,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withExternalTeamId
Copy the current immutable object by setting an optional value for theexternalTeamIdattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for externalTeamId- Returns:
- A modified copy or
thisif not changed
-
withRealName
Copy the current immutable object by setting a present value for the optionalrealNameattribute.- Parameters:
value- The value for realName,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withRealName
Copy the current immutable object by setting an optional value for therealNameattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for realName- Returns:
- A modified copy or
thisif not changed
-
withPrimaryOwner
Copy the current immutable object by setting a present value for the optionalprimaryOwnerattribute.- Parameters:
value- The value for primaryOwner,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withPrimaryOwner
Copy the current immutable object by setting an optional value for theprimaryOwnerattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for primaryOwner- Returns:
- A modified copy or
thisif not changed
-
withRestricted
Copy the current immutable object by setting a present value for the optionalrestrictedattribute.- Parameters:
value- The value for restricted,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withRestricted
Copy the current immutable object by setting an optional value for therestrictedattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for restricted- Returns:
- A modified copy or
thisif not changed
-
withUltraRestricted
Copy the current immutable object by setting a present value for the optionalultraRestrictedattribute.- Parameters:
value- The value for ultraRestricted,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withUltraRestricted
Copy the current immutable object by setting an optional value for theultraRestrictedattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for ultraRestricted- Returns:
- A modified copy or
thisif not changed
-
withBot
Copy the current immutable object by setting a present value for the optionalbotattribute.- Parameters:
value- The value for bot,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withBot
Copy the current immutable object by setting an optional value for thebotattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for bot- Returns:
- A modified copy or
thisif not changed
-
withAppUser
Copy the current immutable object by setting a present value for the optionalappUserattribute.- Parameters:
value- The value for appUser,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withAppUser
Copy the current immutable object by setting an optional value for theappUserattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for appUser- Returns:
- A modified copy or
thisif not changed
-
withTimezone
Copy the current immutable object by setting a present value for the optionaltimezoneattribute.- Parameters:
value- The value for timezone,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withTimezone
Copy the current immutable object by setting an optional value for thetimezoneattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for timezone- Returns:
- A modified copy or
thisif not changed
-
withTimezoneLabel
Copy the current immutable object by setting a present value for the optionaltimezoneLabelattribute.- Parameters:
value- The value for timezoneLabel,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withTimezoneLabel
Copy the current immutable object by setting an optional value for thetimezoneLabelattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for timezoneLabel- Returns:
- A modified copy or
thisif not changed
-
withTimezoneOffset
Copy the current immutable object by setting a present value for the optionaltimezoneOffsetattribute.- Parameters:
value- The value for timezoneOffset,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withTimezoneOffset
Copy the current immutable object by setting an optional value for thetimezoneOffsetattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for timezoneOffset- Returns:
- A modified copy or
thisif not changed
-
withRawUpdated
Copy the current immutable object by setting a present value for the optionalrawUpdatedattribute.- Parameters:
value- The value for rawUpdated,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withRawUpdated
Copy the current immutable object by setting an optional value for therawUpdatedattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for rawUpdated- Returns:
- A modified copy or
thisif not changed
-
withLocale
Copy the current immutable object by setting a present value for the optionallocaleattribute.- Parameters:
value- The value for locale,nullis accepted asjava.util.Optional.empty()- Returns:
- A modified copy or
thisif not changed
-
withLocale
Copy the current immutable object by setting an optional value for thelocaleattribute. An equality check is used on inner value to prevent copying of the same value by returningthis.- Parameters:
optional- An optional value for locale- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofSlackUserthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:id,username,profile,deleted,color,admin,owner,teamId,externalTeamId,external,realName,primaryOwner,restricted,ultraRestricted,bot,appUser,timezone,timezoneLabel,timezoneOffset,rawUpdated,locale,updatedAt. -
toString
Prints the immutable valueSlackUserwith attribute values. -
copyOf
Creates an immutable copy of aSlackUserIFvalue. 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 SlackUser instance
-
builder
Creates a builder forSlackUser.SlackUser.builder() .setId(String) // requiredid.setUsername(Optional<String>) // optionalusername.setProfile(Optional<UserProfile>) // optionalprofile.setDeleted(Optional<Boolean>) // optionaldeleted.setColor(Optional<String>) // optionalcolor.setAdmin(Optional<String>) // optionaladmin.setOwner(Optional<String>) // optionalowner.setTeamId(Optional<String>) // optionalteamId.setExternalTeamId(Optional<String>) // optionalexternalTeamId.setRealName(Optional<String>) // optionalrealName.setPrimaryOwner(Optional<Boolean>) // optionalprimaryOwner.setRestricted(Optional<Boolean>) // optionalrestricted.setUltraRestricted(Optional<Boolean>) // optionalultraRestricted.setBot(Optional<Boolean>) // optionalbot.setAppUser(Optional<Boolean>) // optionalappUser.setTimezone(Optional<String>) // optionaltimezone.setTimezoneLabel(Optional<String>) // optionaltimezoneLabel.setTimezoneOffset(Optional<String>) // optionaltimezoneOffset.setRawUpdated(Optional<Integer>) // optionalrawUpdated.setLocale(Optional<String>) // optionallocale.build();- Returns:
- A new SlackUser builder
-