diff --git a/services/loadbalancer/build.gradle b/services/loadbalancer/build.gradle index 314067c8..aafa5f0b 100644 --- a/services/loadbalancer/build.gradle +++ b/services/loadbalancer/build.gradle @@ -10,7 +10,7 @@ dependencies { implementation 'com.google.code.gson:gson:2.9.1' implementation 'io.gsonfire:gson-fire:1.9.0' implementation 'jakarta.ws.rs:jakarta.ws.rs-api:2.1.6' - implementation 'org.openapitools:jackson-databind-nullable:0.2.8' + implementation 'org.openapitools:jackson-databind-nullable:0.2.12' implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.18.0' implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.3' diff --git a/services/loadbalancer/oas_commit b/services/loadbalancer/oas_commit index 7742eb62..ed3614a2 100644 --- a/services/loadbalancer/oas_commit +++ b/services/loadbalancer/oas_commit @@ -1 +1 @@ -f5a2c1cbdac2b440d8dc8bfa89af5ca4cd9cc89d +6c5332d5f71263507049f2f2ef036fe07937b63a diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/ApiClient.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/ApiClient.java index aceb403e..2fa71df6 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/ApiClient.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/ApiClient.java @@ -398,6 +398,17 @@ public ApiClient setLocalDateFormat(DateTimeFormatter dateFormat) { return this; } + /** + * Set LocalDateTimeFormat. + * + * @param dateFormat a {@link java.time.format.DateTimeFormatter} object + * @return a {@link cloud.stackit.sdk.loadbalancer.v1api.ApiClient} object + */ + public ApiClient setLocalDateTimeFormat(DateTimeFormatter dateFormat) { + JSON.setLocalDateTimeFormat(dateFormat); + return this; + } + /** * Set LenientOnJson. * @@ -598,6 +609,46 @@ public String parameterToString(Object param) { } } + /** + * Format the given parameter object as an ASCII-safe JSON string. + * + * @param param Parameter + * @return JSON representation of the parameter + */ + public String parameterToJsonString(Object param) { + if (param == null) { + return ""; + } + String json = JSON.serialize(param); + int firstUnsafe = -1; + for (int i = 0; i < json.length(); i++) { + if (json.charAt(i) >= 0x7f) { + firstUnsafe = i; + break; + } + } + if (firstUnsafe == -1) { + return json; + } + + StringBuilder escaped = new StringBuilder(json.length()); + escaped.append(json, 0, firstUnsafe); + for (int i = firstUnsafe; i < json.length(); i++) { + char c = json.charAt(i); + if (c >= 0x7f) { + escaped.append("\\u"); + escaped.append(Character.forDigit((c >> 12) & 0xf, 16)); + escaped.append(Character.forDigit((c >> 8) & 0xf, 16)); + escaped.append(Character.forDigit((c >> 4) & 0xf, 16)); + escaped.append(Character.forDigit(c & 0xf, 16)); + } else { + escaped.append(c); + } + } + + return escaped.toString(); + } + /** * Formats the specified query parameter to a list containing a single {@code Pair} object. * diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/JSON.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/JSON.java index 0f7a7bfa..c701afc3 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/JSON.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/JSON.java @@ -31,8 +31,10 @@ import java.text.ParseException; import java.text.ParsePosition; import java.time.LocalDate; +import java.time.LocalDateTime; import java.time.OffsetDateTime; import java.time.format.DateTimeFormatter; +import java.time.format.DateTimeParseException; import java.util.Date; import java.util.Map; import okio.ByteString; @@ -51,6 +53,8 @@ public class JSON { private static OffsetDateTimeTypeAdapter offsetDateTimeTypeAdapter = new OffsetDateTimeTypeAdapter(); private static LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter(); + private static LocalDateTimeTypeAdapter localDateTimeTypeAdapter = + new LocalDateTimeTypeAdapter(); private static ByteArrayAdapter byteArrayAdapter = new ByteArrayAdapter(); @SuppressWarnings("unchecked") @@ -94,6 +98,7 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapter(java.sql.Date.class, sqlDateTypeAdapter); gsonBuilder.registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter); gsonBuilder.registerTypeAdapter(LocalDate.class, localDateTypeAdapter); + gsonBuilder.registerTypeAdapter(LocalDateTime.class, localDateTimeTypeAdapter); gsonBuilder.registerTypeAdapter(byte[].class, byteArrayAdapter); gsonBuilder.registerTypeAdapterFactory( new cloud.stackit.sdk.loadbalancer.v1api.model.ActiveHealthCheck @@ -387,6 +392,53 @@ public LocalDate read(JsonReader in) throws IOException { } } + /** Gson TypeAdapter for JSR310 LocalDateTime type */ + public static class LocalDateTimeTypeAdapter extends TypeAdapter { + + private DateTimeFormatter formatter; + + public LocalDateTimeTypeAdapter() { + this(DateTimeFormatter.ISO_LOCAL_DATE_TIME); + } + + public LocalDateTimeTypeAdapter(DateTimeFormatter formatter) { + this.formatter = formatter; + } + + public void setFormat(DateTimeFormatter dateFormat) { + this.formatter = dateFormat; + } + + @Override + public void write(JsonWriter out, LocalDateTime date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + out.value(formatter.format(date)); + } + } + + @Override + public LocalDateTime read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + try { + return LocalDateTime.parse(date, formatter); + } catch (DateTimeParseException e) { + if (date.length() > 10 && date.charAt(10) == ' ') { + date = date.substring(0, 10) + 'T' + date.substring(11); + return LocalDateTime.parse(date, formatter); + } + throw e; + } + } + } + } + public static void setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { offsetDateTimeTypeAdapter.setFormat(dateFormat); } @@ -395,6 +447,10 @@ public static void setLocalDateFormat(DateTimeFormatter dateFormat) { localDateTypeAdapter.setFormat(dateFormat); } + public static void setLocalDateTimeFormat(DateTimeFormatter dateFormat) { + localDateTimeTypeAdapter.setFormat(dateFormat); + } + /** * Gson TypeAdapter for java.sql.Date type If the dateFormat is null, a simple "yyyy-MM-dd" * format will be used (more efficient than SimpleDateFormat). diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/Pair.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/Pair.java index e7f14862..8a695c3c 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/Pair.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/Pair.java @@ -12,7 +12,7 @@ package cloud.stackit.sdk.loadbalancer.v1api; -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class Pair { private final String name; private final String value; diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/ServerConfiguration.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/ServerConfiguration.java index f7a57f50..bf3dad7a 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/ServerConfiguration.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/ServerConfiguration.java @@ -15,7 +15,7 @@ import java.util.Map; /** Representing a Server configuration. */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class ServerConfiguration { public String URL; public String description; diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/ServerVariable.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/ServerVariable.java index edd3e1b9..b6d27234 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/ServerVariable.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/ServerVariable.java @@ -15,7 +15,7 @@ import java.util.HashSet; /** Representing a Server Variable for server URL template substitution. */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class ServerVariable { public String description; public String defaultValue; diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/StringUtil.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/StringUtil.java index 445dc2a4..ffd2c624 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/StringUtil.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/StringUtil.java @@ -15,7 +15,7 @@ import java.util.Collection; import java.util.Iterator; -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class StringUtil { /** * Check if the given array contains the given value (with case-insensitive comparison). diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/AbstractOpenApiSchema.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/AbstractOpenApiSchema.java index 33393a3d..3e8f1d9b 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/AbstractOpenApiSchema.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/AbstractOpenApiSchema.java @@ -16,7 +16,7 @@ import java.util.Objects; /** Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public abstract class AbstractOpenApiSchema { // store the actual instance of the schema/object @@ -104,10 +104,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public boolean equals(Object o) { diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/ActiveHealthCheck.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/ActiveHealthCheck.java index d8f52179..76881b20 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/ActiveHealthCheck.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/ActiveHealthCheck.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.loadbalancer.v1api.JSON; import com.google.gson.Gson; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -31,7 +32,7 @@ import java.util.Objects; /** ActiveHealthCheck */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class ActiveHealthCheck { public static final String SERIALIZED_NAME_HEALTHY_THRESHOLD = "healthyThreshold"; @@ -247,10 +248,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -348,7 +346,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/CreateCredentialsPayload.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/CreateCredentialsPayload.java index f8e419eb..9b521c61 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/CreateCredentialsPayload.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/CreateCredentialsPayload.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.loadbalancer.v1api.JSON; import com.google.gson.Gson; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -31,7 +32,7 @@ import java.util.Objects; /** CreateCredentialsPayload */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class CreateCredentialsPayload { public static final String SERIALIZED_NAME_DISPLAY_NAME = "displayName"; @@ -188,10 +189,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -283,7 +281,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/CreateCredentialsResponse.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/CreateCredentialsResponse.java index 382a7e1c..1b9c9b72 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/CreateCredentialsResponse.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/CreateCredentialsResponse.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.loadbalancer.v1api.JSON; import com.google.gson.Gson; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -31,7 +32,7 @@ import java.util.Objects; /** CreateCredentialsResponse */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class CreateCredentialsResponse { public static final String SERIALIZED_NAME_CREDENTIAL = "credential"; @@ -139,10 +140,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -214,7 +212,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/CreateLoadBalancerPayload.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/CreateLoadBalancerPayload.java index b3dd8468..c5623950 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/CreateLoadBalancerPayload.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/CreateLoadBalancerPayload.java @@ -16,6 +16,7 @@ import com.google.gson.Gson; import com.google.gson.JsonArray; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -34,7 +35,7 @@ import java.util.Objects; /** CreateLoadBalancerPayload */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class CreateLoadBalancerPayload { public static final String SERIALIZED_NAME_ERRORS = "errors"; @@ -492,10 +493,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -708,7 +706,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/CredentialsResponse.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/CredentialsResponse.java index 429e4b6b..83a18f30 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/CredentialsResponse.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/CredentialsResponse.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.loadbalancer.v1api.JSON; import com.google.gson.Gson; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -31,7 +32,7 @@ import java.util.Objects; /** CredentialsResponse */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class CredentialsResponse { public static final String SERIALIZED_NAME_CREDENTIALS_REF = "credentialsRef"; @@ -188,10 +189,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -283,7 +281,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/GetCredentialsResponse.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/GetCredentialsResponse.java index 2211e3fc..eca20b68 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/GetCredentialsResponse.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/GetCredentialsResponse.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.loadbalancer.v1api.JSON; import com.google.gson.Gson; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -31,7 +32,7 @@ import java.util.Objects; /** GetCredentialsResponse */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class GetCredentialsResponse { public static final String SERIALIZED_NAME_CREDENTIAL = "credential"; @@ -139,10 +140,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -213,7 +211,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/GetQuotaResponse.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/GetQuotaResponse.java index 0afd8c38..38349b87 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/GetQuotaResponse.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/GetQuotaResponse.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.loadbalancer.v1api.JSON; import com.google.gson.Gson; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -32,7 +33,7 @@ import java.util.UUID; /** GetQuotaResponse */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class GetQuotaResponse { public static final String SERIALIZED_NAME_MAX_LOAD_BALANCERS = "maxLoadBalancers"; @@ -159,10 +160,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -237,7 +235,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/GetServiceStatusResponse.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/GetServiceStatusResponse.java index d51a269f..b4276779 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/GetServiceStatusResponse.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/GetServiceStatusResponse.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.loadbalancer.v1api.JSON; import com.google.gson.Gson; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -32,7 +33,7 @@ import java.util.Objects; /** Response with customer project status. */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class GetServiceStatusResponse { /** status of the project */ @JsonAdapter(StatusEnum.Adapter.class) @@ -202,10 +203,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -285,7 +283,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/GoogleProtobufAny.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/GoogleProtobufAny.java index 93dccd29..0b4e49cd 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/GoogleProtobufAny.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/GoogleProtobufAny.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.loadbalancer.v1api.JSON; import com.google.gson.Gson; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -34,7 +35,7 @@ * Contains an arbitrary serialized message along with a @type that describes the type of the * serialized message. */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class GoogleProtobufAny { public static final String SERIALIZED_NAME_AT_TYPE = "@type"; @@ -141,10 +142,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -219,7 +217,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/ListCredentialsResponse.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/ListCredentialsResponse.java index c66821a6..a64fdd2f 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/ListCredentialsResponse.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/ListCredentialsResponse.java @@ -16,6 +16,7 @@ import com.google.gson.Gson; import com.google.gson.JsonArray; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -33,7 +34,7 @@ import java.util.Objects; /** ListCredentialsResponse */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class ListCredentialsResponse { public static final String SERIALIZED_NAME_CREDENTIALS = "credentials"; @@ -149,10 +150,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -239,7 +237,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/ListLoadBalancersResponse.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/ListLoadBalancersResponse.java index c83fd0f4..40bcb888 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/ListLoadBalancersResponse.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/ListLoadBalancersResponse.java @@ -16,6 +16,7 @@ import com.google.gson.Gson; import com.google.gson.JsonArray; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -33,7 +34,7 @@ import java.util.Objects; /** ListLoadBalancersResponse */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class ListLoadBalancersResponse { public static final String SERIALIZED_NAME_LOAD_BALANCERS = "loadBalancers"; @@ -174,10 +175,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -272,7 +270,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/ListPlansResponse.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/ListPlansResponse.java index 75d8ff78..379eb65f 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/ListPlansResponse.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/ListPlansResponse.java @@ -16,6 +16,7 @@ import com.google.gson.Gson; import com.google.gson.JsonArray; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -33,7 +34,7 @@ import java.util.Objects; /** ListPlansResponse */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class ListPlansResponse { public static final String SERIALIZED_NAME_VALID_PLANS = "validPlans"; @@ -148,10 +149,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -237,7 +235,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/Listener.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/Listener.java index b2365a45..a9165ea3 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/Listener.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/Listener.java @@ -16,6 +16,7 @@ import com.google.gson.Gson; import com.google.gson.JsonArray; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -34,7 +35,7 @@ import java.util.Objects; /** Listener */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class Listener { public static final String SERIALIZED_NAME_DISPLAY_NAME = "displayName"; @@ -402,10 +403,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -546,7 +544,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/LoadBalancer.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/LoadBalancer.java index 65cac157..ea6e5aa3 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/LoadBalancer.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/LoadBalancer.java @@ -16,6 +16,7 @@ import com.google.gson.Gson; import com.google.gson.JsonArray; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -34,7 +35,7 @@ import java.util.Objects; /** LoadBalancer */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class LoadBalancer { public static final String SERIALIZED_NAME_ERRORS = "errors"; @@ -486,10 +487,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -700,7 +698,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/LoadBalancerError.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/LoadBalancerError.java index dc3e879c..09fe4de2 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/LoadBalancerError.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/LoadBalancerError.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.loadbalancer.v1api.JSON; import com.google.gson.Gson; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -32,7 +33,7 @@ import java.util.Objects; /** LoadBalancerError */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class LoadBalancerError { public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @@ -244,10 +245,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -334,7 +332,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/LoadBalancerOptions.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/LoadBalancerOptions.java index 55cba05b..92342c4b 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/LoadBalancerOptions.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/LoadBalancerOptions.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.loadbalancer.v1api.JSON; import com.google.gson.Gson; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -31,7 +32,7 @@ import java.util.Objects; /** Defines any optional functionality you want to have enabled on your load balancer. */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class LoadBalancerOptions { public static final String SERIALIZED_NAME_ACCESS_CONTROL = "accessControl"; @@ -227,10 +228,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -311,7 +309,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/LoadbalancerOptionAccessControl.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/LoadbalancerOptionAccessControl.java index 6770f4ad..27ed4f19 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/LoadbalancerOptionAccessControl.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/LoadbalancerOptionAccessControl.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.loadbalancer.v1api.JSON; import com.google.gson.Gson; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -32,7 +33,7 @@ import java.util.Objects; /** Use this option to limit the IP ranges that can use the load balancer. */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class LoadbalancerOptionAccessControl { public static final String SERIALIZED_NAME_ALLOWED_SOURCE_RANGES = "allowedSourceRanges"; @@ -156,10 +157,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -239,7 +237,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/LoadbalancerOptionLogs.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/LoadbalancerOptionLogs.java index 68ccdf08..7fe1fbb1 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/LoadbalancerOptionLogs.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/LoadbalancerOptionLogs.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.loadbalancer.v1api.JSON; import com.google.gson.Gson; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -31,7 +32,7 @@ import java.util.Objects; /** LoadbalancerOptionLogs */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class LoadbalancerOptionLogs { public static final String SERIALIZED_NAME_CREDENTIALS_REF = "credentialsRef"; @@ -166,10 +167,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -252,7 +250,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/LoadbalancerOptionMetrics.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/LoadbalancerOptionMetrics.java index 471d8622..369bc864 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/LoadbalancerOptionMetrics.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/LoadbalancerOptionMetrics.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.loadbalancer.v1api.JSON; import com.google.gson.Gson; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -31,7 +32,7 @@ import java.util.Objects; /** LoadbalancerOptionMetrics */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class LoadbalancerOptionMetrics { public static final String SERIALIZED_NAME_CREDENTIALS_REF = "credentialsRef"; @@ -167,10 +168,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -254,7 +252,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/LoadbalancerOptionObservability.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/LoadbalancerOptionObservability.java index aec37ed4..a28c8786 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/LoadbalancerOptionObservability.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/LoadbalancerOptionObservability.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.loadbalancer.v1api.JSON; import com.google.gson.Gson; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -34,7 +35,7 @@ * We offer Load Balancer metrics observability via ARGUS or external solutions. Not changeable * after creation. */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class LoadbalancerOptionObservability { public static final String SERIALIZED_NAME_LOGS = "logs"; @@ -170,10 +171,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -251,7 +249,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/Network.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/Network.java index 2b7ed99c..e77f2fcd 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/Network.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/Network.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.loadbalancer.v1api.JSON; import com.google.gson.Gson; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -33,7 +34,7 @@ import java.util.UUID; /** Network */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class Network { public static final String SERIALIZED_NAME_NETWORK_ID = "networkId"; @@ -225,10 +226,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -314,7 +312,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/OptionsTCP.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/OptionsTCP.java index c989be57..ecd7eb05 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/OptionsTCP.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/OptionsTCP.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.loadbalancer.v1api.JSON; import com.google.gson.Gson; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -35,7 +36,7 @@ * PROTOCOL_TLS_PASSTHROUGH protocols. TCP options for the SNI listeners with the same port must be * the same. */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class OptionsTCP { public static final String SERIALIZED_NAME_IDLE_TIMEOUT = "idleTimeout"; @@ -142,10 +143,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -219,7 +217,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/OptionsUDP.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/OptionsUDP.java index 78e13ef1..ee5403e2 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/OptionsUDP.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/OptionsUDP.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.loadbalancer.v1api.JSON; import com.google.gson.Gson; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -31,7 +32,7 @@ import java.util.Objects; /** ProtocolOptionsUDP options to be configured for the PROTOCOL_UDP protocol. */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class OptionsUDP { public static final String SERIALIZED_NAME_IDLE_TIMEOUT = "idleTimeout"; @@ -138,10 +139,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -215,7 +213,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/PlanDetails.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/PlanDetails.java index d9bfc230..4ae12ddc 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/PlanDetails.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/PlanDetails.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.loadbalancer.v1api.JSON; import com.google.gson.Gson; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -31,7 +32,7 @@ import java.util.Objects; /** PlanDetails */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class PlanDetails { public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @@ -238,10 +239,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -342,7 +340,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/ServerNameIndicator.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/ServerNameIndicator.java index 084021c4..fcb50f19 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/ServerNameIndicator.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/ServerNameIndicator.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.loadbalancer.v1api.JSON; import com.google.gson.Gson; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -31,7 +32,7 @@ import java.util.Objects; /** ServerNameIndicator */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class ServerNameIndicator { public static final String SERIALIZED_NAME_NAME = "name"; @@ -138,10 +139,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -216,7 +214,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/SessionPersistence.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/SessionPersistence.java index 78ca9236..07444fb2 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/SessionPersistence.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/SessionPersistence.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.loadbalancer.v1api.JSON; import com.google.gson.Gson; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -31,7 +32,7 @@ import java.util.Objects; /** SessionPersistence */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class SessionPersistence { public static final String SERIALIZED_NAME_USE_SOURCE_IP_ADDRESS = "useSourceIpAddress"; @@ -142,10 +143,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -212,7 +210,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/Status.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/Status.java index a60e91f9..bdeebd09 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/Status.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/Status.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.loadbalancer.v1api.JSON; import com.google.gson.Gson; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -38,7 +39,7 @@ * error code, error message, and error details. You can find out more about this error model and * how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class Status { public static final String SERIALIZED_NAME_CODE = "code"; @@ -205,10 +206,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -292,7 +290,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/Target.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/Target.java index 764313bd..92caa7b9 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/Target.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/Target.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.loadbalancer.v1api.JSON; import com.google.gson.Gson; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -31,7 +32,7 @@ import java.util.Objects; /** Target */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class Target { public static final String SERIALIZED_NAME_DISPLAY_NAME = "displayName"; @@ -162,10 +163,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -247,7 +245,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/TargetPool.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/TargetPool.java index f971d82f..84a982db 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/TargetPool.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/TargetPool.java @@ -16,6 +16,7 @@ import com.google.gson.Gson; import com.google.gson.JsonArray; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -33,7 +34,7 @@ import java.util.Objects; /** TargetPool */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class TargetPool { public static final String SERIALIZED_NAME_ACTIVE_HEALTH_CHECK = "activeHealthCheck"; @@ -262,10 +263,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -375,7 +373,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/UpdateCredentialsPayload.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/UpdateCredentialsPayload.java index c98c3f7a..bed34b36 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/UpdateCredentialsPayload.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/UpdateCredentialsPayload.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.loadbalancer.v1api.JSON; import com.google.gson.Gson; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -31,7 +32,7 @@ import java.util.Objects; /** UpdateCredentialsPayload */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class UpdateCredentialsPayload { public static final String SERIALIZED_NAME_DISPLAY_NAME = "displayName"; @@ -188,10 +189,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -283,7 +281,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/UpdateCredentialsResponse.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/UpdateCredentialsResponse.java index 9ed8077f..f554f8be 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/UpdateCredentialsResponse.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/UpdateCredentialsResponse.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.loadbalancer.v1api.JSON; import com.google.gson.Gson; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -31,7 +32,7 @@ import java.util.Objects; /** UpdateCredentialsResponse */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class UpdateCredentialsResponse { public static final String SERIALIZED_NAME_CREDENTIAL = "credential"; @@ -139,10 +140,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -214,7 +212,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/UpdateLoadBalancerPayload.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/UpdateLoadBalancerPayload.java index 3d86a974..74e92fb6 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/UpdateLoadBalancerPayload.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/UpdateLoadBalancerPayload.java @@ -16,6 +16,7 @@ import com.google.gson.Gson; import com.google.gson.JsonArray; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -34,7 +35,7 @@ import java.util.Objects; /** UpdateLoadBalancerPayload */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class UpdateLoadBalancerPayload { public static final String SERIALIZED_NAME_ERRORS = "errors"; @@ -492,10 +493,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -708,7 +706,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/UpdateTargetPoolPayload.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/UpdateTargetPoolPayload.java index 5bda7752..e1f52211 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/UpdateTargetPoolPayload.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v1api/model/UpdateTargetPoolPayload.java @@ -16,6 +16,7 @@ import com.google.gson.Gson; import com.google.gson.JsonArray; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -33,7 +34,7 @@ import java.util.Objects; /** UpdateTargetPoolPayload */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class UpdateTargetPoolPayload { public static final String SERIALIZED_NAME_ACTIVE_HEALTH_CHECK = "activeHealthCheck"; @@ -264,10 +265,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -379,7 +377,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/ApiClient.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/ApiClient.java index dd23766c..87f75328 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/ApiClient.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/ApiClient.java @@ -397,6 +397,17 @@ public ApiClient setLocalDateFormat(DateTimeFormatter dateFormat) { return this; } + /** + * Set LocalDateTimeFormat. + * + * @param dateFormat a {@link java.time.format.DateTimeFormatter} object + * @return a {@link cloud.stackit.sdk.loadbalancer.v2api.ApiClient} object + */ + public ApiClient setLocalDateTimeFormat(DateTimeFormatter dateFormat) { + JSON.setLocalDateTimeFormat(dateFormat); + return this; + } + /** * Set LenientOnJson. * @@ -597,6 +608,46 @@ public String parameterToString(Object param) { } } + /** + * Format the given parameter object as an ASCII-safe JSON string. + * + * @param param Parameter + * @return JSON representation of the parameter + */ + public String parameterToJsonString(Object param) { + if (param == null) { + return ""; + } + String json = JSON.serialize(param); + int firstUnsafe = -1; + for (int i = 0; i < json.length(); i++) { + if (json.charAt(i) >= 0x7f) { + firstUnsafe = i; + break; + } + } + if (firstUnsafe == -1) { + return json; + } + + StringBuilder escaped = new StringBuilder(json.length()); + escaped.append(json, 0, firstUnsafe); + for (int i = firstUnsafe; i < json.length(); i++) { + char c = json.charAt(i); + if (c >= 0x7f) { + escaped.append("\\u"); + escaped.append(Character.forDigit((c >> 12) & 0xf, 16)); + escaped.append(Character.forDigit((c >> 8) & 0xf, 16)); + escaped.append(Character.forDigit((c >> 4) & 0xf, 16)); + escaped.append(Character.forDigit(c & 0xf, 16)); + } else { + escaped.append(c); + } + } + + return escaped.toString(); + } + /** * Formats the specified query parameter to a list containing a single {@code Pair} object. * diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/JSON.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/JSON.java index 64d7da76..acbff762 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/JSON.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/JSON.java @@ -31,8 +31,10 @@ import java.text.ParseException; import java.text.ParsePosition; import java.time.LocalDate; +import java.time.LocalDateTime; import java.time.OffsetDateTime; import java.time.format.DateTimeFormatter; +import java.time.format.DateTimeParseException; import java.util.Date; import java.util.Map; import okio.ByteString; @@ -51,6 +53,8 @@ public class JSON { private static OffsetDateTimeTypeAdapter offsetDateTimeTypeAdapter = new OffsetDateTimeTypeAdapter(); private static LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter(); + private static LocalDateTimeTypeAdapter localDateTimeTypeAdapter = + new LocalDateTimeTypeAdapter(); private static ByteArrayAdapter byteArrayAdapter = new ByteArrayAdapter(); @SuppressWarnings("unchecked") @@ -94,6 +98,7 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapter(java.sql.Date.class, sqlDateTypeAdapter); gsonBuilder.registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter); gsonBuilder.registerTypeAdapter(LocalDate.class, localDateTypeAdapter); + gsonBuilder.registerTypeAdapter(LocalDateTime.class, localDateTimeTypeAdapter); gsonBuilder.registerTypeAdapter(byte[].class, byteArrayAdapter); gsonBuilder.registerTypeAdapterFactory( new cloud.stackit.sdk.loadbalancer.v2api.model.ActiveHealthCheck @@ -393,6 +398,53 @@ public LocalDate read(JsonReader in) throws IOException { } } + /** Gson TypeAdapter for JSR310 LocalDateTime type */ + public static class LocalDateTimeTypeAdapter extends TypeAdapter { + + private DateTimeFormatter formatter; + + public LocalDateTimeTypeAdapter() { + this(DateTimeFormatter.ISO_LOCAL_DATE_TIME); + } + + public LocalDateTimeTypeAdapter(DateTimeFormatter formatter) { + this.formatter = formatter; + } + + public void setFormat(DateTimeFormatter dateFormat) { + this.formatter = dateFormat; + } + + @Override + public void write(JsonWriter out, LocalDateTime date) throws IOException { + if (date == null) { + out.nullValue(); + } else { + out.value(formatter.format(date)); + } + } + + @Override + public LocalDateTime read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String date = in.nextString(); + try { + return LocalDateTime.parse(date, formatter); + } catch (DateTimeParseException e) { + if (date.length() > 10 && date.charAt(10) == ' ') { + date = date.substring(0, 10) + 'T' + date.substring(11); + return LocalDateTime.parse(date, formatter); + } + throw e; + } + } + } + } + public static void setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { offsetDateTimeTypeAdapter.setFormat(dateFormat); } @@ -401,6 +453,10 @@ public static void setLocalDateFormat(DateTimeFormatter dateFormat) { localDateTypeAdapter.setFormat(dateFormat); } + public static void setLocalDateTimeFormat(DateTimeFormatter dateFormat) { + localDateTimeTypeAdapter.setFormat(dateFormat); + } + /** * Gson TypeAdapter for java.sql.Date type If the dateFormat is null, a simple "yyyy-MM-dd" * format will be used (more efficient than SimpleDateFormat). diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/Pair.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/Pair.java index 48708f56..21bb88ea 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/Pair.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/Pair.java @@ -12,7 +12,7 @@ package cloud.stackit.sdk.loadbalancer.v2api; -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class Pair { private final String name; private final String value; diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/ServerConfiguration.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/ServerConfiguration.java index 1db40bcc..745d6d42 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/ServerConfiguration.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/ServerConfiguration.java @@ -15,7 +15,7 @@ import java.util.Map; /** Representing a Server configuration. */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class ServerConfiguration { public String URL; public String description; diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/ServerVariable.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/ServerVariable.java index 09e6e3d5..ff91f692 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/ServerVariable.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/ServerVariable.java @@ -15,7 +15,7 @@ import java.util.HashSet; /** Representing a Server Variable for server URL template substitution. */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class ServerVariable { public String description; public String defaultValue; diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/StringUtil.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/StringUtil.java index 9a1411a6..8c99b8d1 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/StringUtil.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/StringUtil.java @@ -15,7 +15,7 @@ import java.util.Collection; import java.util.Iterator; -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class StringUtil { /** * Check if the given array contains the given value (with case-insensitive comparison). diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/AbstractOpenApiSchema.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/AbstractOpenApiSchema.java index 6a86cf76..3c2ff7e2 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/AbstractOpenApiSchema.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/AbstractOpenApiSchema.java @@ -16,7 +16,7 @@ import java.util.Objects; /** Abstract class for oneOf,anyOf schemas defined in OpenAPI spec */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public abstract class AbstractOpenApiSchema { // store the actual instance of the schema/object @@ -104,10 +104,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public boolean equals(Object o) { diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/ActiveHealthCheck.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/ActiveHealthCheck.java index c6b418ac..e360bf11 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/ActiveHealthCheck.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/ActiveHealthCheck.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.loadbalancer.v2api.JSON; import com.google.gson.Gson; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -31,7 +32,7 @@ import java.util.Objects; /** ActiveHealthCheck */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class ActiveHealthCheck { public static final String SERIALIZED_NAME_ALT_PORT = "altPort"; @@ -300,10 +301,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -408,7 +406,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/CreateCredentialsPayload.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/CreateCredentialsPayload.java index 5d912aca..3e0e6ea5 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/CreateCredentialsPayload.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/CreateCredentialsPayload.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.loadbalancer.v2api.JSON; import com.google.gson.Gson; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -31,7 +32,7 @@ import java.util.Objects; /** CreateCredentialsPayload */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class CreateCredentialsPayload { public static final String SERIALIZED_NAME_DISPLAY_NAME = "displayName"; @@ -190,10 +191,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -285,7 +283,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/CreateCredentialsResponse.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/CreateCredentialsResponse.java index 21fd5dd4..df5bea36 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/CreateCredentialsResponse.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/CreateCredentialsResponse.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.loadbalancer.v2api.JSON; import com.google.gson.Gson; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -31,7 +32,7 @@ import java.util.Objects; /** CreateCredentialsResponse */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class CreateCredentialsResponse { public static final String SERIALIZED_NAME_CREDENTIAL = "credential"; @@ -139,10 +140,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -214,7 +212,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/CreateLoadBalancerPayload.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/CreateLoadBalancerPayload.java index 36cab503..614faa5f 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/CreateLoadBalancerPayload.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/CreateLoadBalancerPayload.java @@ -16,6 +16,7 @@ import com.google.gson.Gson; import com.google.gson.JsonArray; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -34,7 +35,7 @@ import java.util.Objects; /** CreateLoadBalancerPayload */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class CreateLoadBalancerPayload { public static final String SERIALIZED_NAME_DISABLE_TARGET_SECURITY_GROUP_ASSIGNMENT = "disableTargetSecurityGroupAssignment"; @@ -638,10 +639,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -877,7 +875,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/CredentialsResponse.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/CredentialsResponse.java index 4e87cddf..0774c29c 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/CredentialsResponse.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/CredentialsResponse.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.loadbalancer.v2api.JSON; import com.google.gson.Gson; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -31,7 +32,7 @@ import java.util.Objects; /** CredentialsResponse */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class CredentialsResponse { public static final String SERIALIZED_NAME_CREDENTIALS_REF = "credentialsRef"; @@ -213,10 +214,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -317,7 +315,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/GetCredentialsResponse.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/GetCredentialsResponse.java index 1f186fcf..2f72f8b8 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/GetCredentialsResponse.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/GetCredentialsResponse.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.loadbalancer.v2api.JSON; import com.google.gson.Gson; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -31,7 +32,7 @@ import java.util.Objects; /** GetCredentialsResponse */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class GetCredentialsResponse { public static final String SERIALIZED_NAME_CREDENTIAL = "credential"; @@ -139,10 +140,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -213,7 +211,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/GetQuotaResponse.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/GetQuotaResponse.java index 31547ef3..342ac41e 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/GetQuotaResponse.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/GetQuotaResponse.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.loadbalancer.v2api.JSON; import com.google.gson.Gson; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -32,7 +33,7 @@ import java.util.UUID; /** GetQuotaResponse */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class GetQuotaResponse { public static final String SERIALIZED_NAME_MAX_CREDENTIALS = "maxCredentials"; @@ -264,10 +265,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -358,7 +356,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/GoogleProtobufAny.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/GoogleProtobufAny.java index 00e83bc6..bbf9cda3 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/GoogleProtobufAny.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/GoogleProtobufAny.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.loadbalancer.v2api.JSON; import com.google.gson.Gson; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -34,7 +35,7 @@ * Contains an arbitrary serialized message along with a @type that describes the type of the * serialized message. */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class GoogleProtobufAny { public static final String SERIALIZED_NAME_AT_TYPE = "@type"; @@ -141,10 +142,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -219,7 +217,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/HttpHealthChecks.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/HttpHealthChecks.java index abdbb504..97ae7579 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/HttpHealthChecks.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/HttpHealthChecks.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.loadbalancer.v2api.JSON; import com.google.gson.Gson; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -32,7 +33,7 @@ import java.util.Objects; /** Options for the HTTP health checking. */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class HttpHealthChecks { public static final String SERIALIZED_NAME_OK_STATUSES = "okStatuses"; @@ -196,10 +197,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -288,7 +286,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/ListCredentialsResponse.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/ListCredentialsResponse.java index 8008f91d..86d3cb67 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/ListCredentialsResponse.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/ListCredentialsResponse.java @@ -16,6 +16,7 @@ import com.google.gson.Gson; import com.google.gson.JsonArray; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -33,7 +34,7 @@ import java.util.Objects; /** ListCredentialsResponse */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class ListCredentialsResponse { public static final String SERIALIZED_NAME_CREDENTIALS = "credentials"; @@ -149,10 +150,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -239,7 +237,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/ListLoadBalancersResponse.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/ListLoadBalancersResponse.java index 68c0a5de..945e2579 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/ListLoadBalancersResponse.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/ListLoadBalancersResponse.java @@ -16,6 +16,7 @@ import com.google.gson.Gson; import com.google.gson.JsonArray; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -33,7 +34,7 @@ import java.util.Objects; /** ListLoadBalancersResponse */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class ListLoadBalancersResponse { public static final String SERIALIZED_NAME_LOAD_BALANCERS = "loadBalancers"; @@ -174,10 +175,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -272,7 +270,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/ListPlansResponse.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/ListPlansResponse.java index 90d7cf6c..9c9cf27d 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/ListPlansResponse.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/ListPlansResponse.java @@ -16,6 +16,7 @@ import com.google.gson.Gson; import com.google.gson.JsonArray; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -33,7 +34,7 @@ import java.util.Objects; /** ListPlansResponse */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class ListPlansResponse { public static final String SERIALIZED_NAME_VALID_PLANS = "validPlans"; @@ -148,10 +149,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -237,7 +235,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/Listener.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/Listener.java index 89201a9a..3be55852 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/Listener.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/Listener.java @@ -16,6 +16,7 @@ import com.google.gson.Gson; import com.google.gson.JsonArray; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -34,7 +35,7 @@ import java.util.Objects; /** Listener */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class Listener { public static final String SERIALIZED_NAME_DISPLAY_NAME = "displayName"; @@ -402,10 +403,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -546,7 +544,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/LoadBalancer.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/LoadBalancer.java index 3eeba907..698c3b58 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/LoadBalancer.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/LoadBalancer.java @@ -16,6 +16,7 @@ import com.google.gson.Gson; import com.google.gson.JsonArray; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -34,7 +35,7 @@ import java.util.Objects; /** LoadBalancer */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class LoadBalancer { public static final String SERIALIZED_NAME_DISABLE_TARGET_SECURITY_GROUP_ASSIGNMENT = "disableTargetSecurityGroupAssignment"; @@ -631,10 +632,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -868,7 +866,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/LoadBalancerError.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/LoadBalancerError.java index bb3713d7..4ec79042 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/LoadBalancerError.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/LoadBalancerError.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.loadbalancer.v2api.JSON; import com.google.gson.Gson; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -32,7 +33,7 @@ import java.util.Objects; /** LoadBalancerError */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class LoadBalancerError { public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @@ -250,10 +251,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -340,7 +338,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/LoadBalancerOptions.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/LoadBalancerOptions.java index c5d819d8..5984b193 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/LoadBalancerOptions.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/LoadBalancerOptions.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.loadbalancer.v2api.JSON; import com.google.gson.Gson; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -31,13 +32,18 @@ import java.util.Objects; /** Defines any optional functionality you want to have enabled on your load balancer. */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class LoadBalancerOptions { public static final String SERIALIZED_NAME_ACCESS_CONTROL = "accessControl"; @SerializedName(SERIALIZED_NAME_ACCESS_CONTROL) @javax.annotation.Nullable private LoadbalancerOptionAccessControl accessControl; + public static final String SERIALIZED_NAME_ACCESS_LOGS = "accessLogs"; + + @SerializedName(SERIALIZED_NAME_ACCESS_LOGS) + @javax.annotation.Nullable private Boolean accessLogs; + public static final String SERIALIZED_NAME_EPHEMERAL_ADDRESS = "ephemeralAddress"; @SerializedName(SERIALIZED_NAME_EPHEMERAL_ADDRESS) @@ -75,6 +81,27 @@ public void setAccessControl( this.accessControl = accessControl; } + public LoadBalancerOptions accessLogs(@javax.annotation.Nullable Boolean accessLogs) { + this.accessLogs = accessLogs; + return this; + } + + /** + * Enable per-request access logs on the Load Balancer. Defaults to false. Enable only when the + * Load Balancer's expected traffic volume can be sustained by the downstream logging + * pipeline, as access-log volume scales linearly with request rate. Requires a STACKIT + * Telemetry Router to be set up for the logs to be viewable. + * + * @return accessLogs + */ + @javax.annotation.Nullable public Boolean getAccessLogs() { + return accessLogs; + } + + public void setAccessLogs(@javax.annotation.Nullable Boolean accessLogs) { + this.accessLogs = accessLogs; + } + public LoadBalancerOptions ephemeralAddress( @javax.annotation.Nullable Boolean ephemeralAddress) { this.ephemeralAddress = ephemeralAddress; @@ -188,6 +215,7 @@ public boolean equals(Object o) { } LoadBalancerOptions loadBalancerOptions = (LoadBalancerOptions) o; return Objects.equals(this.accessControl, loadBalancerOptions.accessControl) + && Objects.equals(this.accessLogs, loadBalancerOptions.accessLogs) && Objects.equals(this.ephemeralAddress, loadBalancerOptions.ephemeralAddress) && Objects.equals(this.observability, loadBalancerOptions.observability) && Objects.equals(this.privateNetworkOnly, loadBalancerOptions.privateNetworkOnly) @@ -199,6 +227,7 @@ public boolean equals(Object o) { public int hashCode() { return Objects.hash( accessControl, + accessLogs, ephemeralAddress, observability, privateNetworkOnly, @@ -210,6 +239,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class LoadBalancerOptions {\n"); sb.append(" accessControl: ").append(toIndentedString(accessControl)).append("\n"); + sb.append(" accessLogs: ").append(toIndentedString(accessLogs)).append("\n"); sb.append(" ephemeralAddress: ").append(toIndentedString(ephemeralAddress)).append("\n"); sb.append(" observability: ").append(toIndentedString(observability)).append("\n"); sb.append(" privateNetworkOnly: ") @@ -227,10 +257,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -242,6 +269,7 @@ private String toIndentedString(Object o) { new HashSet( Arrays.asList( "accessControl", + "accessLogs", "ephemeralAddress", "observability", "privateNetworkOnly")); @@ -311,7 +339,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/LoadbalancerOptionAccessControl.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/LoadbalancerOptionAccessControl.java index 48e7f88e..0282abd2 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/LoadbalancerOptionAccessControl.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/LoadbalancerOptionAccessControl.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.loadbalancer.v2api.JSON; import com.google.gson.Gson; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -32,7 +33,7 @@ import java.util.Objects; /** Use this option to limit the IP ranges that can use the load balancer. */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class LoadbalancerOptionAccessControl { public static final String SERIALIZED_NAME_ALLOWED_SOURCE_RANGES = "allowedSourceRanges"; @@ -156,10 +157,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -239,7 +237,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/LoadbalancerOptionLogs.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/LoadbalancerOptionLogs.java index 1389f324..04da0a34 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/LoadbalancerOptionLogs.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/LoadbalancerOptionLogs.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.loadbalancer.v2api.JSON; import com.google.gson.Gson; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -31,7 +32,7 @@ import java.util.Objects; /** LoadbalancerOptionLogs */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class LoadbalancerOptionLogs { public static final String SERIALIZED_NAME_CREDENTIALS_REF = "credentialsRef"; @@ -166,10 +167,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -252,7 +250,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/LoadbalancerOptionMetrics.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/LoadbalancerOptionMetrics.java index d5bee1ed..555e8d9f 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/LoadbalancerOptionMetrics.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/LoadbalancerOptionMetrics.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.loadbalancer.v2api.JSON; import com.google.gson.Gson; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -31,7 +32,7 @@ import java.util.Objects; /** LoadbalancerOptionMetrics */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class LoadbalancerOptionMetrics { public static final String SERIALIZED_NAME_CREDENTIALS_REF = "credentialsRef"; @@ -168,10 +169,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -255,7 +253,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/LoadbalancerOptionObservability.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/LoadbalancerOptionObservability.java index 2122c6c0..1f640872 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/LoadbalancerOptionObservability.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/LoadbalancerOptionObservability.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.loadbalancer.v2api.JSON; import com.google.gson.Gson; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -31,7 +32,7 @@ import java.util.Objects; /** We offer Load Balancer observability via STACKIT Observability or external solutions. */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class LoadbalancerOptionObservability { public static final String SERIALIZED_NAME_LOGS = "logs"; @@ -167,10 +168,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -248,7 +246,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/Network.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/Network.java index cd8cc513..186cce29 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/Network.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/Network.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.loadbalancer.v2api.JSON; import com.google.gson.Gson; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -33,7 +34,7 @@ import java.util.UUID; /** Network */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class Network { public static final String SERIALIZED_NAME_NETWORK_ID = "networkId"; @@ -225,10 +226,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -314,7 +312,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/OptionsTCP.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/OptionsTCP.java index 835a874c..c9e97517 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/OptionsTCP.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/OptionsTCP.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.loadbalancer.v2api.JSON; import com.google.gson.Gson; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -35,7 +36,7 @@ * PROTOCOL_TLS_PASSTHROUGH protocols. TCP options for the SNI listeners with the same port must be * the same. */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class OptionsTCP { public static final String SERIALIZED_NAME_IDLE_TIMEOUT = "idleTimeout"; @@ -142,10 +143,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -219,7 +217,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/OptionsUDP.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/OptionsUDP.java index 1908e83e..a7dc5ba8 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/OptionsUDP.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/OptionsUDP.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.loadbalancer.v2api.JSON; import com.google.gson.Gson; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -31,7 +32,7 @@ import java.util.Objects; /** ProtocolOptionsUDP options to be configured for the PROTOCOL_UDP protocol. */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class OptionsUDP { public static final String SERIALIZED_NAME_IDLE_TIMEOUT = "idleTimeout"; @@ -138,10 +139,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -215,7 +213,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/PlanDetails.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/PlanDetails.java index 21450999..4e46eefe 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/PlanDetails.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/PlanDetails.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.loadbalancer.v2api.JSON; import com.google.gson.Gson; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -31,7 +32,7 @@ import java.util.Objects; /** PlanDetails */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class PlanDetails { public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @@ -269,10 +270,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -386,7 +384,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/SecurityGroup.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/SecurityGroup.java index d7e4c0b5..b56f1165 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/SecurityGroup.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/SecurityGroup.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.loadbalancer.v2api.JSON; import com.google.gson.Gson; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -31,7 +32,7 @@ import java.util.Objects; /** SecurityGroup */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class SecurityGroup { public static final String SERIALIZED_NAME_ID = "id"; @@ -162,10 +163,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -247,7 +245,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/ServerNameIndicator.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/ServerNameIndicator.java index ed8977dc..d0bc05da 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/ServerNameIndicator.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/ServerNameIndicator.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.loadbalancer.v2api.JSON; import com.google.gson.Gson; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -31,7 +32,7 @@ import java.util.Objects; /** ServerNameIndicator */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class ServerNameIndicator { public static final String SERIALIZED_NAME_NAME = "name"; @@ -138,10 +139,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -216,7 +214,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/SessionPersistence.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/SessionPersistence.java index 890156a1..e620b70e 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/SessionPersistence.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/SessionPersistence.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.loadbalancer.v2api.JSON; import com.google.gson.Gson; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -31,7 +32,7 @@ import java.util.Objects; /** SessionPersistence */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class SessionPersistence { public static final String SERIALIZED_NAME_USE_SOURCE_IP_ADDRESS = "useSourceIpAddress"; @@ -142,10 +143,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -212,7 +210,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/Status.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/Status.java index 26b7cfa2..83c2a4b6 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/Status.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/Status.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.loadbalancer.v2api.JSON; import com.google.gson.Gson; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -38,7 +39,7 @@ * error code, error message, and error details. You can find out more about this error model and * how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class Status { public static final String SERIALIZED_NAME_CODE = "code"; @@ -205,10 +206,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -292,7 +290,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/Target.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/Target.java index 719e5a75..212478d3 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/Target.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/Target.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.loadbalancer.v2api.JSON; import com.google.gson.Gson; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -31,7 +32,7 @@ import java.util.Objects; /** Target */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class Target { public static final String SERIALIZED_NAME_DISPLAY_NAME = "displayName"; @@ -162,10 +163,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -247,7 +245,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/TargetPool.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/TargetPool.java index 5dec3228..8201a476 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/TargetPool.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/TargetPool.java @@ -16,6 +16,7 @@ import com.google.gson.Gson; import com.google.gson.JsonArray; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -33,7 +34,7 @@ import java.util.Objects; /** TargetPool */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class TargetPool { public static final String SERIALIZED_NAME_ACTIVE_HEALTH_CHECK = "activeHealthCheck"; @@ -262,10 +263,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -375,7 +373,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/TlsConfig.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/TlsConfig.java index 8ef90528..8e8dfc4d 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/TlsConfig.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/TlsConfig.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.loadbalancer.v2api.JSON; import com.google.gson.Gson; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -31,7 +32,7 @@ import java.util.Objects; /** Set this to configure TLS settings. */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class TlsConfig { public static final String SERIALIZED_NAME_CUSTOM_CA = "customCa"; @@ -201,10 +202,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -280,7 +278,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/UpdateCredentialsPayload.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/UpdateCredentialsPayload.java index 285a0e69..34f3ede2 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/UpdateCredentialsPayload.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/UpdateCredentialsPayload.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.loadbalancer.v2api.JSON; import com.google.gson.Gson; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -31,7 +32,7 @@ import java.util.Objects; /** UpdateCredentialsPayload */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class UpdateCredentialsPayload { public static final String SERIALIZED_NAME_DISPLAY_NAME = "displayName"; @@ -190,10 +191,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -285,7 +283,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/UpdateCredentialsResponse.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/UpdateCredentialsResponse.java index 6f0c78e6..35036752 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/UpdateCredentialsResponse.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/UpdateCredentialsResponse.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.loadbalancer.v2api.JSON; import com.google.gson.Gson; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -31,7 +32,7 @@ import java.util.Objects; /** UpdateCredentialsResponse */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class UpdateCredentialsResponse { public static final String SERIALIZED_NAME_CREDENTIAL = "credential"; @@ -139,10 +140,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -214,7 +212,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/UpdateLoadBalancerPayload.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/UpdateLoadBalancerPayload.java index 26cc2f04..8beefcf3 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/UpdateLoadBalancerPayload.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/UpdateLoadBalancerPayload.java @@ -16,6 +16,7 @@ import com.google.gson.Gson; import com.google.gson.JsonArray; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -34,7 +35,7 @@ import java.util.Objects; /** UpdateLoadBalancerPayload */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class UpdateLoadBalancerPayload { public static final String SERIALIZED_NAME_DISABLE_TARGET_SECURITY_GROUP_ASSIGNMENT = "disableTargetSecurityGroupAssignment"; @@ -638,10 +639,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -877,7 +875,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject()); diff --git a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/UpdateTargetPoolPayload.java b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/UpdateTargetPoolPayload.java index cb815848..0c6eed3e 100644 --- a/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/UpdateTargetPoolPayload.java +++ b/services/loadbalancer/src/main/java/cloud/stackit/sdk/loadbalancer/v2api/model/UpdateTargetPoolPayload.java @@ -16,6 +16,7 @@ import com.google.gson.Gson; import com.google.gson.JsonArray; import com.google.gson.JsonElement; +import com.google.gson.JsonNull; import com.google.gson.JsonObject; import com.google.gson.TypeAdapter; import com.google.gson.TypeAdapterFactory; @@ -33,7 +34,7 @@ import java.util.Objects; /** UpdateTargetPoolPayload */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class UpdateTargetPoolPayload { public static final String SERIALIZED_NAME_ACTIVE_HEALTH_CHECK = "activeHealthCheck"; @@ -264,10 +265,7 @@ public String toString() { * line). */ private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); + return o == null ? "null" : o.toString().replace("\n", "\n "); } public static HashSet openapiFields; @@ -379,7 +377,9 @@ else if (entry.getValue() instanceof Character) entry.getKey(), (Character) entry.getValue()); else { JsonElement jsonElement = gson.toJsonTree(entry.getValue()); - if (jsonElement.isJsonArray()) { + if (jsonElement.isJsonNull()) { + obj.add(entry.getKey(), JsonNull.INSTANCE); + } else if (jsonElement.isJsonArray()) { obj.add(entry.getKey(), jsonElement.getAsJsonArray()); } else { obj.add(entry.getKey(), jsonElement.getAsJsonObject());