File tree Expand file tree Collapse file tree
services/automation/src/main/java/cloud/stackit/sdk/automation/v1betaapi/model Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -242,6 +242,15 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
242242 "Expected the field `kind` to be a primitive type in the JSON string but got `%s`" ,
243243 jsonObj .get ("kind" ).toString ()));
244244 }
245+ // OVERRIDE START: this if block fixes oneOf issues
246+ if (!"CreateSnapshotsResult" .equals (jsonObj .get ("kind" ).getAsString ())) {
247+ throw new IllegalArgumentException (
248+ String .format (
249+ java .util .Locale .ROOT ,
250+ "Expected the field `kind` to have value `CreateSnapshotsResult` but got `%s`" ,
251+ jsonObj .get ("kind" ).toString ()));
252+ }
253+ // OVERRIDE END: this if block fixes oneOf issues
245254 }
246255
247256 public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
Original file line number Diff line number Diff line change @@ -229,6 +229,15 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
229229 "Expected the field `kind` to be a primitive type in the JSON string but got `%s`" ,
230230 jsonObj .get ("kind" ).toString ()));
231231 }
232+ // OVERRIDE START: this if block fixes oneOf issues
233+ if (!"GetVolumeIDsResult" .equals (jsonObj .get ("kind" ).getAsString ())) {
234+ throw new IllegalArgumentException (
235+ String .format (
236+ java .util .Locale .ROOT ,
237+ "Expected the field `kind` to have value `GetVolumeIDsResult` but got `%s`" ,
238+ jsonObj .get ("kind" ).toString ()));
239+ }
240+ // OVERRIDE END: this if block fixes oneOf issues
232241 // ensure the optional json data is an array if present
233242 if (jsonObj .get ("volumeIDs" ) != null
234243 && !jsonObj .get ("volumeIDs" ).isJsonNull ()
Original file line number Diff line number Diff line change @@ -276,6 +276,15 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
276276 "Expected the field `kind` to be a primitive type in the JSON string but got `%s`" ,
277277 jsonObj .get ("kind" ).toString ()));
278278 }
279+ // OVERRIDE START: this if block fixes oneOf issues
280+ if (!"count" .equals (jsonObj .get ("kind" ).getAsString ())) {
281+ throw new IllegalArgumentException (
282+ String .format (
283+ java .util .Locale .ROOT ,
284+ "Expected the field `kind` to have value `count` but got `%s`" ,
285+ jsonObj .get ("kind" ).toString ()));
286+ }
287+ // OVERRIDE END: this if block fixes oneOf issues
279288 // validate the required field `kind`
280289 KindEnum .validateJsonElement (jsonObj .get ("kind" ));
281290 }
Original file line number Diff line number Diff line change @@ -250,6 +250,15 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
250250 "Expected the field `kind` to be a primitive type in the JSON string but got `%s`" ,
251251 jsonObj .get ("kind" ).toString ()));
252252 }
253+ // OVERRIDE START: this if block fixes oneOf issues
254+ if (!"indefinitely" .equals (jsonObj .get ("kind" ).getAsString ())) {
255+ throw new IllegalArgumentException (
256+ String .format (
257+ java .util .Locale .ROOT ,
258+ "Expected the field `kind` to have value `indefinitely` but got `%s`" ,
259+ jsonObj .get ("kind" ).toString ()));
260+ }
261+ // OVERRIDE END: this if block fixes oneOf issues
253262 // validate the required field `kind`
254263 KindEnum .validateJsonElement (jsonObj .get ("kind" ));
255264 }
You can’t perform that action at this time.
0 commit comments