@@ -169,132 +169,91 @@ public EscalationPolicyIncluded deserialize(JsonParser jp, DeserializationContex
169169 log .log (Level .FINER , "Input data does not match schema 'EscalationPolicyStep'" , e );
170170 }
171171
172- // deserialize UserTarget
172+ // deserialize EscalationPolicyUser
173173 try {
174174 boolean attemptParsing = true ;
175175 // ensure that we respect type coercion as set on the client ObjectMapper
176- if (UserTarget .class .equals (Integer .class )
177- || UserTarget .class .equals (Long .class )
178- || UserTarget .class .equals (Float .class )
179- || UserTarget .class .equals (Double .class )
180- || UserTarget .class .equals (Boolean .class )
181- || UserTarget .class .equals (String .class )) {
176+ if (EscalationPolicyUser .class .equals (Integer .class )
177+ || EscalationPolicyUser .class .equals (Long .class )
178+ || EscalationPolicyUser .class .equals (Float .class )
179+ || EscalationPolicyUser .class .equals (Double .class )
180+ || EscalationPolicyUser .class .equals (Boolean .class )
181+ || EscalationPolicyUser .class .equals (String .class )) {
182182 attemptParsing = typeCoercion ;
183183 if (!attemptParsing ) {
184184 attemptParsing |=
185- ((UserTarget .class .equals (Integer .class ) || UserTarget .class .equals (Long .class ))
185+ ((EscalationPolicyUser .class .equals (Integer .class )
186+ || EscalationPolicyUser .class .equals (Long .class ))
186187 && token == JsonToken .VALUE_NUMBER_INT );
187188 attemptParsing |=
188- ((UserTarget .class .equals (Float .class ) || UserTarget .class .equals (Double .class ))
189+ ((EscalationPolicyUser .class .equals (Float .class )
190+ || EscalationPolicyUser .class .equals (Double .class ))
189191 && (token == JsonToken .VALUE_NUMBER_FLOAT
190192 || token == JsonToken .VALUE_NUMBER_INT ));
191193 attemptParsing |=
192- (UserTarget .class .equals (Boolean .class )
194+ (EscalationPolicyUser .class .equals (Boolean .class )
193195 && (token == JsonToken .VALUE_FALSE || token == JsonToken .VALUE_TRUE ));
194196 attemptParsing |=
195- (UserTarget .class .equals (String .class ) && token == JsonToken .VALUE_STRING );
196- }
197- }
198- if (attemptParsing ) {
199- tmp = tree .traverse (jp .getCodec ()).readValueAs (UserTarget .class );
200- // TODO: there is no validation against JSON schema constraints
201- // (min, max, enum, pattern...), this does not perform a strict JSON
202- // validation, which means the 'match' count may be higher than it should be.
203- if (!((UserTarget ) tmp ).unparsed ) {
204- deserialized = tmp ;
205- match ++;
206- }
207- log .log (Level .FINER , "Input data matches schema 'UserTarget'" );
208- }
209- } catch (Exception e ) {
210- // deserialization failed, continue
211- log .log (Level .FINER , "Input data does not match schema 'UserTarget'" , e );
212- }
213-
214- // deserialize ScheduleTarget
215- try {
216- boolean attemptParsing = true ;
217- // ensure that we respect type coercion as set on the client ObjectMapper
218- if (ScheduleTarget .class .equals (Integer .class )
219- || ScheduleTarget .class .equals (Long .class )
220- || ScheduleTarget .class .equals (Float .class )
221- || ScheduleTarget .class .equals (Double .class )
222- || ScheduleTarget .class .equals (Boolean .class )
223- || ScheduleTarget .class .equals (String .class )) {
224- attemptParsing = typeCoercion ;
225- if (!attemptParsing ) {
226- attemptParsing |=
227- ((ScheduleTarget .class .equals (Integer .class )
228- || ScheduleTarget .class .equals (Long .class ))
229- && token == JsonToken .VALUE_NUMBER_INT );
230- attemptParsing |=
231- ((ScheduleTarget .class .equals (Float .class )
232- || ScheduleTarget .class .equals (Double .class ))
233- && (token == JsonToken .VALUE_NUMBER_FLOAT
234- || token == JsonToken .VALUE_NUMBER_INT ));
235- attemptParsing |=
236- (ScheduleTarget .class .equals (Boolean .class )
237- && (token == JsonToken .VALUE_FALSE || token == JsonToken .VALUE_TRUE ));
238- attemptParsing |=
239- (ScheduleTarget .class .equals (String .class ) && token == JsonToken .VALUE_STRING );
197+ (EscalationPolicyUser .class .equals (String .class )
198+ && token == JsonToken .VALUE_STRING );
240199 }
241200 }
242201 if (attemptParsing ) {
243- tmp = tree .traverse (jp .getCodec ()).readValueAs (ScheduleTarget .class );
202+ tmp = tree .traverse (jp .getCodec ()).readValueAs (EscalationPolicyUser .class );
244203 // TODO: there is no validation against JSON schema constraints
245204 // (min, max, enum, pattern...), this does not perform a strict JSON
246205 // validation, which means the 'match' count may be higher than it should be.
247- if (!((ScheduleTarget ) tmp ).unparsed ) {
206+ if (!((EscalationPolicyUser ) tmp ).unparsed ) {
248207 deserialized = tmp ;
249208 match ++;
250209 }
251- log .log (Level .FINER , "Input data matches schema 'ScheduleTarget '" );
210+ log .log (Level .FINER , "Input data matches schema 'EscalationPolicyUser '" );
252211 }
253212 } catch (Exception e ) {
254213 // deserialization failed, continue
255- log .log (Level .FINER , "Input data does not match schema 'ScheduleTarget '" , e );
214+ log .log (Level .FINER , "Input data does not match schema 'EscalationPolicyUser '" , e );
256215 }
257216
258- // deserialize TeamTarget
217+ // deserialize ScheduleData
259218 try {
260219 boolean attemptParsing = true ;
261220 // ensure that we respect type coercion as set on the client ObjectMapper
262- if (TeamTarget .class .equals (Integer .class )
263- || TeamTarget .class .equals (Long .class )
264- || TeamTarget .class .equals (Float .class )
265- || TeamTarget .class .equals (Double .class )
266- || TeamTarget .class .equals (Boolean .class )
267- || TeamTarget .class .equals (String .class )) {
221+ if (ScheduleData .class .equals (Integer .class )
222+ || ScheduleData .class .equals (Long .class )
223+ || ScheduleData .class .equals (Float .class )
224+ || ScheduleData .class .equals (Double .class )
225+ || ScheduleData .class .equals (Boolean .class )
226+ || ScheduleData .class .equals (String .class )) {
268227 attemptParsing = typeCoercion ;
269228 if (!attemptParsing ) {
270229 attemptParsing |=
271- ((TeamTarget .class .equals (Integer .class ) || TeamTarget .class .equals (Long .class ))
230+ ((ScheduleData .class .equals (Integer .class ) || ScheduleData .class .equals (Long .class ))
272231 && token == JsonToken .VALUE_NUMBER_INT );
273232 attemptParsing |=
274- ((TeamTarget .class .equals (Float .class ) || TeamTarget .class .equals (Double .class ))
233+ ((ScheduleData .class .equals (Float .class ) || ScheduleData .class .equals (Double .class ))
275234 && (token == JsonToken .VALUE_NUMBER_FLOAT
276235 || token == JsonToken .VALUE_NUMBER_INT ));
277236 attemptParsing |=
278- (TeamTarget .class .equals (Boolean .class )
237+ (ScheduleData .class .equals (Boolean .class )
279238 && (token == JsonToken .VALUE_FALSE || token == JsonToken .VALUE_TRUE ));
280239 attemptParsing |=
281- (TeamTarget .class .equals (String .class ) && token == JsonToken .VALUE_STRING );
240+ (ScheduleData .class .equals (String .class ) && token == JsonToken .VALUE_STRING );
282241 }
283242 }
284243 if (attemptParsing ) {
285- tmp = tree .traverse (jp .getCodec ()).readValueAs (TeamTarget .class );
244+ tmp = tree .traverse (jp .getCodec ()).readValueAs (ScheduleData .class );
286245 // TODO: there is no validation against JSON schema constraints
287246 // (min, max, enum, pattern...), this does not perform a strict JSON
288247 // validation, which means the 'match' count may be higher than it should be.
289- if (!((TeamTarget ) tmp ).unparsed ) {
248+ if (!((ScheduleData ) tmp ).unparsed ) {
290249 deserialized = tmp ;
291250 match ++;
292251 }
293- log .log (Level .FINER , "Input data matches schema 'TeamTarget '" );
252+ log .log (Level .FINER , "Input data matches schema 'ScheduleData '" );
294253 }
295254 } catch (Exception e ) {
296255 // deserialization failed, continue
297- log .log (Level .FINER , "Input data does not match schema 'TeamTarget '" , e );
256+ log .log (Level .FINER , "Input data does not match schema 'ScheduleData '" , e );
298257 }
299258
300259 EscalationPolicyIncluded ret = new EscalationPolicyIncluded ();
@@ -336,27 +295,21 @@ public EscalationPolicyIncluded(EscalationPolicyStep o) {
336295 setActualInstance (o );
337296 }
338297
339- public EscalationPolicyIncluded (UserTarget o ) {
340- super ("oneOf" , Boolean .FALSE );
341- setActualInstance (o );
342- }
343-
344- public EscalationPolicyIncluded (ScheduleTarget o ) {
298+ public EscalationPolicyIncluded (EscalationPolicyUser o ) {
345299 super ("oneOf" , Boolean .FALSE );
346300 setActualInstance (o );
347301 }
348302
349- public EscalationPolicyIncluded (TeamTarget o ) {
303+ public EscalationPolicyIncluded (ScheduleData o ) {
350304 super ("oneOf" , Boolean .FALSE );
351305 setActualInstance (o );
352306 }
353307
354308 static {
355309 schemas .put ("TeamReference" , new GenericType <TeamReference >() {});
356310 schemas .put ("EscalationPolicyStep" , new GenericType <EscalationPolicyStep >() {});
357- schemas .put ("UserTarget" , new GenericType <UserTarget >() {});
358- schemas .put ("ScheduleTarget" , new GenericType <ScheduleTarget >() {});
359- schemas .put ("TeamTarget" , new GenericType <TeamTarget >() {});
311+ schemas .put ("EscalationPolicyUser" , new GenericType <EscalationPolicyUser >() {});
312+ schemas .put ("ScheduleData" , new GenericType <ScheduleData >() {});
360313 JSON .registerDescendants (EscalationPolicyIncluded .class , Collections .unmodifiableMap (schemas ));
361314 }
362315
@@ -367,8 +320,8 @@ public Map<String, GenericType> getSchemas() {
367320
368321 /**
369322 * Set the instance that matches the oneOf child schema, check the instance parameter is valid
370- * against the oneOf child schemas: TeamReference, EscalationPolicyStep, UserTarget ,
371- * ScheduleTarget, TeamTarget
323+ * against the oneOf child schemas: TeamReference, EscalationPolicyStep, EscalationPolicyUser ,
324+ * ScheduleData
372325 *
373326 * <p>It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be a
374327 * composed schema (allOf, anyOf, oneOf).
@@ -383,15 +336,11 @@ public void setActualInstance(Object instance) {
383336 super .setActualInstance (instance );
384337 return ;
385338 }
386- if (JSON .isInstanceOf (UserTarget .class , instance , new HashSet <Class <?>>())) {
339+ if (JSON .isInstanceOf (EscalationPolicyUser .class , instance , new HashSet <Class <?>>())) {
387340 super .setActualInstance (instance );
388341 return ;
389342 }
390- if (JSON .isInstanceOf (ScheduleTarget .class , instance , new HashSet <Class <?>>())) {
391- super .setActualInstance (instance );
392- return ;
393- }
394- if (JSON .isInstanceOf (TeamTarget .class , instance , new HashSet <Class <?>>())) {
343+ if (JSON .isInstanceOf (ScheduleData .class , instance , new HashSet <Class <?>>())) {
395344 super .setActualInstance (instance );
396345 return ;
397346 }
@@ -401,16 +350,16 @@ public void setActualInstance(Object instance) {
401350 return ;
402351 }
403352 throw new RuntimeException (
404- "Invalid instance type. Must be TeamReference, EscalationPolicyStep, UserTarget ,"
405- + " ScheduleTarget, TeamTarget " );
353+ "Invalid instance type. Must be TeamReference, EscalationPolicyStep, EscalationPolicyUser ,"
354+ + " ScheduleData " );
406355 }
407356
408357 /**
409358 * Get the actual instance, which can be the following: TeamReference, EscalationPolicyStep,
410- * UserTarget, ScheduleTarget, TeamTarget
359+ * EscalationPolicyUser, ScheduleData
411360 *
412- * @return The actual instance (TeamReference, EscalationPolicyStep, UserTarget, ScheduleTarget ,
413- * TeamTarget )
361+ * @return The actual instance (TeamReference, EscalationPolicyStep, EscalationPolicyUser ,
362+ * ScheduleData )
414363 */
415364 @ Override
416365 public Object getActualInstance () {
@@ -440,35 +389,24 @@ public EscalationPolicyStep getEscalationPolicyStep() throws ClassCastException
440389 }
441390
442391 /**
443- * Get the actual instance of `UserTarget`. If the actual instance is not `UserTarget`, the
444- * ClassCastException will be thrown.
445- *
446- * @return The actual instance of `UserTarget`
447- * @throws ClassCastException if the instance is not `UserTarget`
448- */
449- public UserTarget getUserTarget () throws ClassCastException {
450- return (UserTarget ) super .getActualInstance ();
451- }
452-
453- /**
454- * Get the actual instance of `ScheduleTarget`. If the actual instance is not `ScheduleTarget`,
455- * the ClassCastException will be thrown.
392+ * Get the actual instance of `EscalationPolicyUser`. If the actual instance is not
393+ * `EscalationPolicyUser`, the ClassCastException will be thrown.
456394 *
457- * @return The actual instance of `ScheduleTarget `
458- * @throws ClassCastException if the instance is not `ScheduleTarget `
395+ * @return The actual instance of `EscalationPolicyUser `
396+ * @throws ClassCastException if the instance is not `EscalationPolicyUser `
459397 */
460- public ScheduleTarget getScheduleTarget () throws ClassCastException {
461- return (ScheduleTarget ) super .getActualInstance ();
398+ public EscalationPolicyUser getEscalationPolicyUser () throws ClassCastException {
399+ return (EscalationPolicyUser ) super .getActualInstance ();
462400 }
463401
464402 /**
465- * Get the actual instance of `TeamTarget `. If the actual instance is not `TeamTarget `, the
403+ * Get the actual instance of `ScheduleData `. If the actual instance is not `ScheduleData `, the
466404 * ClassCastException will be thrown.
467405 *
468- * @return The actual instance of `TeamTarget `
469- * @throws ClassCastException if the instance is not `TeamTarget `
406+ * @return The actual instance of `ScheduleData `
407+ * @throws ClassCastException if the instance is not `ScheduleData `
470408 */
471- public TeamTarget getTeamTarget () throws ClassCastException {
472- return (TeamTarget ) super .getActualInstance ();
409+ public ScheduleData getScheduleData () throws ClassCastException {
410+ return (ScheduleData ) super .getActualInstance ();
473411 }
474412}
0 commit comments