All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.rtr.alchemy.dto.requests.CreateExperimentRequest Maven / Gradle / Ivy

There is a newer version: 2.2.14
Show newest version
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;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy