com.mypurecloud.sdk.model.PolicyConditions 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.mypurecloud.sdk.model.DurationCondition;
import com.mypurecloud.sdk.model.Queue;
import com.mypurecloud.sdk.model.TimeAllowed;
import com.mypurecloud.sdk.model.User;
import com.mypurecloud.sdk.model.WrapupCode;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
import java.io.Serializable;
/**
* PolicyConditions
*/
public class PolicyConditions implements Serializable {
private List forUsers = new ArrayList();
/**
* Gets or Sets directions
*/
public enum DirectionsEnum {
INBOUND("INBOUND"),
OUTBOUND("OUTBOUND");
private String value;
DirectionsEnum(String value) {
this.value = value;
}
@JsonCreator
public static DirectionsEnum fromString(String key) {
if (key == null) return null;
for (DirectionsEnum value : DirectionsEnum.values()) {
if (key.equalsIgnoreCase(value.toString())) {
return value;
}
}
return DirectionsEnum.values()[0];
}
@Override
@JsonValue
public String toString() {
return String.valueOf(value);
}
}
private List directions = new ArrayList();
private List dateRanges = new ArrayList();
/**
* Gets or Sets mediaTypes
*/
public enum MediaTypesEnum {
CALL("CALL"),
CHAT("CHAT");
private String value;
MediaTypesEnum(String value) {
this.value = value;
}
@JsonCreator
public static MediaTypesEnum fromString(String key) {
if (key == null) return null;
for (MediaTypesEnum value : MediaTypesEnum.values()) {
if (key.equalsIgnoreCase(value.toString())) {
return value;
}
}
return MediaTypesEnum.values()[0];
}
@Override
@JsonValue
public String toString() {
return String.valueOf(value);
}
}
private List mediaTypes = new ArrayList();
private List forQueues = new ArrayList();
private DurationCondition duration = null;
private List wrapupCodes = new ArrayList();
private TimeAllowed timeAllowed = null;
/**
**/
public PolicyConditions forUsers(List forUsers) {
this.forUsers = forUsers;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("forUsers")
public List getForUsers() {
return forUsers;
}
public void setForUsers(List forUsers) {
this.forUsers = forUsers;
}
/**
**/
public PolicyConditions directions(List directions) {
this.directions = directions;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("directions")
public List getDirections() {
return directions;
}
public void setDirections(List directions) {
this.directions = directions;
}
/**
**/
public PolicyConditions dateRanges(List dateRanges) {
this.dateRanges = dateRanges;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("dateRanges")
public List getDateRanges() {
return dateRanges;
}
public void setDateRanges(List dateRanges) {
this.dateRanges = dateRanges;
}
/**
**/
public PolicyConditions mediaTypes(List mediaTypes) {
this.mediaTypes = mediaTypes;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("mediaTypes")
public List getMediaTypes() {
return mediaTypes;
}
public void setMediaTypes(List mediaTypes) {
this.mediaTypes = mediaTypes;
}
/**
**/
public PolicyConditions forQueues(List forQueues) {
this.forQueues = forQueues;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("forQueues")
public List getForQueues() {
return forQueues;
}
public void setForQueues(List forQueues) {
this.forQueues = forQueues;
}
/**
**/
public PolicyConditions duration(DurationCondition duration) {
this.duration = duration;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("duration")
public DurationCondition getDuration() {
return duration;
}
public void setDuration(DurationCondition duration) {
this.duration = duration;
}
/**
**/
public PolicyConditions wrapupCodes(List wrapupCodes) {
this.wrapupCodes = wrapupCodes;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("wrapupCodes")
public List getWrapupCodes() {
return wrapupCodes;
}
public void setWrapupCodes(List wrapupCodes) {
this.wrapupCodes = wrapupCodes;
}
/**
**/
public PolicyConditions timeAllowed(TimeAllowed timeAllowed) {
this.timeAllowed = timeAllowed;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("timeAllowed")
public TimeAllowed getTimeAllowed() {
return timeAllowed;
}
public void setTimeAllowed(TimeAllowed timeAllowed) {
this.timeAllowed = timeAllowed;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
PolicyConditions policyConditions = (PolicyConditions) o;
return Objects.equals(this.forUsers, policyConditions.forUsers) &&
Objects.equals(this.directions, policyConditions.directions) &&
Objects.equals(this.dateRanges, policyConditions.dateRanges) &&
Objects.equals(this.mediaTypes, policyConditions.mediaTypes) &&
Objects.equals(this.forQueues, policyConditions.forQueues) &&
Objects.equals(this.duration, policyConditions.duration) &&
Objects.equals(this.wrapupCodes, policyConditions.wrapupCodes) &&
Objects.equals(this.timeAllowed, policyConditions.timeAllowed);
}
@Override
public int hashCode() {
return Objects.hash(forUsers, directions, dateRanges, mediaTypes, forQueues, duration, wrapupCodes, timeAllowed);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class PolicyConditions {\n");
sb.append(" forUsers: ").append(toIndentedString(forUsers)).append("\n");
sb.append(" directions: ").append(toIndentedString(directions)).append("\n");
sb.append(" dateRanges: ").append(toIndentedString(dateRanges)).append("\n");
sb.append(" mediaTypes: ").append(toIndentedString(mediaTypes)).append("\n");
sb.append(" forQueues: ").append(toIndentedString(forQueues)).append("\n");
sb.append(" duration: ").append(toIndentedString(duration)).append("\n");
sb.append(" wrapupCodes: ").append(toIndentedString(wrapupCodes)).append("\n");
sb.append(" timeAllowed: ").append(toIndentedString(timeAllowed)).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 ");
}
}