com.mypurecloud.sdk.model.RoutingStatus 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.util.Date;
import java.io.Serializable;
/**
* RoutingStatus
*/
public class RoutingStatus implements Serializable {
private String userId = null;
/**
* Indicates the Routing State of the agent.
*/
public enum StatusEnum {
OUTDATEDSDKVERSION("OutdatedSdkVersion"),
OFF_QUEUE("OFF_QUEUE"),
IDLE("IDLE"),
INTERACTING("INTERACTING"),
NOT_RESPONDING("NOT_RESPONDING"),
COMMUNICATING("COMMUNICATING");
private String value;
StatusEnum(String value) {
this.value = value;
}
@JsonCreator
public static StatusEnum fromString(String key) {
if (key == null) return null;
for (StatusEnum value : StatusEnum.values()) {
if (key.equalsIgnoreCase(value.toString())) {
return value;
}
}
return StatusEnum.values()[0];
}
@Override
@JsonValue
public String toString() {
return String.valueOf(value);
}
}
private StatusEnum status = null;
private Date startTime = null;
/**
* The userId of the agent
**/
public RoutingStatus userId(String userId) {
this.userId = userId;
return this;
}
@ApiModelProperty(example = "null", value = "The userId of the agent")
@JsonProperty("userId")
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
/**
* Indicates the Routing State of the agent.
**/
public RoutingStatus status(StatusEnum status) {
this.status = status;
return this;
}
@ApiModelProperty(example = "null", value = "Indicates the Routing State of the agent.")
@JsonProperty("status")
public StatusEnum getStatus() {
return status;
}
public void setStatus(StatusEnum status) {
this.status = status;
}
/**
* The timestamp when the agent went into this state. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ
**/
public RoutingStatus startTime(Date startTime) {
this.startTime = startTime;
return this;
}
@ApiModelProperty(example = "null", value = "The timestamp when the agent went into this state. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ")
@JsonProperty("startTime")
public Date getStartTime() {
return startTime;
}
public void setStartTime(Date startTime) {
this.startTime = startTime;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
RoutingStatus routingStatus = (RoutingStatus) o;
return Objects.equals(this.userId, routingStatus.userId) &&
Objects.equals(this.status, routingStatus.status) &&
Objects.equals(this.startTime, routingStatus.startTime);
}
@Override
public int hashCode() {
return Objects.hash(userId, status, startTime);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class RoutingStatus {\n");
sb.append(" userId: ").append(toIndentedString(userId)).append("\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
sb.append(" startTime: ").append(toIndentedString(startTime)).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 ");
}
}