
com.ellucian.generated.eedm.employees.v11_0.HoursPerPeriod Maven / Gradle / Ivy
package com.ellucian.generated.eedm.employees.v11_0;
import java.util.HashMap;
import java.util.Map;
import javax.annotation.processing.Generated;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonValue;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"period",
"hours"
})
@Generated("jsonschema2pojo")
public class HoursPerPeriod {
/**
* Period
*
* The time period for which working hours are considered.
* (Required)
*
*/
@JsonProperty("period")
@JsonPropertyDescription("The time period for which working hours are considered.")
private HoursPerPeriod.Period period;
/**
* Hours
*
* The number of hours worked per period.
* (Required)
*
*/
@JsonProperty("hours")
@JsonPropertyDescription("The number of hours worked per period.")
private Double hours;
/**
* Period
*
* The time period for which working hours are considered.
* (Required)
*
*/
@JsonProperty("period")
public HoursPerPeriod.Period getPeriod() {
return period;
}
/**
* Period
*
* The time period for which working hours are considered.
* (Required)
*
*/
@JsonProperty("period")
public void setPeriod(HoursPerPeriod.Period period) {
this.period = period;
}
public HoursPerPeriod withPeriod(HoursPerPeriod.Period period) {
this.period = period;
return this;
}
/**
* Hours
*
* The number of hours worked per period.
* (Required)
*
*/
@JsonProperty("hours")
public Double getHours() {
return hours;
}
/**
* Hours
*
* The number of hours worked per period.
* (Required)
*
*/
@JsonProperty("hours")
public void setHours(Double hours) {
this.hours = hours;
}
public HoursPerPeriod withHours(Double hours) {
this.hours = hours;
return this;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(HoursPerPeriod.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('[');
sb.append("period");
sb.append('=');
sb.append(((this.period == null)?"":this.period));
sb.append(',');
sb.append("hours");
sb.append('=');
sb.append(((this.hours == null)?"":this.hours));
sb.append(',');
if (sb.charAt((sb.length()- 1)) == ',') {
sb.setCharAt((sb.length()- 1), ']');
} else {
sb.append(']');
}
return sb.toString();
}
@Override
public int hashCode() {
int result = 1;
result = ((result* 31)+((this.period == null)? 0 :this.period.hashCode()));
result = ((result* 31)+((this.hours == null)? 0 :this.hours.hashCode()));
return result;
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if ((other instanceof HoursPerPeriod) == false) {
return false;
}
HoursPerPeriod rhs = ((HoursPerPeriod) other);
return (((this.period == rhs.period)||((this.period!= null)&&this.period.equals(rhs.period)))&&((this.hours == rhs.hours)||((this.hours!= null)&&this.hours.equals(rhs.hours))));
}
/**
* Period
*
* The time period for which working hours are considered.
*
*/
@Generated("jsonschema2pojo")
public enum Period {
DAY("day"),
WEEK("week"),
MONTH("month"),
YEAR("year"),
PAY_PERIOD("payPeriod");
private final String value;
private final static Map CONSTANTS = new HashMap();
static {
for (HoursPerPeriod.Period c: values()) {
CONSTANTS.put(c.value, c);
}
}
Period(String value) {
this.value = value;
}
@Override
public String toString() {
return this.value;
}
@JsonValue
public String value() {
return this.value;
}
@JsonCreator
public static HoursPerPeriod.Period fromValue(String value) {
HoursPerPeriod.Period constant = CONSTANTS.get(value);
if (constant == null) {
throw new IllegalArgumentException(value);
} else {
return constant;
}
}
}
}