5
5
6
6
import com .fasterxml .jackson .annotation .*;
7
7
import com .fasterxml .jackson .databind .annotation .*;
8
+ import java .util .ArrayList ;
9
+ import java .util .List ;
8
10
import java .util .Objects ;
9
11
10
12
/** EstimateABTestResponse */
@@ -13,11 +15,8 @@ public class EstimateABTestResponse {
13
15
@ JsonProperty ("durationDays" )
14
16
private Long durationDays ;
15
17
16
- @ JsonProperty ("controlSampleSize" )
17
- private Long controlSampleSize ;
18
-
19
- @ JsonProperty ("experimentSampleSize" )
20
- private Long experimentSampleSize ;
18
+ @ JsonProperty ("sampleSizes" )
19
+ private List <Long > sampleSizes ;
21
20
22
21
public EstimateABTestResponse setDurationDays (Long durationDays ) {
23
22
this .durationDays = durationDays ;
@@ -33,32 +32,26 @@ public Long getDurationDays() {
33
32
return durationDays ;
34
33
}
35
34
36
- public EstimateABTestResponse setControlSampleSize ( Long controlSampleSize ) {
37
- this .controlSampleSize = controlSampleSize ;
35
+ public EstimateABTestResponse setSampleSizes ( List < Long > sampleSizes ) {
36
+ this .sampleSizes = sampleSizes ;
38
37
return this ;
39
38
}
40
39
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 );
52
45
return this ;
53
46
}
54
47
55
48
/**
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 .
58
51
*/
59
52
@ javax .annotation .Nullable
60
- public Long getExperimentSampleSize () {
61
- return experimentSampleSize ;
53
+ public List < Long > getSampleSizes () {
54
+ return sampleSizes ;
62
55
}
63
56
64
57
@ Override
@@ -72,23 +65,21 @@ public boolean equals(Object o) {
72
65
EstimateABTestResponse estimateABTestResponse = (EstimateABTestResponse ) o ;
73
66
return (
74
67
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 )
77
69
);
78
70
}
79
71
80
72
@ Override
81
73
public int hashCode () {
82
- return Objects .hash (durationDays , controlSampleSize , experimentSampleSize );
74
+ return Objects .hash (durationDays , sampleSizes );
83
75
}
84
76
85
77
@ Override
86
78
public String toString () {
87
79
StringBuilder sb = new StringBuilder ();
88
80
sb .append ("class EstimateABTestResponse {\n " );
89
81
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 " );
92
83
sb .append ("}" );
93
84
return sb .toString ();
94
85
}
0 commit comments