com.mypurecloud.sdk.model.ResourceConditionValue 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;
/**
* ResourceConditionValue
*/
public class ResourceConditionValue implements Serializable {
/**
* Gets or Sets type
*/
public enum TypeEnum {
OUTDATEDSDKVERSION("OutdatedSdkVersion"),
SCALAR("SCALAR"),
VARIABLE("VARIABLE"),
USER("USER"),
QUEUE("QUEUE");
private String value;
TypeEnum(String value) {
this.value = value;
}
@JsonCreator
public static TypeEnum fromString(String key) {
if (key == null) return null;
for (TypeEnum value : TypeEnum.values()) {
if (key.equalsIgnoreCase(value.toString())) {
return value;
}
}
return TypeEnum.values()[0];
}
@Override
@JsonValue
public String toString() {
return String.valueOf(value);
}
}
private TypeEnum type = null;
private String value = null;
/**
**/
public ResourceConditionValue type(TypeEnum type) {
this.type = type;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("type")
public TypeEnum getType() {
return type;
}
public void setType(TypeEnum type) {
this.type = type;
}
/**
**/
public ResourceConditionValue value(String value) {
this.value = value;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("value")
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ResourceConditionValue resourceConditionValue = (ResourceConditionValue) o;
return Objects.equals(this.type, resourceConditionValue.type) &&
Objects.equals(this.value, resourceConditionValue.value);
}
@Override
public int hashCode() {
return Objects.hash(type, value);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ResourceConditionValue {\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" value: ").append(toIndentedString(value)).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 ");
}
}