com.mypurecloud.sdk.model.Extension 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;
/**
* Extension
*/
public class Extension implements Serializable {
private String id = null;
private String name = null;
private String description = null;
private Integer version = null;
private Date dateCreated = null;
private Date dateModified = null;
private String modifiedBy = null;
private String createdBy = null;
/**
* Gets or Sets state
*/
public enum StateEnum {
OUTDATEDSDKVERSION("OutdatedSdkVersion"),
ACTIVE("active"),
INACTIVE("inactive"),
DELETED("deleted");
private String value;
StateEnum(String value) {
this.value = value;
}
@JsonCreator
public static StateEnum fromString(String key) {
if (key == null) return null;
for (StateEnum value : StateEnum.values()) {
if (key.equalsIgnoreCase(value.toString())) {
return value;
}
}
return StateEnum.values()[0];
}
@Override
@JsonValue
public String toString() {
return String.valueOf(value);
}
}
private StateEnum state = null;
private String modifiedByApp = null;
private String createdByApp = null;
private String number = null;
private UriReference owner = null;
private UriReference extensionPool = null;
/**
* Gets or Sets ownerType
*/
public enum OwnerTypeEnum {
OUTDATEDSDKVERSION("OutdatedSdkVersion"),
USER("USER"),
PHONE("PHONE"),
IVR_CONFIG("IVR_CONFIG"),
GROUP("GROUP");
private String value;
OwnerTypeEnum(String value) {
this.value = value;
}
@JsonCreator
public static OwnerTypeEnum fromString(String key) {
if (key == null) return null;
for (OwnerTypeEnum value : OwnerTypeEnum.values()) {
if (key.equalsIgnoreCase(value.toString())) {
return value;
}
}
return OwnerTypeEnum.values()[0];
}
@Override
@JsonValue
public String toString() {
return String.valueOf(value);
}
}
private OwnerTypeEnum ownerType = null;
private String selfUri = null;
@ApiModelProperty(example = "null", value = "The globally unique identifier for the object.")
@JsonProperty("id")
public String getId() {
return id;
}
/**
* The name of the entity.
**/
public Extension name(String name) {
this.name = name;
return this;
}
@ApiModelProperty(example = "null", required = true, value = "The name of the entity.")
@JsonProperty("name")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
/**
**/
public Extension description(String description) {
this.description = description;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("description")
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
/**
**/
public Extension version(Integer version) {
this.version = version;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("version")
public Integer getVersion() {
return version;
}
public void setVersion(Integer version) {
this.version = version;
}
/**
* Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ
**/
public Extension 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 Extension dateModified(Date dateModified) {
this.dateModified = dateModified;
return this;
}
@ApiModelProperty(example = "null", value = "Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ")
@JsonProperty("dateModified")
public Date getDateModified() {
return dateModified;
}
public void setDateModified(Date dateModified) {
this.dateModified = dateModified;
}
/**
**/
public Extension modifiedBy(String modifiedBy) {
this.modifiedBy = modifiedBy;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("modifiedBy")
public String getModifiedBy() {
return modifiedBy;
}
public void setModifiedBy(String modifiedBy) {
this.modifiedBy = modifiedBy;
}
/**
**/
public Extension createdBy(String createdBy) {
this.createdBy = createdBy;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("createdBy")
public String getCreatedBy() {
return createdBy;
}
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
/**
**/
public Extension state(StateEnum state) {
this.state = state;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("state")
public StateEnum getState() {
return state;
}
public void setState(StateEnum state) {
this.state = state;
}
/**
**/
public Extension modifiedByApp(String modifiedByApp) {
this.modifiedByApp = modifiedByApp;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("modifiedByApp")
public String getModifiedByApp() {
return modifiedByApp;
}
public void setModifiedByApp(String modifiedByApp) {
this.modifiedByApp = modifiedByApp;
}
/**
**/
public Extension createdByApp(String createdByApp) {
this.createdByApp = createdByApp;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("createdByApp")
public String getCreatedByApp() {
return createdByApp;
}
public void setCreatedByApp(String createdByApp) {
this.createdByApp = createdByApp;
}
/**
**/
public Extension number(String number) {
this.number = number;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("number")
public String getNumber() {
return number;
}
public void setNumber(String number) {
this.number = number;
}
/**
* A Uri reference to the owner of this extension, which is either a User or an IVR
**/
public Extension owner(UriReference owner) {
this.owner = owner;
return this;
}
@ApiModelProperty(example = "null", value = "A Uri reference to the owner of this extension, which is either a User or an IVR")
@JsonProperty("owner")
public UriReference getOwner() {
return owner;
}
public void setOwner(UriReference owner) {
this.owner = owner;
}
/**
**/
public Extension extensionPool(UriReference extensionPool) {
this.extensionPool = extensionPool;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("extensionPool")
public UriReference getExtensionPool() {
return extensionPool;
}
public void setExtensionPool(UriReference extensionPool) {
this.extensionPool = extensionPool;
}
/**
**/
public Extension ownerType(OwnerTypeEnum ownerType) {
this.ownerType = ownerType;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("ownerType")
public OwnerTypeEnum getOwnerType() {
return ownerType;
}
public void setOwnerType(OwnerTypeEnum ownerType) {
this.ownerType = ownerType;
}
@ApiModelProperty(example = "null", value = "The URI for this object")
@JsonProperty("selfUri")
public String getSelfUri() {
return selfUri;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Extension extension = (Extension) o;
return Objects.equals(this.id, extension.id) &&
Objects.equals(this.name, extension.name) &&
Objects.equals(this.description, extension.description) &&
Objects.equals(this.version, extension.version) &&
Objects.equals(this.dateCreated, extension.dateCreated) &&
Objects.equals(this.dateModified, extension.dateModified) &&
Objects.equals(this.modifiedBy, extension.modifiedBy) &&
Objects.equals(this.createdBy, extension.createdBy) &&
Objects.equals(this.state, extension.state) &&
Objects.equals(this.modifiedByApp, extension.modifiedByApp) &&
Objects.equals(this.createdByApp, extension.createdByApp) &&
Objects.equals(this.number, extension.number) &&
Objects.equals(this.owner, extension.owner) &&
Objects.equals(this.extensionPool, extension.extensionPool) &&
Objects.equals(this.ownerType, extension.ownerType) &&
Objects.equals(this.selfUri, extension.selfUri);
}
@Override
public int hashCode() {
return Objects.hash(id, name, description, version, dateCreated, dateModified, modifiedBy, createdBy, state, modifiedByApp, createdByApp, number, owner, extensionPool, ownerType, selfUri);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Extension {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" version: ").append(toIndentedString(version)).append("\n");
sb.append(" dateCreated: ").append(toIndentedString(dateCreated)).append("\n");
sb.append(" dateModified: ").append(toIndentedString(dateModified)).append("\n");
sb.append(" modifiedBy: ").append(toIndentedString(modifiedBy)).append("\n");
sb.append(" createdBy: ").append(toIndentedString(createdBy)).append("\n");
sb.append(" state: ").append(toIndentedString(state)).append("\n");
sb.append(" modifiedByApp: ").append(toIndentedString(modifiedByApp)).append("\n");
sb.append(" createdByApp: ").append(toIndentedString(createdByApp)).append("\n");
sb.append(" number: ").append(toIndentedString(number)).append("\n");
sb.append(" owner: ").append(toIndentedString(owner)).append("\n");
sb.append(" extensionPool: ").append(toIndentedString(extensionPool)).append("\n");
sb.append(" ownerType: ").append(toIndentedString(ownerType)).append("\n");
sb.append(" selfUri: ").append(toIndentedString(selfUri)).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 ");
}
}