|
| 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 | +} |
0 commit comments