forked from getsentry/sentry-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUser.java
More file actions
69 lines (57 loc) · 1.68 KB
/
User.java
File metadata and controls
69 lines (57 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
package io.sentry.event;
import java.io.Serializable;
import java.util.Map;
/**
* An object that represents a user. Typically used to represent
* the user in the current context, for whatever a context means
* in your application (typically a web request).
*/
public class User implements Serializable {
private final String id;
private final String username;
private final String ipAddress;
private final String email;
private final Map<String, Object> data;
/**
* Create an immutable User object.
*
* @param id String (optional)
* @param username String (optional)
* @param ipAddress String (optional)
* @param email String (optional)
* @param data Extra user data (optional)
*/
public User(String id, String username, String ipAddress, String email, Map<String, Object> data) {
this.id = id;
this.username = username;
this.ipAddress = ipAddress;
this.email = email;
this.data = data;
}
/**
* Create an immutable User object.
*
* @param id String (optional)
* @param username String (optional)
* @param ipAddress String (optional)
* @param email String (optional)
*/
public User(String id, String username, String ipAddress, String email) {
this(id, username, ipAddress, email, null);
}
public String getId() {
return id;
}
public String getUsername() {
return username;
}
public String getIpAddress() {
return ipAddress;
}
public String getEmail() {
return email;
}
public Map<String, Object> getData() {
return data;
}
}