com.mypurecloud.sdk.model.GroupContact 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;
/**
* GroupContact
*/
public class GroupContact implements Serializable {
private String address = null;
private String display = null;
/**
* Contact type of the address
*/
public enum TypeEnum {
OUTDATEDSDKVERSION("OutdatedSdkVersion"),
GROUPRING("GROUPRING"),
GROUPPHONE("GROUPPHONE");
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;
/**
* Media type of the address
*/
public enum MediaTypeEnum {
OUTDATEDSDKVERSION("OutdatedSdkVersion"),
PHONE("PHONE");
private String value;
MediaTypeEnum(String value) {
this.value = value;
}
@JsonCreator
public static MediaTypeEnum fromString(String key) {
if (key == null) return null;
for (MediaTypeEnum value : MediaTypeEnum.values()) {
if (key.equalsIgnoreCase(value.toString())) {
return value;
}
}
return MediaTypeEnum.values()[0];
}
@Override
@JsonValue
public String toString() {
return String.valueOf(value);
}
}
private MediaTypeEnum mediaType = null;
/**
* Phone number for this contact type
**/
public GroupContact address(String address) {
this.address = address;
return this;
}
@ApiModelProperty(example = "null", required = true, value = "Phone number for this contact type")
@JsonProperty("address")
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
@ApiModelProperty(example = "null", value = "Formatted version of the address property")
@JsonProperty("display")
public String getDisplay() {
return display;
}
/**
* Contact type of the address
**/
public GroupContact type(TypeEnum type) {
this.type = type;
return this;
}
@ApiModelProperty(example = "null", required = true, value = "Contact type of the address")
@JsonProperty("type")
public TypeEnum getType() {
return type;
}
public void setType(TypeEnum type) {
this.type = type;
}
/**
* Media type of the address
**/
public GroupContact mediaType(MediaTypeEnum mediaType) {
this.mediaType = mediaType;
return this;
}
@ApiModelProperty(example = "null", required = true, value = "Media type of the address")
@JsonProperty("mediaType")
public MediaTypeEnum getMediaType() {
return mediaType;
}
public void setMediaType(MediaTypeEnum mediaType) {
this.mediaType = mediaType;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GroupContact groupContact = (GroupContact) o;
return Objects.equals(this.address, groupContact.address) &&
Objects.equals(this.display, groupContact.display) &&
Objects.equals(this.type, groupContact.type) &&
Objects.equals(this.mediaType, groupContact.mediaType);
}
@Override
public int hashCode() {
return Objects.hash(address, display, type, mediaType);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class GroupContact {\n");
sb.append(" address: ").append(toIndentedString(address)).append("\n");
sb.append(" display: ").append(toIndentedString(display)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" mediaType: ").append(toIndentedString(mediaType)).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 ");
}
}