99import java .time .LocalDate ;
1010import java .time .LocalTime ;
1111import java .time .OffsetDateTime ;
12+ import java .util .ArrayList ;
1213import java .util .HashMap ;
14+ import java .util .List ;
1315import java .util .Map ;
1416import java .util .Objects ;
1517import java .util .function .Consumer ;
@@ -25,6 +27,16 @@ public void setId(String _id) {
2527 this ._id = _id ;
2628 }
2729
30+ private List <String > _phones ;
31+
32+ public List <String > getPhones () {
33+ return _phones ;
34+ }
35+
36+ public void setPhones (List <String > _phones ) {
37+ this ._phones = new ArrayList <String >(_phones );
38+ }
39+
2840 private String _officeLocation ;
2941
3042 public String getOfficeLocation () {
@@ -85,6 +97,16 @@ public void setMyEnum(MyEnum value) {
8597 this ._myEnum = value ;
8698 }
8799
100+ private List <MyEnum > _enumCollection ;
101+
102+ public List <MyEnum > getEnumCollection () {
103+ return _enumCollection ;
104+ }
105+
106+ public void setEnumCollection (List <MyEnum > value ) {
107+ this ._enumCollection = new ArrayList <MyEnum >(value );
108+ }
109+
88110 private OffsetDateTime _createdDateTime ;
89111
90112 public OffsetDateTime getCreatedDateTime () {
@@ -134,11 +156,21 @@ public Map<String, Consumer<ParseNode>> getFieldDeserializers() {
134156 (n ) -> {
135157 setMyEnum (n .getEnumValue (MyEnum ::forValue ));
136158 });
159+ put (
160+ "enumCollection" ,
161+ (n ) -> {
162+ setEnumCollection (n .getCollectionOfEnumValues (MyEnum ::forValue ));
163+ });
137164 put (
138165 "createdDateTime" ,
139166 (n ) -> {
140167 setCreatedDateTime (n .getOffsetDateTimeValue ());
141168 });
169+ put (
170+ "phones" ,
171+ (n ) -> {
172+ setPhones (n .getCollectionOfPrimitiveValues (String .class ));
173+ });
142174 }
143175 };
144176 }
@@ -153,7 +185,9 @@ public void serialize(SerializationWriter writer) {
153185 writer .writeLocalTimeValue ("startWorkTime" , getStartWorkTime ());
154186 writer .writeLocalTimeValue ("endWorkTime" , getEndWorkTime ());
155187 writer .writeEnumValue ("myEnum" , getMyEnum ());
188+ writer .writeCollectionOfEnumValues ("enumCollection" , getEnumCollection ());
156189 writer .writeOffsetDateTimeValue ("createdDateTime" , getCreatedDateTime ());
190+ writer .writeCollectionOfPrimitiveValues ("phones" , getPhones ());
157191 writer .writeAdditionalData (getAdditionalData ());
158192 }
159193
0 commit comments