2222import io .swagger .annotations .ApiModel ;
2323import io .swagger .annotations .ApiModelProperty ;
2424import java .util .UUID ;
25+ import org .threeten .bp .OffsetDateTime ;
2526
2627import com .fasterxml .jackson .databind .annotation .JsonDeserialize ;
2728
@@ -34,9 +35,46 @@ public class Employee {
3435 @ JsonProperty ("EmployeeID" )
3536 private UUID employeeID = null ;
3637
38+ /**
39+ * Current status of an employee – see contact status types
40+ */
41+ public enum StatusEnum {
42+ ACTIVE ("ACTIVE" ),
43+
44+ ARCHIVED ("ARCHIVED" ),
45+
46+ GDPRREQUEST ("GDPRREQUEST" );
47+
48+ private String value ;
49+
50+ StatusEnum (String value ) {
51+ this .value = value ;
52+ }
53+
54+ @ JsonValue
55+ public String getValue () {
56+ return value ;
57+ }
58+
59+ @ Override
60+ public String toString () {
61+ return String .valueOf (value );
62+ }
63+
64+ @ JsonCreator
65+ public static StatusEnum fromValue (String text ) {
66+ for (StatusEnum b : StatusEnum .values ()) {
67+ if (String .valueOf (b .value ).equals (text )) {
68+ return b ;
69+ }
70+ }
71+ throw new IllegalArgumentException ("Unexpected value '" + text + "'" );
72+ }
73+ }
74+
3775
3876 @ JsonProperty ("Status" )
39- private String status = null ;
77+ private StatusEnum status = null ;
4078
4179
4280 @ JsonProperty ("FirstName" )
@@ -50,6 +88,10 @@ public class Employee {
5088 @ JsonProperty ("ExternalLink" )
5189 private ExternalLink externalLink = null ;
5290
91+ @ JsonDeserialize (using = com .xero .api .CustomOffsetDateTimeDeserializer .class )
92+ @ JsonProperty ("UpdatedDateUTC" )
93+ private OffsetDateTime updatedDateUTC = null ;
94+
5395 public Employee employeeID (UUID employeeID ) {
5496 this .employeeID = employeeID ;
5597 return this ;
@@ -68,7 +110,7 @@ public void setEmployeeID(UUID employeeID) {
68110 this .employeeID = employeeID ;
69111 }
70112
71- public Employee status (String status ) {
113+ public Employee status (StatusEnum status ) {
72114 this .status = status ;
73115 return this ;
74116 }
@@ -78,11 +120,11 @@ public Employee status(String status) {
78120 * @return status
79121 **/
80122 @ ApiModelProperty (value = "Current status of an employee – see contact status types" )
81- public String getStatus () {
123+ public StatusEnum getStatus () {
82124 return status ;
83125 }
84126
85- public void setStatus (String status ) {
127+ public void setStatus (StatusEnum status ) {
86128 this .status = status ;
87129 }
88130
@@ -140,6 +182,24 @@ public void setExternalLink(ExternalLink externalLink) {
140182 this .externalLink = externalLink ;
141183 }
142184
185+ public Employee updatedDateUTC (OffsetDateTime updatedDateUTC ) {
186+ this .updatedDateUTC = updatedDateUTC ;
187+ return this ;
188+ }
189+
190+ /**
191+ * Get updatedDateUTC
192+ * @return updatedDateUTC
193+ **/
194+ @ ApiModelProperty (value = "" )
195+ public OffsetDateTime getUpdatedDateUTC () {
196+ return updatedDateUTC ;
197+ }
198+
199+ public void setUpdatedDateUTC (OffsetDateTime updatedDateUTC ) {
200+ this .updatedDateUTC = updatedDateUTC ;
201+ }
202+
143203
144204 @ Override
145205 public boolean equals (java .lang .Object o ) {
@@ -154,12 +214,13 @@ public boolean equals(java.lang.Object o) {
154214 Objects .equals (this .status , employee .status ) &&
155215 Objects .equals (this .firstName , employee .firstName ) &&
156216 Objects .equals (this .lastName , employee .lastName ) &&
157- Objects .equals (this .externalLink , employee .externalLink );
217+ Objects .equals (this .externalLink , employee .externalLink ) &&
218+ Objects .equals (this .updatedDateUTC , employee .updatedDateUTC );
158219 }
159220
160221 @ Override
161222 public int hashCode () {
162- return Objects .hash (employeeID , status , firstName , lastName , externalLink );
223+ return Objects .hash (employeeID , status , firstName , lastName , externalLink , updatedDateUTC );
163224 }
164225
165226
@@ -173,6 +234,7 @@ public String toString() {
173234 sb .append (" firstName: " ).append (toIndentedString (firstName )).append ("\n " );
174235 sb .append (" lastName: " ).append (toIndentedString (lastName )).append ("\n " );
175236 sb .append (" externalLink: " ).append (toIndentedString (externalLink )).append ("\n " );
237+ sb .append (" updatedDateUTC: " ).append (toIndentedString (updatedDateUTC )).append ("\n " );
176238 sb .append ("}" );
177239 return sb .toString ();
178240 }
0 commit comments