diff --git a/services/alb/build.gradle b/services/alb/build.gradle index 314067c8..aafa5f0b 100644 --- a/services/alb/build.gradle +++ b/services/alb/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/alb/oas_commit b/services/alb/oas_commit index 822e2894..9510a894 100644 --- a/services/alb/oas_commit +++ b/services/alb/oas_commit @@ -1 +1 @@ -7651289307a7a9e2dc9947ef380df3c4ca80fa60 +c9fb47b3087043293b6f77e5d3b778784de27ef2 diff --git a/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/ApiClient.java b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/ApiClient.java index 68e526c5..684facdb 100644 --- a/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/ApiClient.java +++ b/services/alb/src/main/java/cloud/stackit/sdk/alb/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.alb.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/alb/src/main/java/cloud/stackit/sdk/alb/v2api/JSON.java b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/JSON.java index 73c21477..5a4a4450 100644 --- a/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/JSON.java +++ b/services/alb/src/main/java/cloud/stackit/sdk/alb/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.alb.v2api.model.ActiveHealthCheck.CustomTypeAdapterFactory()); @@ -390,6 +395,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); } @@ -398,6 +450,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/alb/src/main/java/cloud/stackit/sdk/alb/v2api/Pair.java b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/Pair.java index 4e59527b..c051d7e1 100644 --- a/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/Pair.java +++ b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/Pair.java @@ -12,7 +12,7 @@ package cloud.stackit.sdk.alb.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/alb/src/main/java/cloud/stackit/sdk/alb/v2api/ServerConfiguration.java b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/ServerConfiguration.java index f425acd2..7271a429 100644 --- a/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/ServerConfiguration.java +++ b/services/alb/src/main/java/cloud/stackit/sdk/alb/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/alb/src/main/java/cloud/stackit/sdk/alb/v2api/ServerVariable.java b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/ServerVariable.java index 7d77f4e3..6bcf3ae4 100644 --- a/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/ServerVariable.java +++ b/services/alb/src/main/java/cloud/stackit/sdk/alb/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/alb/src/main/java/cloud/stackit/sdk/alb/v2api/StringUtil.java b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/StringUtil.java index 588ca45c..0a6402e1 100644 --- a/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/StringUtil.java +++ b/services/alb/src/main/java/cloud/stackit/sdk/alb/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/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/AbstractOpenApiSchema.java b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/AbstractOpenApiSchema.java index b0fee705..80748df0 100644 --- a/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/AbstractOpenApiSchema.java +++ b/services/alb/src/main/java/cloud/stackit/sdk/alb/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/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/ActiveHealthCheck.java b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/ActiveHealthCheck.java index 4062f468..3b31adbe 100644 --- a/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/ActiveHealthCheck.java +++ b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/ActiveHealthCheck.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.alb.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 customize active health checks for targets in this pool. */ -@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/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/CertificateConfig.java b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/CertificateConfig.java index d6c080be..d0a4ac54 100644 --- a/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/CertificateConfig.java +++ b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/CertificateConfig.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.alb.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; /** TLS termination certificate 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 CertificateConfig { public static final String SERIALIZED_NAME_CERTIFICATE_IDS = "certificateIds"; @@ -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; @@ -228,7 +226,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/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/CookiePersistence.java b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/CookiePersistence.java index 2d946bb4..36fca93e 100644 --- a/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/CookiePersistence.java +++ b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/CookiePersistence.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.alb.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; /** CookiePersistence contains the cookie-based session persistence 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 CookiePersistence { public static final String SERIALIZED_NAME_NAME = "name"; @@ -164,10 +165,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; @@ -250,7 +248,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/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/CreateCredentialsPayload.java b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/CreateCredentialsPayload.java index 1d16f3c8..cec9b0a3 100644 --- a/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/CreateCredentialsPayload.java +++ b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/CreateCredentialsPayload.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.alb.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/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/CreateCredentialsResponse.java b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/CreateCredentialsResponse.java index 7bf49754..b88f0f92 100644 --- a/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/CreateCredentialsResponse.java +++ b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/CreateCredentialsResponse.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.alb.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/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/CreateLoadBalancerPayload.java b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/CreateLoadBalancerPayload.java index 00f4a705..1cbaee75 100644 --- a/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/CreateLoadBalancerPayload.java +++ b/services/alb/src/main/java/cloud/stackit/sdk/alb/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"; @@ -623,10 +624,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; @@ -862,7 +860,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/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/CredentialsResponse.java b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/CredentialsResponse.java index c61c7cbb..299ccb2c 100644 --- a/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/CredentialsResponse.java +++ b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/CredentialsResponse.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.alb.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/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/GetCredentialsResponse.java b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/GetCredentialsResponse.java index d6a4ac7d..ff5d3bc0 100644 --- a/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/GetCredentialsResponse.java +++ b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/GetCredentialsResponse.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.alb.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/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/GetQuotaResponse.java b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/GetQuotaResponse.java index 1d283dc5..5904c2b2 100644 --- a/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/GetQuotaResponse.java +++ b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/GetQuotaResponse.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.alb.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/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/GoogleProtobufAny.java b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/GoogleProtobufAny.java index 1ad9631a..3b39d01a 100644 --- a/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/GoogleProtobufAny.java +++ b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/GoogleProtobufAny.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.alb.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/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/HostConfig.java b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/HostConfig.java index 3d4d2e0a..837e706e 100644 --- a/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/HostConfig.java +++ b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/HostConfig.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; /** HostConfig */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class HostConfig { public static final String SERIALIZED_NAME_HOST = "host"; @@ -172,10 +173,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; @@ -268,7 +266,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/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/HttpHeader.java b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/HttpHeader.java index e530d1b0..d2ab688e 100644 --- a/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/HttpHeader.java +++ b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/HttpHeader.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.alb.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; /** HttpHeader */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class HttpHeader { public static final String SERIALIZED_NAME_EXACT_MATCH = "exactMatch"; @@ -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/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/HttpHealthChecks.java b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/HttpHealthChecks.java index 512970d6..9c3967d5 100644 --- a/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/HttpHealthChecks.java +++ b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/HttpHealthChecks.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.alb.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/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/ListCredentialsResponse.java b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/ListCredentialsResponse.java index 6cc9a7a7..65b75d14 100644 --- a/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/ListCredentialsResponse.java +++ b/services/alb/src/main/java/cloud/stackit/sdk/alb/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/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/ListLoadBalancersResponse.java b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/ListLoadBalancersResponse.java index 11cf8d9d..d9b233a6 100644 --- a/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/ListLoadBalancersResponse.java +++ b/services/alb/src/main/java/cloud/stackit/sdk/alb/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/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/ListPlansResponse.java b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/ListPlansResponse.java index 59de4467..e12163af 100644 --- a/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/ListPlansResponse.java +++ b/services/alb/src/main/java/cloud/stackit/sdk/alb/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/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/Listener.java b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/Listener.java index 06e0b0a3..c0a944e7 100644 --- a/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/Listener.java +++ b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/Listener.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.alb.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; /** 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_HTTP = "http"; @@ -323,10 +324,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; @@ -431,7 +429,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/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/LoadBalancer.java b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/LoadBalancer.java index 22e00d09..eb7651ec 100644 --- a/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/LoadBalancer.java +++ b/services/alb/src/main/java/cloud/stackit/sdk/alb/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"; @@ -616,10 +617,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; @@ -853,7 +851,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/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/LoadBalancerError.java b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/LoadBalancerError.java index 5a3a2715..79aca3b4 100644 --- a/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/LoadBalancerError.java +++ b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/LoadBalancerError.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.alb.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/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/LoadBalancerOptions.java b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/LoadBalancerOptions.java index bf598acc..3b42cad2 100644 --- a/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/LoadBalancerOptions.java +++ b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/LoadBalancerOptions.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.alb.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,13 +34,18 @@ /** * Defines any optional functionality you want to have enabled on your Application 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) @@ -77,6 +83,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 Application Load Balancer. Defaults to false. Enable + * only when the Application 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; @@ -192,6 +219,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) @@ -203,6 +231,7 @@ public boolean equals(Object o) { public int hashCode() { return Objects.hash( accessControl, + accessLogs, ephemeralAddress, observability, privateNetworkOnly, @@ -214,6 +243,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: ") @@ -231,10 +261,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; @@ -246,6 +273,7 @@ private String toIndentedString(Object o) { new HashSet( Arrays.asList( "accessControl", + "accessLogs", "ephemeralAddress", "observability", "privateNetworkOnly")); @@ -315,7 +343,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/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/LoadbalancerOptionAccessControl.java b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/LoadbalancerOptionAccessControl.java index 0805ba78..b2c3857f 100644 --- a/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/LoadbalancerOptionAccessControl.java +++ b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/LoadbalancerOptionAccessControl.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.alb.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; @@ -37,7 +38,7 @@ * both are set, `allowed_source_ranges` is evaluated first, then * `ip_block_list_name` is evaluated. */ -@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"; @@ -193,10 +194,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/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/LoadbalancerOptionLogs.java b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/LoadbalancerOptionLogs.java index d4e56f2a..32712cf7 100644 --- a/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/LoadbalancerOptionLogs.java +++ b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/LoadbalancerOptionLogs.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.alb.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; /** Observability logs 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 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/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/LoadbalancerOptionMetrics.java b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/LoadbalancerOptionMetrics.java index 2c479dba..600be775 100644 --- a/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/LoadbalancerOptionMetrics.java +++ b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/LoadbalancerOptionMetrics.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.alb.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; /** Observability metrics 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 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/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/LoadbalancerOptionObservability.java b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/LoadbalancerOptionObservability.java index f979d5cc..21ea6499 100644 --- a/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/LoadbalancerOptionObservability.java +++ b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/LoadbalancerOptionObservability.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.alb.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/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/Network.java b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/Network.java index c02435e3..a842e30e 100644 --- a/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/Network.java +++ b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/Network.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.alb.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/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/Path.java b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/Path.java index edf1e214..23ad3e28 100644 --- a/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/Path.java +++ b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/Path.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.alb.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 @@ * '/' of prefix type. Cannot be set if 'path_prefix' is used. Prefer using this * field over 'path_prefix'. */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class Path { public static final String SERIALIZED_NAME_EXACT_MATCH = "exactMatch"; @@ -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; @@ -253,7 +251,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/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/PlanDetails.java b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/PlanDetails.java index 1ab06c36..0689af67 100644 --- a/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/PlanDetails.java +++ b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/PlanDetails.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.alb.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/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/ProtocolOptionsHTTP.java b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/ProtocolOptionsHTTP.java index c5ac1710..a47cc382 100644 --- a/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/ProtocolOptionsHTTP.java +++ b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/ProtocolOptionsHTTP.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; /** Configuration for handling HTTP traffic on this 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 ProtocolOptionsHTTP { public static final String SERIALIZED_NAME_HOSTS = "hosts"; @@ -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/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/ProtocolOptionsHTTPS.java b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/ProtocolOptionsHTTPS.java index 0ca04043..dcaee3ec 100644 --- a/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/ProtocolOptionsHTTPS.java +++ b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/ProtocolOptionsHTTPS.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.alb.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; /** Configuration for handling HTTPS traffic on this 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 ProtocolOptionsHTTPS { public static final String SERIALIZED_NAME_CERTIFICATE_CONFIG = "certificateConfig"; @@ -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; @@ -217,7 +215,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/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/QueryParameter.java b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/QueryParameter.java index 5a749b77..66304e97 100644 --- a/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/QueryParameter.java +++ b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/QueryParameter.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.alb.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; /** QueryParameter */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class QueryParameter { public static final String SERIALIZED_NAME_EXACT_MATCH = "exactMatch"; @@ -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/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/Rule.java b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/Rule.java index 309b835a..7ee1122c 100644 --- a/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/Rule.java +++ b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/Rule.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; /** Rule */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class Rule { public static final String SERIALIZED_NAME_COOKIE_PERSISTENCE = "cookiePersistence"; @@ -294,10 +295,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; @@ -427,7 +425,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/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/SecurityGroup.java b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/SecurityGroup.java index c334bd13..1687542c 100644 --- a/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/SecurityGroup.java +++ b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/SecurityGroup.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.alb.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/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/Status.java b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/Status.java index 9d7e9aac..40c7f434 100644 --- a/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/Status.java +++ b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/Status.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.alb.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/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/Target.java b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/Target.java index 368b67b0..1e2de766 100644 --- a/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/Target.java +++ b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/Target.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.alb.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/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/TargetPool.java b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/TargetPool.java index 5560c739..494964e6 100644 --- a/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/TargetPool.java +++ b/services/alb/src/main/java/cloud/stackit/sdk/alb/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"; @@ -253,10 +254,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; @@ -361,7 +359,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/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/TlsConfig.java b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/TlsConfig.java index 4bc134a3..4d12ed9b 100644 --- a/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/TlsConfig.java +++ b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/TlsConfig.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.alb.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/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/UpdateCredentialsPayload.java b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/UpdateCredentialsPayload.java index fe376d80..07fafcdf 100644 --- a/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/UpdateCredentialsPayload.java +++ b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/UpdateCredentialsPayload.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.alb.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/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/UpdateCredentialsResponse.java b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/UpdateCredentialsResponse.java index ba712ade..fff56102 100644 --- a/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/UpdateCredentialsResponse.java +++ b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/UpdateCredentialsResponse.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.alb.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/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/UpdateLoadBalancerPayload.java b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/UpdateLoadBalancerPayload.java index ddfbe190..eecc0e49 100644 --- a/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/UpdateLoadBalancerPayload.java +++ b/services/alb/src/main/java/cloud/stackit/sdk/alb/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"; @@ -630,10 +631,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; @@ -869,7 +867,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/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/UpdateTargetPoolPayload.java b/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/UpdateTargetPoolPayload.java index 475373f8..092ff7a3 100644 --- a/services/alb/src/main/java/cloud/stackit/sdk/alb/v2api/model/UpdateTargetPoolPayload.java +++ b/services/alb/src/main/java/cloud/stackit/sdk/alb/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"; @@ -254,10 +255,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; @@ -364,7 +362,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());