Skip to content

Commit d8cb6de

Browse files
algolia-botleonardogavaudanshortcuts
committed
feat(clients): add new abtesting-v3 package to clients + stabilize alpha js package (generated)
algolia/api-clients-automation#5157 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Leonardo Gavaudan <[email protected]> Co-authored-by: shortcuts <[email protected]>
1 parent 6bb708e commit d8cb6de

33 files changed

+4119
-0
lines changed

algoliasearch/src/main/java/com/algolia/api/AbtestingV3Client.java

Lines changed: 1079 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 203 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,203 @@
1+
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost
2+
// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
3+
4+
package com.algolia.model.abtestingv3;
5+
6+
import com.fasterxml.jackson.annotation.*;
7+
import com.fasterxml.jackson.databind.annotation.*;
8+
import java.util.ArrayList;
9+
import java.util.List;
10+
import java.util.Objects;
11+
12+
/** ABTest */
13+
public class ABTest {
14+
15+
@JsonProperty("abTestID")
16+
private Integer abTestID;
17+
18+
@JsonProperty("updatedAt")
19+
private String updatedAt;
20+
21+
@JsonProperty("createdAt")
22+
private String createdAt;
23+
24+
@JsonProperty("endAt")
25+
private String endAt;
26+
27+
@JsonProperty("name")
28+
private String name;
29+
30+
@JsonProperty("status")
31+
private Status status;
32+
33+
@JsonProperty("variants")
34+
private List<Variant> variants = new ArrayList<>();
35+
36+
@JsonProperty("configuration")
37+
private ABTestConfiguration configuration;
38+
39+
@JsonProperty("migratedAbTestID")
40+
private Integer migratedAbTestID;
41+
42+
public ABTest setAbTestID(Integer abTestID) {
43+
this.abTestID = abTestID;
44+
return this;
45+
}
46+
47+
/** Unique A/B test identifier. */
48+
@javax.annotation.Nonnull
49+
public Integer getAbTestID() {
50+
return abTestID;
51+
}
52+
53+
public ABTest setUpdatedAt(String updatedAt) {
54+
this.updatedAt = updatedAt;
55+
return this;
56+
}
57+
58+
/** Date and time when the A/B test was last updated, in RFC 3339 format. */
59+
@javax.annotation.Nonnull
60+
public String getUpdatedAt() {
61+
return updatedAt;
62+
}
63+
64+
public ABTest setCreatedAt(String createdAt) {
65+
this.createdAt = createdAt;
66+
return this;
67+
}
68+
69+
/** Date and time when the A/B test was created, in RFC 3339 format. */
70+
@javax.annotation.Nonnull
71+
public String getCreatedAt() {
72+
return createdAt;
73+
}
74+
75+
public ABTest setEndAt(String endAt) {
76+
this.endAt = endAt;
77+
return this;
78+
}
79+
80+
/** End date and time of the A/B test, in RFC 3339 format. */
81+
@javax.annotation.Nonnull
82+
public String getEndAt() {
83+
return endAt;
84+
}
85+
86+
public ABTest setName(String name) {
87+
this.name = name;
88+
return this;
89+
}
90+
91+
/** A/B test name. */
92+
@javax.annotation.Nonnull
93+
public String getName() {
94+
return name;
95+
}
96+
97+
public ABTest setStatus(Status status) {
98+
this.status = status;
99+
return this;
100+
}
101+
102+
/** Get status */
103+
@javax.annotation.Nonnull
104+
public Status getStatus() {
105+
return status;
106+
}
107+
108+
public ABTest setVariants(List<Variant> variants) {
109+
this.variants = variants;
110+
return this;
111+
}
112+
113+
public ABTest addVariants(Variant variantsItem) {
114+
this.variants.add(variantsItem);
115+
return this;
116+
}
117+
118+
/**
119+
* A/B test variants. The first variant is your _control_ index, typically your production index.
120+
* All of the additional variants are indexes with changed settings that you want to test against
121+
* the control.
122+
*/
123+
@javax.annotation.Nonnull
124+
public List<Variant> getVariants() {
125+
return variants;
126+
}
127+
128+
public ABTest setConfiguration(ABTestConfiguration configuration) {
129+
this.configuration = configuration;
130+
return this;
131+
}
132+
133+
/** Get configuration */
134+
@javax.annotation.Nullable
135+
public ABTestConfiguration getConfiguration() {
136+
return configuration;
137+
}
138+
139+
public ABTest setMigratedAbTestID(Integer migratedAbTestID) {
140+
this.migratedAbTestID = migratedAbTestID;
141+
return this;
142+
}
143+
144+
/** Unique migrated A/B test identifier. */
145+
@javax.annotation.Nullable
146+
public Integer getMigratedAbTestID() {
147+
return migratedAbTestID;
148+
}
149+
150+
@Override
151+
public boolean equals(Object o) {
152+
if (this == o) {
153+
return true;
154+
}
155+
if (o == null || getClass() != o.getClass()) {
156+
return false;
157+
}
158+
ABTest abTest = (ABTest) o;
159+
return (
160+
Objects.equals(this.abTestID, abTest.abTestID) &&
161+
Objects.equals(this.updatedAt, abTest.updatedAt) &&
162+
Objects.equals(this.createdAt, abTest.createdAt) &&
163+
Objects.equals(this.endAt, abTest.endAt) &&
164+
Objects.equals(this.name, abTest.name) &&
165+
Objects.equals(this.status, abTest.status) &&
166+
Objects.equals(this.variants, abTest.variants) &&
167+
Objects.equals(this.configuration, abTest.configuration) &&
168+
Objects.equals(this.migratedAbTestID, abTest.migratedAbTestID)
169+
);
170+
}
171+
172+
@Override
173+
public int hashCode() {
174+
return Objects.hash(abTestID, updatedAt, createdAt, endAt, name, status, variants, configuration, migratedAbTestID);
175+
}
176+
177+
@Override
178+
public String toString() {
179+
StringBuilder sb = new StringBuilder();
180+
sb.append("class ABTest {\n");
181+
sb.append(" abTestID: ").append(toIndentedString(abTestID)).append("\n");
182+
sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n");
183+
sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
184+
sb.append(" endAt: ").append(toIndentedString(endAt)).append("\n");
185+
sb.append(" name: ").append(toIndentedString(name)).append("\n");
186+
sb.append(" status: ").append(toIndentedString(status)).append("\n");
187+
sb.append(" variants: ").append(toIndentedString(variants)).append("\n");
188+
sb.append(" configuration: ").append(toIndentedString(configuration)).append("\n");
189+
sb.append(" migratedAbTestID: ").append(toIndentedString(migratedAbTestID)).append("\n");
190+
sb.append("}");
191+
return sb.toString();
192+
}
193+
194+
/**
195+
* Convert the given object to string with each line indented by 4 spaces (except the first line).
196+
*/
197+
private String toIndentedString(Object o) {
198+
if (o == null) {
199+
return "null";
200+
}
201+
return o.toString().replace("\n", "\n ");
202+
}
203+
}
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost
2+
// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
3+
4+
package com.algolia.model.abtestingv3;
5+
6+
import com.fasterxml.jackson.annotation.*;
7+
import com.fasterxml.jackson.databind.annotation.*;
8+
import java.util.ArrayList;
9+
import java.util.List;
10+
import java.util.Objects;
11+
12+
/** A/B test configuration. */
13+
public class ABTestConfiguration {
14+
15+
@JsonProperty("minimumDetectableEffect")
16+
private MinimumDetectableEffect minimumDetectableEffect;
17+
18+
@JsonProperty("filters")
19+
private List<MetricsFilter> filters;
20+
21+
@JsonProperty("errorCorrection")
22+
private ErrorCorrectionType errorCorrection;
23+
24+
public ABTestConfiguration setMinimumDetectableEffect(MinimumDetectableEffect minimumDetectableEffect) {
25+
this.minimumDetectableEffect = minimumDetectableEffect;
26+
return this;
27+
}
28+
29+
/** Get minimumDetectableEffect */
30+
@javax.annotation.Nullable
31+
public MinimumDetectableEffect getMinimumDetectableEffect() {
32+
return minimumDetectableEffect;
33+
}
34+
35+
public ABTestConfiguration setFilters(List<MetricsFilter> filters) {
36+
this.filters = filters;
37+
return this;
38+
}
39+
40+
public ABTestConfiguration addFilters(MetricsFilter filtersItem) {
41+
if (this.filters == null) {
42+
this.filters = new ArrayList<>();
43+
}
44+
this.filters.add(filtersItem);
45+
return this;
46+
}
47+
48+
/** List of metric filters applied to the test population. */
49+
@javax.annotation.Nullable
50+
public List<MetricsFilter> getFilters() {
51+
return filters;
52+
}
53+
54+
public ABTestConfiguration setErrorCorrection(ErrorCorrectionType errorCorrection) {
55+
this.errorCorrection = errorCorrection;
56+
return this;
57+
}
58+
59+
/** Get errorCorrection */
60+
@javax.annotation.Nullable
61+
public ErrorCorrectionType getErrorCorrection() {
62+
return errorCorrection;
63+
}
64+
65+
@Override
66+
public boolean equals(Object o) {
67+
if (this == o) {
68+
return true;
69+
}
70+
if (o == null || getClass() != o.getClass()) {
71+
return false;
72+
}
73+
ABTestConfiguration abTestConfiguration = (ABTestConfiguration) o;
74+
return (
75+
Objects.equals(this.minimumDetectableEffect, abTestConfiguration.minimumDetectableEffect) &&
76+
Objects.equals(this.filters, abTestConfiguration.filters) &&
77+
Objects.equals(this.errorCorrection, abTestConfiguration.errorCorrection)
78+
);
79+
}
80+
81+
@Override
82+
public int hashCode() {
83+
return Objects.hash(minimumDetectableEffect, filters, errorCorrection);
84+
}
85+
86+
@Override
87+
public String toString() {
88+
StringBuilder sb = new StringBuilder();
89+
sb.append("class ABTestConfiguration {\n");
90+
sb.append(" minimumDetectableEffect: ").append(toIndentedString(minimumDetectableEffect)).append("\n");
91+
sb.append(" filters: ").append(toIndentedString(filters)).append("\n");
92+
sb.append(" errorCorrection: ").append(toIndentedString(errorCorrection)).append("\n");
93+
sb.append("}");
94+
return sb.toString();
95+
}
96+
97+
/**
98+
* Convert the given object to string with each line indented by 4 spaces (except the first line).
99+
*/
100+
private String toIndentedString(Object o) {
101+
if (o == null) {
102+
return "null";
103+
}
104+
return o.toString().replace("\n", "\n ");
105+
}
106+
}

0 commit comments

Comments
 (0)