com.mypurecloud.sdk.model.ContactSort Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of platform-client Show documentation
Show all versions of platform-client Show documentation
The official Java SDK for the PureCloud Platform API SDK
The newest version!
package com.mypurecloud.sdk.model;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
/**
* ContactSort
*/
public class ContactSort implements Serializable {
private String fieldName = null;
/**
* The sort direction
*/
public enum DirectionEnum {
OUTDATEDSDKVERSION("OutdatedSdkVersion"),
ASC("ASC"),
DESC("DESC");
private String value;
DirectionEnum(String value) {
this.value = value;
}
@JsonCreator
public static DirectionEnum fromString(String key) {
if (key == null) return null;
for (DirectionEnum value : DirectionEnum.values()) {
if (key.equalsIgnoreCase(value.toString())) {
return value;
}
}
return DirectionEnum.values()[0];
}
@Override
@JsonValue
public String toString() {
return String.valueOf(value);
}
}
private DirectionEnum direction = null;
private Boolean numeric = null;
/**
**/
public ContactSort fieldName(String fieldName) {
this.fieldName = fieldName;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("fieldName")
public String getFieldName() {
return fieldName;
}
public void setFieldName(String fieldName) {
this.fieldName = fieldName;
}
/**
* The sort direction
**/
public ContactSort direction(DirectionEnum direction) {
this.direction = direction;
return this;
}
@ApiModelProperty(example = "null", value = "The sort direction")
@JsonProperty("direction")
public DirectionEnum getDirection() {
return direction;
}
public void setDirection(DirectionEnum direction) {
this.direction = direction;
}
/**
* Whether that column contains numeric data
**/
public ContactSort numeric(Boolean numeric) {
this.numeric = numeric;
return this;
}
@ApiModelProperty(example = "null", value = "Whether that column contains numeric data")
@JsonProperty("numeric")
public Boolean getNumeric() {
return numeric;
}
public void setNumeric(Boolean numeric) {
this.numeric = numeric;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ContactSort contactSort = (ContactSort) o;
return Objects.equals(this.fieldName, contactSort.fieldName) &&
Objects.equals(this.direction, contactSort.direction) &&
Objects.equals(this.numeric, contactSort.numeric);
}
@Override
public int hashCode() {
return Objects.hash(fieldName, direction, numeric);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ContactSort {\n");
sb.append(" fieldName: ").append(toIndentedString(fieldName)).append("\n");
sb.append(" direction: ").append(toIndentedString(direction)).append("\n");
sb.append(" numeric: ").append(toIndentedString(numeric)).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 ");
}
}