com.mypurecloud.sdk.model.ManagementUnit 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;
/**
* Management Unit object for Workforce Management.
*/
@ApiModel(description = "Management Unit object for Workforce Management.")
public class ManagementUnit implements Serializable {
private String id = null;
private String name = null;
/**
* Start day of week for workforce management planning purposes
*/
public enum StartDayOfWeekEnum {
OUTDATEDSDKVERSION("OutdatedSdkVersion"),
MONDAY("Monday"),
TUESDAY("Tuesday"),
WEDNESDAY("Wednesday"),
THURSDAY("Thursday"),
FRIDAY("Friday"),
SATURDAY("Saturday"),
SUNDAY("Sunday");
private String value;
StartDayOfWeekEnum(String value) {
this.value = value;
}
@JsonCreator
public static StartDayOfWeekEnum fromString(String key) {
if (key == null) return null;
for (StartDayOfWeekEnum value : StartDayOfWeekEnum.values()) {
if (key.equalsIgnoreCase(value.toString())) {
return value;
}
}
return StartDayOfWeekEnum.values()[0];
}
@Override
@JsonValue
public String toString() {
return String.valueOf(value);
}
}
private StartDayOfWeekEnum startDayOfWeek = null;
private String timezone = null;
private Integer version = null;
private String selfUri = null;
@ApiModelProperty(example = "null", value = "The globally unique identifier for the object.")
@JsonProperty("id")
public String getId() {
return id;
}
/**
**/
public ManagementUnit name(String name) {
this.name = name;
return this;
}
@ApiModelProperty(example = "null", value = "")
@JsonProperty("name")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
/**
* Start day of week for workforce management planning purposes
**/
public ManagementUnit startDayOfWeek(StartDayOfWeekEnum startDayOfWeek) {
this.startDayOfWeek = startDayOfWeek;
return this;
}
@ApiModelProperty(example = "null", value = "Start day of week for workforce management planning purposes")
@JsonProperty("startDayOfWeek")
public StartDayOfWeekEnum getStartDayOfWeek() {
return startDayOfWeek;
}
public void setStartDayOfWeek(StartDayOfWeekEnum startDayOfWeek) {
this.startDayOfWeek = startDayOfWeek;
}
/**
* The time zone for the management unit in standard Olson Format (See https://en.wikipedia.org/wiki/Tz_database)
**/
public ManagementUnit timezone(String timezone) {
this.timezone = timezone;
return this;
}
@ApiModelProperty(example = "null", value = "The time zone for the management unit in standard Olson Format (See https://en.wikipedia.org/wiki/Tz_database)")
@JsonProperty("timezone")
public String getTimezone() {
return timezone;
}
public void setTimezone(String timezone) {
this.timezone = timezone;
}
/**
* The version of the underlying ManagementUnit object. Useful for handling eventual consistency issues. User must submit the current version they of the ManagementUnit in any write requests
**/
public ManagementUnit version(Integer version) {
this.version = version;
return this;
}
@ApiModelProperty(example = "null", required = true, value = "The version of the underlying ManagementUnit object. Useful for handling eventual consistency issues. User must submit the current version they of the ManagementUnit in any write requests")
@JsonProperty("version")
public Integer getVersion() {
return version;
}
public void setVersion(Integer version) {
this.version = version;
}
@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;
}
ManagementUnit managementUnit = (ManagementUnit) o;
return Objects.equals(this.id, managementUnit.id) &&
Objects.equals(this.name, managementUnit.name) &&
Objects.equals(this.startDayOfWeek, managementUnit.startDayOfWeek) &&
Objects.equals(this.timezone, managementUnit.timezone) &&
Objects.equals(this.version, managementUnit.version) &&
Objects.equals(this.selfUri, managementUnit.selfUri);
}
@Override
public int hashCode() {
return Objects.hash(id, name, startDayOfWeek, timezone, version, selfUri);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ManagementUnit {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" startDayOfWeek: ").append(toIndentedString(startDayOfWeek)).append("\n");
sb.append(" timezone: ").append(toIndentedString(timezone)).append("\n");
sb.append(" version: ").append(toIndentedString(version)).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 ");
}
}