com.algolia.model.abtesting.ScheduleABTestsRequest Maven / Gradle / Ivy
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost
// - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
package com.algolia.model.abtesting;
import com.fasterxml.jackson.annotation.*;
import com.fasterxml.jackson.databind.annotation.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
/** ScheduleABTestsRequest */
public class ScheduleABTestsRequest {
@JsonProperty("name")
private String name;
@JsonProperty("variants")
private List variants = new ArrayList<>();
@JsonProperty("scheduledAt")
private String scheduledAt;
@JsonProperty("endAt")
private String endAt;
public ScheduleABTestsRequest setName(String name) {
this.name = name;
return this;
}
/** A/B test name. */
@javax.annotation.Nonnull
public String getName() {
return name;
}
public ScheduleABTestsRequest setVariants(List variants) {
this.variants = variants;
return this;
}
public ScheduleABTestsRequest addVariants(AddABTestsVariant variantsItem) {
this.variants.add(variantsItem);
return this;
}
/** A/B test variants. */
@javax.annotation.Nonnull
public List getVariants() {
return variants;
}
public ScheduleABTestsRequest setScheduledAt(String scheduledAt) {
this.scheduledAt = scheduledAt;
return this;
}
/** Date and time when the A/B test is scheduled to start, in RFC 3339 format. */
@javax.annotation.Nonnull
public String getScheduledAt() {
return scheduledAt;
}
public ScheduleABTestsRequest setEndAt(String endAt) {
this.endAt = endAt;
return this;
}
/** End date and time of the A/B test, in RFC 3339 format. */
@javax.annotation.Nonnull
public String getEndAt() {
return endAt;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ScheduleABTestsRequest scheduleABTestsRequest = (ScheduleABTestsRequest) o;
return (
Objects.equals(this.name, scheduleABTestsRequest.name) &&
Objects.equals(this.variants, scheduleABTestsRequest.variants) &&
Objects.equals(this.scheduledAt, scheduleABTestsRequest.scheduledAt) &&
Objects.equals(this.endAt, scheduleABTestsRequest.endAt)
);
}
@Override
public int hashCode() {
return Objects.hash(name, variants, scheduledAt, endAt);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ScheduleABTestsRequest {\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" variants: ").append(toIndentedString(variants)).append("\n");
sb.append(" scheduledAt: ").append(toIndentedString(scheduledAt)).append("\n");
sb.append(" endAt: ").append(toIndentedString(endAt)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy