Skip to content

Commit 8c6f496

Browse files
algolia-botcdhawke
andcommitted
feat(specs): update estimate response type [skip-bc] (generated)
algolia/api-clients-automation#4101 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Christopher Hawke <[email protected]>
1 parent dd23a0d commit 8c6f496

File tree

1 file changed

+18
-27
lines changed

1 file changed

+18
-27
lines changed

algoliasearch/src/main/java/com/algolia/model/abtesting/EstimateABTestResponse.java

Lines changed: 18 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
import com.fasterxml.jackson.annotation.*;
77
import com.fasterxml.jackson.databind.annotation.*;
8+
import java.util.ArrayList;
9+
import java.util.List;
810
import java.util.Objects;
911

1012
/** EstimateABTestResponse */
@@ -13,11 +15,8 @@ public class EstimateABTestResponse {
1315
@JsonProperty("durationDays")
1416
private Long durationDays;
1517

16-
@JsonProperty("controlSampleSize")
17-
private Long controlSampleSize;
18-
19-
@JsonProperty("experimentSampleSize")
20-
private Long experimentSampleSize;
18+
@JsonProperty("sampleSizes")
19+
private List<Long> sampleSizes;
2120

2221
public EstimateABTestResponse setDurationDays(Long durationDays) {
2322
this.durationDays = durationDays;
@@ -33,32 +32,26 @@ public Long getDurationDays() {
3332
return durationDays;
3433
}
3534

36-
public EstimateABTestResponse setControlSampleSize(Long controlSampleSize) {
37-
this.controlSampleSize = controlSampleSize;
35+
public EstimateABTestResponse setSampleSizes(List<Long> sampleSizes) {
36+
this.sampleSizes = sampleSizes;
3837
return this;
3938
}
4039

41-
/**
42-
* Number of tracked searches needed to be able to detect the configured effect for the control
43-
* variant.
44-
*/
45-
@javax.annotation.Nullable
46-
public Long getControlSampleSize() {
47-
return controlSampleSize;
48-
}
49-
50-
public EstimateABTestResponse setExperimentSampleSize(Long experimentSampleSize) {
51-
this.experimentSampleSize = experimentSampleSize;
40+
public EstimateABTestResponse addSampleSizes(Long sampleSizesItem) {
41+
if (this.sampleSizes == null) {
42+
this.sampleSizes = new ArrayList<>();
43+
}
44+
this.sampleSizes.add(sampleSizesItem);
5245
return this;
5346
}
5447

5548
/**
56-
* Number of tracked searches needed to be able to detect the configured effect for the experiment
57-
* variant.
49+
* Sample size estimates for each variant. The first element is the control variant. Each element
50+
* is the estimated number of searches required to achieve the desired statistical significance.
5851
*/
5952
@javax.annotation.Nullable
60-
public Long getExperimentSampleSize() {
61-
return experimentSampleSize;
53+
public List<Long> getSampleSizes() {
54+
return sampleSizes;
6255
}
6356

6457
@Override
@@ -72,23 +65,21 @@ public boolean equals(Object o) {
7265
EstimateABTestResponse estimateABTestResponse = (EstimateABTestResponse) o;
7366
return (
7467
Objects.equals(this.durationDays, estimateABTestResponse.durationDays) &&
75-
Objects.equals(this.controlSampleSize, estimateABTestResponse.controlSampleSize) &&
76-
Objects.equals(this.experimentSampleSize, estimateABTestResponse.experimentSampleSize)
68+
Objects.equals(this.sampleSizes, estimateABTestResponse.sampleSizes)
7769
);
7870
}
7971

8072
@Override
8173
public int hashCode() {
82-
return Objects.hash(durationDays, controlSampleSize, experimentSampleSize);
74+
return Objects.hash(durationDays, sampleSizes);
8375
}
8476

8577
@Override
8678
public String toString() {
8779
StringBuilder sb = new StringBuilder();
8880
sb.append("class EstimateABTestResponse {\n");
8981
sb.append(" durationDays: ").append(toIndentedString(durationDays)).append("\n");
90-
sb.append(" controlSampleSize: ").append(toIndentedString(controlSampleSize)).append("\n");
91-
sb.append(" experimentSampleSize: ").append(toIndentedString(experimentSampleSize)).append("\n");
82+
sb.append(" sampleSizes: ").append(toIndentedString(sampleSizes)).append("\n");
9283
sb.append("}");
9384
return sb.toString();
9485
}

0 commit comments

Comments
 (0)