io.swagger.client.model.SplitOptions Maven / Gradle / Ivy
/*
* elasticemail_Restful_api
* Send your emails with ElasticEmail API
*
* OpenAPI spec version: 3.0.1
* Contact: [email protected]
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package io.swagger.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
/**
* SplitOptions
*/
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-03-29T15:32:30.861Z")
public class SplitOptions {
/**
* What should be checked for choosing the winner: opens or clicks
*/
@JsonAdapter(SplitOptimizationEnum.Adapter.class)
public enum SplitOptimizationEnum {
OPENED("Opened"),
CLICKED("Clicked");
private String value;
SplitOptimizationEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static SplitOptimizationEnum fromValue(String text) {
for (SplitOptimizationEnum b : SplitOptimizationEnum.values()) {
if (String.valueOf(b.value).equals(text)) {
return b;
}
}
return null;
}
public static class Adapter extends TypeAdapter {
@Override
public void write(final JsonWriter jsonWriter, final SplitOptimizationEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public SplitOptimizationEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return SplitOptimizationEnum.fromValue(String.valueOf(value));
}
}
}
@SerializedName("SplitOptimization")
private SplitOptimizationEnum splitOptimization = null;
@SerializedName("DetermineWinnerAfterXMinutes")
private Integer determineWinnerAfterXMinutes = null;
public SplitOptions splitOptimization(SplitOptimizationEnum splitOptimization) {
this.splitOptimization = splitOptimization;
return this;
}
/**
* What should be checked for choosing the winner: opens or clicks
* @return splitOptimization
**/
@ApiModelProperty(example = "0", required = true, value = "What should be checked for choosing the winner: opens or clicks")
public SplitOptimizationEnum getSplitOptimization() {
return splitOptimization;
}
public void setSplitOptimization(SplitOptimizationEnum splitOptimization) {
this.splitOptimization = splitOptimization;
}
public SplitOptions determineWinnerAfterXMinutes(Integer determineWinnerAfterXMinutes) {
this.determineWinnerAfterXMinutes = determineWinnerAfterXMinutes;
return this;
}
/**
* Get determineWinnerAfterXMinutes
* @return determineWinnerAfterXMinutes
**/
@ApiModelProperty(required = true, value = "")
public Integer getDetermineWinnerAfterXMinutes() {
return determineWinnerAfterXMinutes;
}
public void setDetermineWinnerAfterXMinutes(Integer determineWinnerAfterXMinutes) {
this.determineWinnerAfterXMinutes = determineWinnerAfterXMinutes;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
SplitOptions splitOptions = (SplitOptions) o;
return Objects.equals(this.splitOptimization, splitOptions.splitOptimization) &&
Objects.equals(this.determineWinnerAfterXMinutes, splitOptions.determineWinnerAfterXMinutes);
}
@Override
public int hashCode() {
return Objects.hash(splitOptimization, determineWinnerAfterXMinutes);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class SplitOptions {\n");
sb.append(" splitOptimization: ").append(toIndentedString(splitOptimization)).append("\n");
sb.append(" determineWinnerAfterXMinutes: ").append(toIndentedString(determineWinnerAfterXMinutes)).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(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy