io.rtr.alchemy.dto.requests.CreateExperimentRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of alchemy-api Show documentation
Show all versions of alchemy-api Show documentation
Representations for Alchemy Service
package io.rtr.alchemy.dto.requests;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.rtr.alchemy.dto.models.TreatmentDto;
import java.util.List;
import java.util.Set;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
/** Represents a request for creating an experiment */
public class CreateExperimentRequest {
@NotNull private final String name;
private final Integer seed;
private final String description;
private final String filter;
private final Set hashAttributes;
private final Boolean active;
@Valid private final List treatments;
@Valid private final List allocations;
@Valid private final List overrides;
public CreateExperimentRequest(
@JsonProperty("name") String name,
@JsonProperty("seed") Integer seed,
@JsonProperty("description") String description,
@JsonProperty("filter") String filter,
@JsonProperty("hashAttributes") Set hashAttributes,
@JsonProperty("active") Boolean active,
@JsonProperty("treatments") List treatments,
@JsonProperty("allocations") List allocations,
@JsonProperty("overrides") List overrides) {
this.name = name;
this.seed = seed;
this.description = description;
this.filter = filter;
this.hashAttributes = hashAttributes;
this.active = active;
this.treatments = treatments;
this.allocations = allocations;
this.overrides = overrides;
}
public String getName() {
return name;
}
public Integer getSeed() {
return seed;
}
public String getDescription() {
return description;
}
public String getFilter() {
return filter;
}
public Set getHashAttributes() {
return hashAttributes;
}
public Boolean isActive() {
return active;
}
public List getTreatments() {
return treatments;
}
public List getAllocations() {
return allocations;
}
public List getOverrides() {
return overrides;
}
}