Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions src/main/java/io/split/android/client/dtos/Excluded.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package io.split.android.client.dtos;

import com.google.gson.annotations.SerializedName;

import java.util.Set;

public class Excluded {

@SerializedName("keys")
private Set<String> mKeys;

@SerializedName("segments")
private Set<String> mSegments;

public Set<String> getSegments() {
return mSegments;
}

public Set<String> getKeys() {
return mKeys;
}
}
59 changes: 59 additions & 0 deletions src/main/java/io/split/android/client/dtos/RuleBasedSegment.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
package io.split.android.client.dtos;

import com.google.gson.annotations.SerializedName;

import java.util.List;

public class RuleBasedSegment {

@SerializedName("name")
private final String mName;

@SerializedName("trafficTypeName")
private final String mTrafficTypeName;

@SerializedName("changeNumber")
private final long mChangeNumber;

@SerializedName("status")
private final Status mStatus;

@SerializedName("conditions")
private final List<Condition> mConditions;

@SerializedName("excluded")
private final Excluded mExcluded;

public RuleBasedSegment(String name, String trafficTypeName, long changeNumber, Status status, List<Condition> conditions, Excluded excluded) {
mName = name;
mTrafficTypeName = trafficTypeName;
mChangeNumber = changeNumber;
mStatus = status;
mConditions = conditions;
mExcluded = excluded;
}

public String getName() {
return mName;
}

public String getTrafficTypeName() {
return mTrafficTypeName;
}

public long getChangeNumber() {
return mChangeNumber;
}

public Status getStatus() {
return mStatus;
}

public List<Condition> getConditions() {
return mConditions;
}

public Excluded getExcluded() {
return mExcluded;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
package io.split.android.engine.experiments;

import java.util.List;
import java.util.Set;

public class ParsedRuleBasedSegment {
private final String mName;
private final Set<String> mExcludedKeys;
private final Set<String> mExcludedSegments;
private final List<ParsedCondition> mParsedConditions;
private final String mTrafficTypeName;
private final long mChangeNumber;

public ParsedRuleBasedSegment(String name, Set<String> excludedKeys, Set<String> excludedSegments, List<ParsedCondition> parsedConditions, String trafficTypeName, long changeNumber) {
mName = name;
mExcludedKeys = excludedKeys;
mExcludedSegments = excludedSegments;
mParsedConditions = parsedConditions;
mTrafficTypeName = trafficTypeName;
mChangeNumber = changeNumber;
}

public String getName() {
return mName;
}

public Set<String> getExcludedKeys() {
return mExcludedKeys;
}

public Set<String> getExcludedSegments() {
return mExcludedSegments;
}

public List<ParsedCondition> getParsedConditions() {
return mParsedConditions;
}

public String getTrafficTypeName() {
return mTrafficTypeName;
}

public long getChangeNumber() {
return mChangeNumber;
}
}
Loading