cloud.eppo.logging.Assignment Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sdk-common-jvm Show documentation
Show all versions of sdk-common-jvm Show documentation
Eppo SDK for JVM shared library
package cloud.eppo.logging;
import cloud.eppo.api.Attributes;
import java.util.Date;
import java.util.Map;
public class Assignment {
private final Date timestamp;
private final String experiment;
private final String featureFlag;
private final String allocation;
private final String variation;
private final String subject;
private final Attributes subjectAttributes;
private final Map extraLogging;
private final Map metaData;
public Assignment(
String experiment,
String featureFlag,
String allocation,
String variation,
String subject,
Attributes subjectAttributes,
Map extraLogging,
Map metaData) {
this.timestamp = new Date();
this.experiment = experiment;
this.featureFlag = featureFlag;
this.allocation = allocation;
this.variation = variation;
this.subject = subject;
this.subjectAttributes = subjectAttributes;
this.extraLogging = extraLogging;
this.metaData = metaData;
}
public String getExperiment() {
return experiment;
}
public String getFeatureFlag() {
return featureFlag;
}
public String getAllocation() {
return allocation;
}
public String getVariation() {
return variation;
}
public String getSubject() {
return subject;
}
public Date getTimestamp() {
return timestamp;
}
public Attributes getSubjectAttributes() {
return subjectAttributes;
}
public Map getExtraLogging() {
return extraLogging;
}
public Map getMetaData() {
return metaData;
}
@Override
public String toString() {
return "Subject "
+ subject
+ " assigned to variation "
+ variation
+ " in experiment "
+ experiment;
}
}