Package io.sentry.protocol
Class User
- java.lang.Object
-
- io.sentry.protocol.User
-
- All Implemented Interfaces:
JsonSerializable,JsonUnknown
public final class User extends java.lang.Object implements JsonUnknown, JsonSerializable
Information about the user who triggered an event.```json { "user": { "id": "unique_id", "username": "my_user", "email": "[email protected]", "ip_address": "127.0.0.1", "subscription": "basic" } } ```
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classUser.Deserializerstatic classUser.JsonKeys
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @Nullable java.lang.StringgetEmail()Gets the e-mail address of the user.@Nullable java.lang.StringgetId()Gets the id of the user.@Nullable java.lang.StringgetIpAddress()Gets the IP address of the user.@Nullable java.util.Map<java.lang.String,@NotNull java.lang.String>getOthers()Gets other user related data.@Nullable java.util.Map<java.lang.String,java.lang.Object>getUnknown()@Nullable java.lang.StringgetUsername()Gets the username of the user.voidserialize(@NotNull JsonObjectWriter writer, @NotNull ILogger logger)voidsetEmail(@Nullable java.lang.String email)Gets the e-mail address of the user.voidsetId(@Nullable java.lang.String id)Sets the id of the user.voidsetIpAddress(@Nullable java.lang.String ipAddress)Sets the IP address of the user.voidsetOthers(@Nullable java.util.Map<java.lang.String,@NotNull java.lang.String> other)Sets other user related data.voidsetUnknown(@Nullable java.util.Map<java.lang.String,java.lang.Object> unknown)voidsetUsername(@Nullable java.lang.String username)Sets the username of the user.
-
-
-
Constructor Detail
-
User
public User()
-
User
public User(@NotNull @NotNull User user)
-
-
Method Detail
-
getEmail
@Nullable public @Nullable java.lang.String getEmail()
Gets the e-mail address of the user.- Returns:
- the e-mail.
-
setEmail
public void setEmail(@Nullable @Nullable java.lang.String email)Gets the e-mail address of the user.- Parameters:
email- the e-mail.
-
getId
@Nullable public @Nullable java.lang.String getId()
Gets the id of the user.- Returns:
- the id.
-
setId
public void setId(@Nullable @Nullable java.lang.String id)Sets the id of the user.- Parameters:
id- the user id.
-
getUsername
@Nullable public @Nullable java.lang.String getUsername()
Gets the username of the user.- Returns:
- the username.
-
setUsername
public void setUsername(@Nullable @Nullable java.lang.String username)Sets the username of the user.- Parameters:
username- the username.
-
getIpAddress
@Nullable public @Nullable java.lang.String getIpAddress()
Gets the IP address of the user.- Returns:
- the IP address of the user.
-
setIpAddress
public void setIpAddress(@Nullable @Nullable java.lang.String ipAddress)Sets the IP address of the user.- Parameters:
ipAddress- the IP address of the user.
-
getOthers
@Nullable public @Nullable java.util.Map<java.lang.String,@NotNull java.lang.String> getOthers()
Gets other user related data.- Returns:
- the other user data.
-
setOthers
public void setOthers(@Nullable @Nullable java.util.Map<java.lang.String,@NotNull java.lang.String> other)Sets other user related data.- Parameters:
other- the other user related data..
-
getUnknown
@Nullable public @Nullable java.util.Map<java.lang.String,java.lang.Object> getUnknown()
- Specified by:
getUnknownin interfaceJsonUnknown
-
setUnknown
public void setUnknown(@Nullable @Nullable java.util.Map<java.lang.String,java.lang.Object> unknown)- Specified by:
setUnknownin interfaceJsonUnknown
-
serialize
public void serialize(@NotNull @NotNull JsonObjectWriter writer, @NotNull @NotNull ILogger logger) throws java.io.IOException- Specified by:
serializein interfaceJsonSerializable- Throws:
java.io.IOException
-
-