-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathFlagContentFieldSet.java
More file actions
118 lines (94 loc) · 3.1 KB
/
FlagContentFieldSet.java
File metadata and controls
118 lines (94 loc) · 3.1 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
package com.siftscience.model;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
public class FlagContentFieldSet extends EventsApiRequestFieldSet<FlagContentFieldSet> {
public static FlagContentFieldSet fromJson(String json) {
return gson.fromJson(json, FlagContentFieldSet.class);
}
public enum FlagContentReason {
TOXIC("$toxic"),
IRRELEVANT("$irrelevant"),
COMMERCIAL("$commercial"),
PHISHING("$phishing"),
PRIVATE("$private"),
SCAM("$scam"),
COPYRIGHT("$copyright"),
OTHER("$other");
public final String value;
FlagContentReason(String value) {
this.value = value;
}
@Override
public String toString() {
return value;
}
}
@Expose @SerializedName("$brand_name") private String brandName;
@Expose @SerializedName("$content_id") private String contentId;
@Expose @SerializedName("$flagged_by") private String flaggedBy;
@Expose @SerializedName("$reason") private String reason;
@Expose @SerializedName("$site_country") private String siteCountry;
@Expose @SerializedName("$site_domain") private String siteDomain;
@Expose @SerializedName(USER_EMAIL) private String userEmail;
@Expose @SerializedName(VERIFICATION_PHONE_NUMBER) private String verificationPhoneNumber;
@Override
public String getEventType() {
return "$flag_content";
}
public String getContentId() {
return contentId;
}
public FlagContentFieldSet setContentId(String contentId) {
this.contentId = contentId;
return this;
}
public String getFlaggedBy() {
return flaggedBy;
}
public FlagContentFieldSet setFlaggedBy(String flaggedBy) {
this.flaggedBy = flaggedBy;
return this;
}
public String getReason() {
return reason;
}
public FlagContentFieldSet setReason(FlagContentReason reason) {
this.reason = reason.value;
return this;
}
public String getUserEmail() {
return userEmail;
}
public FlagContentFieldSet setUserEmail(String userEmail) {
this.userEmail = userEmail;
return this;
}
public String getVerificationPhoneNumber() {
return verificationPhoneNumber;
}
public FlagContentFieldSet setVerificationPhoneNumber(String verificationPhoneNumber) {
this.verificationPhoneNumber = verificationPhoneNumber;
return this;
}
public String getSiteDomain() {
return siteDomain;
}
public FlagContentFieldSet setSiteDomain(String siteDomain) {
this.siteDomain = siteDomain;
return this;
}
public String getSiteCountry() {
return siteCountry;
}
public FlagContentFieldSet setSiteCountry(String siteCountry) {
this.siteCountry = siteCountry;
return this;
}
public String getBrandName() {
return brandName;
}
public FlagContentFieldSet setBrandName(String brandName) {
this.brandName = brandName;
return this;
}
}