com.mypurecloud.sdk.model.LockInfo 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 com.mypurecloud.sdk.model.UriReference;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
import java.io.Serializable;
/**
* LockInfo
*/
public class LockInfo implements Serializable {
private UriReference lockedBy = null;
private Date dateCreated = null;
private Date dateExpires = null;
/**
* Gets or Sets action
*/
public enum ActionEnum {
OUTDATEDSDKVERSION("OutdatedSdkVersion"),
UPDATE("UPDATE"),
DELETE("DELETE"),
COPY("COPY"),
MOVE("MOVE"),
REPLACE("REPLACE"),
THUMBNAIL("THUMBNAIL"),
TEXT_EXTRACTION("TEXT_EXTRACTION");
private String value;
ActionEnum(String value) {
this.value = value;
}
@JsonCreator
public static ActionEnum fromString(String key) {
if (key == null) return null;
for (ActionEnum value : ActionEnum.values()) {
if (key.equalsIgnoreCase(value.toString())) {
return value;
}
}
return ActionEnum.values()[0];
}
@Override
@JsonValue
public String toString() {
return String.valueOf(value);
}
}
private ActionEnum action = null;
/**
**/
public LockInfo lockedBy(UriReference lockedBy) {
this.lockedBy = lockedBy;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("lockedBy")
public UriReference getLockedBy() {
return lockedBy;
}
public void setLockedBy(UriReference lockedBy) {
this.lockedBy = lockedBy;
}
/**
* Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ
**/
public LockInfo dateCreated(Date dateCreated) {
this.dateCreated = dateCreated;
return this;
}
@ApiModelProperty(example = "null", value = "Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ")
@JsonProperty("dateCreated")
public Date getDateCreated() {
return dateCreated;
}
public void setDateCreated(Date dateCreated) {
this.dateCreated = dateCreated;
}
/**
* Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ
**/
public LockInfo dateExpires(Date dateExpires) {
this.dateExpires = dateExpires;
return this;
}
@ApiModelProperty(example = "null", value = "Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ")
@JsonProperty("dateExpires")
public Date getDateExpires() {
return dateExpires;
}
public void setDateExpires(Date dateExpires) {
this.dateExpires = dateExpires;
}
/**
**/
public LockInfo action(ActionEnum action) {
this.action = action;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("action")
public ActionEnum getAction() {
return action;
}
public void setAction(ActionEnum action) {
this.action = action;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
LockInfo lockInfo = (LockInfo) o;
return Objects.equals(this.lockedBy, lockInfo.lockedBy) &&
Objects.equals(this.dateCreated, lockInfo.dateCreated) &&
Objects.equals(this.dateExpires, lockInfo.dateExpires) &&
Objects.equals(this.action, lockInfo.action);
}
@Override
public int hashCode() {
return Objects.hash(lockedBy, dateCreated, dateExpires, action);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class LockInfo {\n");
sb.append(" lockedBy: ").append(toIndentedString(lockedBy)).append("\n");
sb.append(" dateCreated: ").append(toIndentedString(dateCreated)).append("\n");
sb.append(" dateExpires: ").append(toIndentedString(dateExpires)).append("\n");
sb.append(" action: ").append(toIndentedString(action)).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 ");
}
}