Skip to content

Commit b6bd98a

Browse files
committed
New DTOs & POJOs (#738)
1 parent de25998 commit b6bd98a

File tree

3 files changed

+127
-0
lines changed

3 files changed

+127
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package io.split.android.client.dtos;
2+
3+
import com.google.gson.annotations.SerializedName;
4+
5+
import java.util.Set;
6+
7+
public class Excluded {
8+
9+
@SerializedName("keys")
10+
private Set<String> mKeys;
11+
12+
@SerializedName("segments")
13+
private Set<String> mSegments;
14+
15+
public Set<String> getSegments() {
16+
return mSegments;
17+
}
18+
19+
public Set<String> getKeys() {
20+
return mKeys;
21+
}
22+
}
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
package io.split.android.client.dtos;
2+
3+
import com.google.gson.annotations.SerializedName;
4+
5+
import java.util.List;
6+
7+
public class RuleBasedSegment {
8+
9+
@SerializedName("name")
10+
private final String mName;
11+
12+
@SerializedName("trafficTypeName")
13+
private final String mTrafficTypeName;
14+
15+
@SerializedName("changeNumber")
16+
private final long mChangeNumber;
17+
18+
@SerializedName("status")
19+
private final Status mStatus;
20+
21+
@SerializedName("conditions")
22+
private final List<Condition> mConditions;
23+
24+
@SerializedName("excluded")
25+
private final Excluded mExcluded;
26+
27+
public RuleBasedSegment(String name, String trafficTypeName, long changeNumber, Status status, List<Condition> conditions, Excluded excluded) {
28+
mName = name;
29+
mTrafficTypeName = trafficTypeName;
30+
mChangeNumber = changeNumber;
31+
mStatus = status;
32+
mConditions = conditions;
33+
mExcluded = excluded;
34+
}
35+
36+
public String getName() {
37+
return mName;
38+
}
39+
40+
public String getTrafficTypeName() {
41+
return mTrafficTypeName;
42+
}
43+
44+
public long getChangeNumber() {
45+
return mChangeNumber;
46+
}
47+
48+
public Status getStatus() {
49+
return mStatus;
50+
}
51+
52+
public List<Condition> getConditions() {
53+
return mConditions;
54+
}
55+
56+
public Excluded getExcluded() {
57+
return mExcluded;
58+
}
59+
}
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
package io.split.android.engine.experiments;
2+
3+
import java.util.List;
4+
import java.util.Set;
5+
6+
public class ParsedRuleBasedSegment {
7+
private final String mName;
8+
private final Set<String> mExcludedKeys;
9+
private final Set<String> mExcludedSegments;
10+
private final List<ParsedCondition> mParsedConditions;
11+
private final String mTrafficTypeName;
12+
private final long mChangeNumber;
13+
14+
public ParsedRuleBasedSegment(String name, Set<String> excludedKeys, Set<String> excludedSegments, List<ParsedCondition> parsedConditions, String trafficTypeName, long changeNumber) {
15+
mName = name;
16+
mExcludedKeys = excludedKeys;
17+
mExcludedSegments = excludedSegments;
18+
mParsedConditions = parsedConditions;
19+
mTrafficTypeName = trafficTypeName;
20+
mChangeNumber = changeNumber;
21+
}
22+
23+
public String getName() {
24+
return mName;
25+
}
26+
27+
public Set<String> getExcludedKeys() {
28+
return mExcludedKeys;
29+
}
30+
31+
public Set<String> getExcludedSegments() {
32+
return mExcludedSegments;
33+
}
34+
35+
public List<ParsedCondition> getParsedConditions() {
36+
return mParsedConditions;
37+
}
38+
39+
public String getTrafficTypeName() {
40+
return mTrafficTypeName;
41+
}
42+
43+
public long getChangeNumber() {
44+
return mChangeNumber;
45+
}
46+
}

0 commit comments

Comments
 (0)