Package com.atlan.model.admin
Class AtlanUser
java.lang.Object
com.atlan.model.core.AtlanObject
com.atlan.model.admin.AtlanUser
- All Implemented Interfaces:
Serializable
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
AtlanUser.AtlanUserBuilder<C extends AtlanUser,
B extends AtlanUser.AtlanUserBuilder<C, B>> static final class
Personas associated with a user.static final class
Nested classes/interfaces inherited from class com.atlan.model.core.AtlanObject
AtlanObject.AtlanObjectBuilder<C extends AtlanObject,
B extends AtlanObject.AtlanObjectBuilder<C, B>> -
Field Summary
Fields inherited from class com.atlan.model.core.AtlanObject
rawJsonObject
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addToGroups
(AtlanClient client, List<String> groupIds) Add this user to one or more groups.void
addToGroups
(List<String> groupIds) Add this user to one or more groups.static AtlanUser.AtlanUserBuilder<?,
?> builder()
protected boolean
void
changeRole
(AtlanClient client, String roleId) Change the role of this user.void
changeRole
(String roleId) Change the role of this user.void
create()
Send this user to Atlan to create the user in Atlan.create
(boolean returnUser) Send this user to Atlan to create the user in Atlan, and return the created user.void
create
(AtlanClient client) Send this user to Atlan to create the user in Atlan.create
(AtlanClient client, boolean returnUser) Send this user to Atlan to create the user in Atlan, and return the created user.static AtlanUser.AtlanUserBuilder<?,
?> Builds the minimal object necessary to create (invite) a user.boolean
Fetch the groups this user belongs to.fetchGroups
(AtlanClient client) Fetch the groups this user belongs to.Retrieve the sessions for this user.fetchSessions
(AtlanClient client) Retrieve the sessions for this user.List of administration-related events for this user.Detailed attributes of the user.getByEmail
(AtlanClient client, String email) Retrieves all users with email addresses that contain the provided email.getByEmail
(String email) Retrieves all users with email addresses that contain the provided email.static AtlanUser
getByUsername
(AtlanClient client, String user) Retrieves a user based on the username.static AtlanUser
getByUsername
(String user) Retrieves a user based on the username.Time (epoch) at which the user was created, in milliseconds.TBCTBCgetEmail()
Email address of the user.When true, the email address of the user has been verified.When true, the user is enabled.First name of the user.Number of groups to which the user belongs.getId()
Unique identifier (GUID) of the user within Atlan.Time (epoch) at which the user last logged into Atlan.Last name (surname) of the user.List of login-related events for this user.Personas the user is associated with.Purposes the user is associated with.getRoles()
TBCUsername of the user within Atlan.Name of the role of the user within Atlan.int
hashCode()
list()
Retrieves all users currently defined in Atlan.list
(AtlanClient client) Retrieves all users currently defined in Atlan.toString()
update()
Send this user to Atlan to update the user in Atlan.update
(AtlanClient client) Send this user to Atlan to update the user in Atlan.static AtlanUser.AtlanUserBuilder<?,
?> Builds the minimal object necessary to update a user.Methods inherited from class com.atlan.model.core.AtlanObject
getRawJsonObject, setRawJsonObject, toJson
-
Constructor Details
-
AtlanUser
-
-
Method Details
-
creator
Builds the minimal object necessary to create (invite) a user.- Parameters:
email
- email address of the userroleName
- name of the role for the user ($admin
,$member
, or$guest
)- Returns:
- the minimal request necessary to update the user, as a builder
-
updater
Builds the minimal object necessary to update a user.- Parameters:
id
- unique identifier (GUID) of the user- Returns:
- the minimal request necessary to update the user, as a builder
-
create
Send this user to Atlan to create the user in Atlan.- Throws:
AtlanException
- on any error during API invocation
-
create
Send this user to Atlan to create the user in Atlan.- Parameters:
client
- connectivity to the Atlan tenant on which to create the user- Throws:
AtlanException
- on any error during API invocation
-
create
Send this user to Atlan to create the user in Atlan, and return the created user. Note: this will make 2 API calls, one to create the user and a second to retrieve the created user.- Parameters:
returnUser
- whether to return the created user (true) or not (false)- Returns:
- the created user
- Throws:
AtlanException
- on any error during API invocation
-
create
Send this user to Atlan to create the user in Atlan, and return the created user. Note: this will make 2 API calls, one to create the user and a second to retrieve the created user.- Parameters:
client
- connectivity to the Atlan tenant on which to create the userreturnUser
- whether to return the created user (true) or not (false)- Returns:
- the created user
- Throws:
AtlanException
- on any error during API invocation
-
update
Send this user to Atlan to update the user in Atlan. Note: you can only update users that have already signed up to Atlan. Users that are only invited (but have not yet logged in) cannot be updated.- Throws:
AtlanException
- on any error during API invocation
-
update
Send this user to Atlan to update the user in Atlan. Note: you can only update users that have already signed up to Atlan. Users that are only invited (but have not yet logged in) cannot be updated.- Parameters:
client
- connectivity to the Atlan tenant where the user should be updated- Throws:
AtlanException
- on any error during API invocation
-
addToGroups
Add this user to one or more groups.- Parameters:
groupIds
- unique identifiers (GUIDs) of the groups to add the user into- Throws:
AtlanException
- on any API communication issue
-
addToGroups
Add this user to one or more groups.- Parameters:
client
- connectivity to the Atlan tenant where the user should be added to one or more groupsgroupIds
- unique identifiers (GUIDs) of the groups to add the user into- Throws:
AtlanException
- on any API communication issue
-
fetchGroups
Fetch the groups this user belongs to.- Returns:
- details of the groups the user belongs to
- Throws:
AtlanException
- on any API communication issue
-
fetchGroups
Fetch the groups this user belongs to.- Parameters:
client
- connectivity to the Atlan tenant from which the groups for the user should be fetched- Returns:
- details of the groups the user belongs to
- Throws:
AtlanException
- on any API communication issue
-
list
Retrieves all users currently defined in Atlan.- Returns:
- the list of users currently defined in Atlan
- Throws:
AtlanException
- on any error during API invocation
-
list
Retrieves all users currently defined in Atlan.- Parameters:
client
- connectivity to the Atlan tenant from which users should be listed- Returns:
- the list of users currently defined in Atlan
- Throws:
AtlanException
- on any error during API invocation
-
getByEmail
Retrieves all users with email addresses that contain the provided email. (This could include a complete email address, in which case there should be at most a single item in the returned list, or could be a partial email address such as "@example.com" to retrieve all users with that domain in their email address.)- Parameters:
email
- on which to filter the users- Returns:
- all users whose email addresses contain the provided string
- Throws:
AtlanException
- on any error during API invocation
-
getByEmail
Retrieves all users with email addresses that contain the provided email. (This could include a complete email address, in which case there should be at most a single item in the returned list, or could be a partial email address such as "@example.com" to retrieve all users with that domain in their email address.)- Parameters:
client
- connectivity to the Atlan tenant from which to list usersemail
- on which to filter the users- Returns:
- all users whose email addresses contain the provided string
- Throws:
AtlanException
- on any error during API invocation
-
getByUsername
Retrieves a user based on the username. (This attempts an exact match on username rather than a contains search.)- Parameters:
user
- the username by which to find the user- Returns:
- the user with that username
- Throws:
AtlanException
- on any error during API invocation
-
getByUsername
Retrieves a user based on the username. (This attempts an exact match on username rather than a contains search.)- Parameters:
client
- connectivity to the Atlan tenant from which to retrieve the useruser
- the username by which to find the user- Returns:
- the user with that username
- Throws:
AtlanException
- on any error during API invocation
-
changeRole
Change the role of this user.- Parameters:
roleId
- unique identifier (GUID) of the role to move the user into- Throws:
AtlanException
- on any API communication issue
-
changeRole
Change the role of this user.- Parameters:
client
- connectivity to the Atlan tenant in which to change the user's roleroleId
- unique identifier (GUID) of the role to move the user into- Throws:
AtlanException
- on any API communication issue
-
fetchSessions
Retrieve the sessions for this user.- Returns:
- the list of sessions for this user
- Throws:
AtlanException
- on any API communication issue
-
fetchSessions
Retrieve the sessions for this user.- Parameters:
client
- connectivity to the Atlan tenant from which to retrieve the user's sessions- Returns:
- the list of sessions for this user
- Throws:
AtlanException
- on any API communication issue
-
builder
-
toBuilder
-
getUsername
Username of the user within Atlan. -
getId
Unique identifier (GUID) of the user within Atlan. -
getWorkspaceRole
Name of the role of the user within Atlan. -
getEmail
Email address of the user. -
getEmailVerified
When true, the email address of the user has been verified. -
getEnabled
When true, the user is enabled. When false, the user has been deactivated. -
getFirstName
First name of the user. -
getLastName
Last name (surname) of the user. -
getAttributes
Detailed attributes of the user. -
getCreatedTimestamp
Time (epoch) at which the user was created, in milliseconds. -
getLastLoginTime
Time (epoch) at which the user last logged into Atlan. -
getGroupCount
Number of groups to which the user belongs. -
getDefaultRoles
TBC -
getRoles
TBC -
getDecentralizedRoles
TBC -
getPersonas
Personas the user is associated with. -
getPurposes
Purposes the user is associated with. -
getAdminEvents
List of administration-related events for this user. -
getLoginEvents
List of login-related events for this user. -
equals
- Overrides:
equals
in classAtlanObject
-
canEqual
- Overrides:
canEqual
in classAtlanObject
-
hashCode
public int hashCode()- Overrides:
hashCode
in classAtlanObject
-
toString
Description copied from class:AtlanObject
- Overrides:
toString
in classAtlanObject
-