diff --git a/services/sfs/build.gradle b/services/sfs/build.gradle index 314067c8..aafa5f0b 100644 --- a/services/sfs/build.gradle +++ b/services/sfs/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/sfs/oas_commit b/services/sfs/oas_commit index f1d301ef..cdc3a7c3 100644 --- a/services/sfs/oas_commit +++ b/services/sfs/oas_commit @@ -1 +1 @@ -0c4c4c22a2db77c6bcc0e27e513531d1c25d4fe1 +c2afb47c530277ab9289d3d54cc32a606a28fd4b diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/ApiClient.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/ApiClient.java index e6b7e9a7..9ba66df0 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/ApiClient.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/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.sfs.v1api.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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/JSON.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/JSON.java index c3e28c35..0881d8bb 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/JSON.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/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,7 +98,10 @@ 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.sfs.v1api.model.ConflictError.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new cloud.stackit.sdk.sfs.v1api.model.CreateResourcePoolPayload .CustomTypeAdapterFactory()); @@ -432,6 +439,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); } @@ -440,6 +494,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/Pair.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/Pair.java index 814e3108..3ea8c6c5 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/Pair.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/Pair.java @@ -12,7 +12,7 @@ package cloud.stackit.sdk.sfs.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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/ServerConfiguration.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/ServerConfiguration.java index 10c7719f..b77ca760 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/ServerConfiguration.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/ServerVariable.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/ServerVariable.java index 1e341faf..41957671 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/ServerVariable.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/StringUtil.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/StringUtil.java index b367949a..e1ec77fc 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/StringUtil.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/api/DefaultApi.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/api/DefaultApi.java index 281d58a6..65529bfd 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/api/DefaultApi.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/api/DefaultApi.java @@ -151,6 +151,7 @@ public void setCustomBaseUrl(String customBaseUrl) { * 200 OK - * 400 Some fields of the request have failed the validation procedure. - * 401 Please make sure the Authorization Header is set and uses correct credentials - + * 409 The request conflicts with the current state of the resource. - * 500 Please retry again later or contact support if the issue persists - * */ @@ -265,6 +266,7 @@ private okhttp3.Call createResourcePoolValidateBeforeCall( * 200 OK - * 400 Some fields of the request have failed the validation procedure. - * 401 Please make sure the Authorization Header is set and uses correct credentials - + * 409 The request conflicts with the current state of the resource. - * 500 Please retry again later or contact support if the issue persists - * */ @@ -294,6 +296,7 @@ public CreateResourcePoolResponse createResourcePool( * 200 OK - * 400 Some fields of the request have failed the validation procedure. - * 401 Please make sure the Authorization Header is set and uses correct credentials - + * 409 The request conflicts with the current state of the resource. - * 500 Please retry again later or contact support if the issue persists - * */ @@ -326,6 +329,7 @@ public ApiResponse createResourcePoolWithHttpInfo( * 200 OK - * 400 Some fields of the request have failed the validation procedure. - * 401 Please make sure the Authorization Header is set and uses correct credentials - + * 409 The request conflicts with the current state of the resource. - * 500 Please retry again later or contact support if the issue persists - * */ @@ -361,6 +365,7 @@ public okhttp3.Call createResourcePoolAsync( * 200 OK - * 400 Some fields of the request have failed the validation procedure. - * 401 Please make sure the Authorization Header is set and uses correct credentials - + * 409 The request conflicts with the current state of the resource. - * 500 Please retry again later or contact support if the issue persists - * */ @@ -490,6 +495,7 @@ private okhttp3.Call createResourcePoolSnapshotValidateBeforeCall( * 200 OK - * 400 Some fields of the request have failed the validation procedure. - * 401 Please make sure the Authorization Header is set and uses correct credentials - + * 409 The request conflicts with the current state of the resource. - * 500 Please retry again later or contact support if the issue persists - * */ @@ -523,6 +529,7 @@ public CreateResourcePoolSnapshotResponse createResourcePoolSnapshot( * 200 OK - * 400 Some fields of the request have failed the validation procedure. - * 401 Please make sure the Authorization Header is set and uses correct credentials - + * 409 The request conflicts with the current state of the resource. - * 500 Please retry again later or contact support if the issue persists - * */ @@ -559,6 +566,7 @@ public ApiResponse createResourcePoolSnapsho * 200 OK - * 400 Some fields of the request have failed the validation procedure. - * 401 Please make sure the Authorization Header is set and uses correct credentials - + * 409 The request conflicts with the current state of the resource. - * 500 Please retry again later or contact support if the issue persists - * */ @@ -600,6 +608,7 @@ public okhttp3.Call createResourcePoolSnapshotAsync( * 200 OK - * 400 Some fields of the request have failed the validation procedure. - * 401 Please make sure the Authorization Header is set and uses correct credentials - + * 409 The request conflicts with the current state of the resource. - * 500 Please retry again later or contact support if the issue persists - * */ @@ -726,6 +735,7 @@ private okhttp3.Call createShareValidateBeforeCall( * 200 OK - * 400 Some fields of the request have failed the validation procedure. - * 401 Please make sure the Authorization Header is set and uses correct credentials - + * 409 The request conflicts with the current state of the resource. - * 500 Please retry again later or contact support if the issue persists - * */ @@ -757,6 +767,7 @@ public CreateShareResponse createShare( * 200 OK - * 400 Some fields of the request have failed the validation procedure. - * 401 Please make sure the Authorization Header is set and uses correct credentials - + * 409 The request conflicts with the current state of the resource. - * 500 Please retry again later or contact support if the issue persists - * */ @@ -791,6 +802,7 @@ public ApiResponse createShareWithHttpInfo( * 200 OK - * 400 Some fields of the request have failed the validation procedure. - * 401 Please make sure the Authorization Header is set and uses correct credentials - + * 409 The request conflicts with the current state of the resource. - * 500 Please retry again later or contact support if the issue persists - * */ @@ -826,6 +838,7 @@ public okhttp3.Call createShareAsync( * 200 OK - * 400 Some fields of the request have failed the validation procedure. - * 401 Please make sure the Authorization Header is set and uses correct credentials - + * 409 The request conflicts with the current state of the resource. - * 500 Please retry again later or contact support if the issue persists - * */ @@ -941,6 +954,7 @@ private okhttp3.Call createShareExportPolicyValidateBeforeCall( * 200 OK - * 400 Some fields of the request have failed the validation procedure. - * 401 Please make sure the Authorization Header is set and uses correct credentials - + * 409 The request conflicts with the current state of the resource. - * 500 Please retry again later or contact support if the issue persists - * */ @@ -971,6 +985,7 @@ public CreateShareExportPolicyResponse createShareExportPolicy( * 200 OK - * 400 Some fields of the request have failed the validation procedure. - * 401 Please make sure the Authorization Header is set and uses correct credentials - + * 409 The request conflicts with the current state of the resource. - * 500 Please retry again later or contact support if the issue persists - * */ @@ -1004,6 +1019,7 @@ public ApiResponse createShareExportPolicyWithH * 200 OK - * 400 Some fields of the request have failed the validation procedure. - * 401 Please make sure the Authorization Header is set and uses correct credentials - + * 409 The request conflicts with the current state of the resource. - * 500 Please retry again later or contact support if the issue persists - * */ @@ -1038,6 +1054,7 @@ public okhttp3.Call createShareExportPolicyAsync( * 200 OK - * 400 Some fields of the request have failed the validation procedure. - * 401 Please make sure the Authorization Header is set and uses correct credentials - + * 409 The request conflicts with the current state of the resource. - * 500 Please retry again later or contact support if the issue persists - * */ @@ -1155,6 +1172,7 @@ private okhttp3.Call deleteResourcePoolValidateBeforeCall( * 200 OK - * 400 Some fields of the request have failed the validation procedure. - * 401 Please make sure the Authorization Header is set and uses correct credentials - + * 409 The request conflicts with the current state of the resource. - * 500 Please retry again later or contact support if the issue persists - * */ @@ -1184,6 +1202,7 @@ public Object deleteResourcePool( * 200 OK - * 400 Some fields of the request have failed the validation procedure. - * 401 Please make sure the Authorization Header is set and uses correct credentials - + * 409 The request conflicts with the current state of the resource. - * 500 Please retry again later or contact support if the issue persists - * */ @@ -1215,6 +1234,7 @@ public ApiResponse deleteResourcePoolWithHttpInfo( * 200 OK - * 400 Some fields of the request have failed the validation procedure. - * 401 Please make sure the Authorization Header is set and uses correct credentials - + * 409 The request conflicts with the current state of the resource. - * 500 Please retry again later or contact support if the issue persists - * */ @@ -1249,6 +1269,7 @@ public okhttp3.Call deleteResourcePoolAsync( * 200 OK - * 400 Some fields of the request have failed the validation procedure. - * 401 Please make sure the Authorization Header is set and uses correct credentials - + * 409 The request conflicts with the current state of the resource. - * 500 Please retry again later or contact support if the issue persists - * */ @@ -1379,6 +1400,7 @@ private okhttp3.Call deleteResourcePoolSnapshotValidateBeforeCall( * 200 OK - * 400 Some fields of the request have failed the validation procedure. - * 401 Please make sure the Authorization Header is set and uses correct credentials - + * 409 The request conflicts with the current state of the resource. - * 500 Please retry again later or contact support if the issue persists - * */ @@ -1411,6 +1433,7 @@ public Object deleteResourcePoolSnapshot( * 200 OK - * 400 Some fields of the request have failed the validation procedure. - * 401 Please make sure the Authorization Header is set and uses correct credentials - + * 409 The request conflicts with the current state of the resource. - * 500 Please retry again later or contact support if the issue persists - * */ @@ -1446,6 +1469,7 @@ public ApiResponse deleteResourcePoolSnapshotWithHttpInfo( * 200 OK - * 400 Some fields of the request have failed the validation procedure. - * 401 Please make sure the Authorization Header is set and uses correct credentials - + * 409 The request conflicts with the current state of the resource. - * 500 Please retry again later or contact support if the issue persists - * */ @@ -1918,6 +1942,7 @@ public okhttp3.Call deleteShareExportPolicyAsync( * Response Details * Status Code Description Response Headers * 200 OK - + * 409 The request conflicts with the current state of the resource. - * 0 Default error response - * */ @@ -1957,7 +1982,7 @@ public okhttp3.Call disableLockCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = {"application/json", "application/problem+json"}; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); @@ -2019,6 +2044,7 @@ private okhttp3.Call disableLockValidateBeforeCall( * Response Details * Status Code Description Response Headers * 200 OK - + * 409 The request conflicts with the current state of the resource. - * 0 Default error response - * */ @@ -2042,6 +2068,7 @@ public Object disableLock( * Response Details * Status Code Description Response Headers * 200 OK - + * 409 The request conflicts with the current state of the resource. - * 0 Default error response - * */ @@ -2067,6 +2094,7 @@ public ApiResponse disableLockWithHttpInfo( * Response Details * Status Code Description Response Headers * 200 OK - + * 409 The request conflicts with the current state of the resource. - * 0 Default error response - * */ @@ -2095,6 +2123,7 @@ public okhttp3.Call disableLockAsync( * Response Details * Status Code Description Response Headers * 200 OK - + * 409 The request conflicts with the current state of the resource. - * 0 Default error response - * */ @@ -2134,7 +2163,7 @@ public okhttp3.Call enableLockCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - final String[] localVarAccepts = {"application/json"}; + final String[] localVarAccepts = {"application/json", "application/problem+json"}; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); @@ -2197,6 +2226,7 @@ private okhttp3.Call enableLockValidateBeforeCall( * Response Details * Status Code Description Response Headers * 200 OK - + * 409 The request conflicts with the current state of the resource. - * 0 Default error response - * */ @@ -2221,6 +2251,7 @@ public EnableLockResponse enableLock( * Response Details * Status Code Description Response Headers * 200 OK - + * 409 The request conflicts with the current state of the resource. - * 0 Default error response - * */ @@ -2247,6 +2278,7 @@ public ApiResponse enableLockWithHttpInfo( * Response Details * Status Code Description Response Headers * 200 OK - + * 409 The request conflicts with the current state of the resource. - * 0 Default error response - * */ @@ -4997,6 +5029,7 @@ public okhttp3.Call listSnapshotPoliciesAsync( * 200 OK - * 400 Some fields of the request have failed the validation procedure. - * 401 Please make sure the Authorization Header is set and uses correct credentials - + * 409 The request conflicts with the current state of the resource. - * 500 Please retry again later or contact support if the issue persists - * */ @@ -5124,6 +5157,7 @@ private okhttp3.Call updateResourcePoolValidateBeforeCall( * 200 OK - * 400 Some fields of the request have failed the validation procedure. - * 401 Please make sure the Authorization Header is set and uses correct credentials - + * 409 The request conflicts with the current state of the resource. - * 500 Please retry again later or contact support if the issue persists - * */ @@ -5156,6 +5190,7 @@ public UpdateResourcePoolResponse updateResourcePool( * 200 OK - * 400 Some fields of the request have failed the validation procedure. - * 401 Please make sure the Authorization Header is set and uses correct credentials - + * 409 The request conflicts with the current state of the resource. - * 500 Please retry again later or contact support if the issue persists - * */ @@ -5190,6 +5225,7 @@ public ApiResponse updateResourcePoolWithHttpInfo( * 200 OK - * 400 Some fields of the request have failed the validation procedure. - * 401 Please make sure the Authorization Header is set and uses correct credentials - + * 409 The request conflicts with the current state of the resource. - * 500 Please retry again later or contact support if the issue persists - * */ diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/AbstractOpenApiSchema.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/AbstractOpenApiSchema.java index 110e51e4..103901c2 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/AbstractOpenApiSchema.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ConflictError.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ConflictError.java new file mode 100644 index 00000000..07421900 --- /dev/null +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ConflictError.java @@ -0,0 +1,404 @@ +/* + * STACKIT File Storage (SFS) + * API used to create and manage NFS Shares. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package cloud.stackit.sdk.sfs.v1api.model; + +import cloud.stackit.sdk.sfs.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; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Conflict error response */ +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") +public class ConflictError { + public static final String SERIALIZED_NAME_DETAIL = "detail"; + + @SerializedName(SERIALIZED_NAME_DETAIL) + @javax.annotation.Nonnull + private String detail; + + public static final String SERIALIZED_NAME_ERROR_DESCRIPTION = "error_description"; + + @SerializedName(SERIALIZED_NAME_ERROR_DESCRIPTION) + @javax.annotation.Nonnull + private String errorDescription; + + public static final String SERIALIZED_NAME_STATUS_CODE = "status_code"; + + @SerializedName(SERIALIZED_NAME_STATUS_CODE) + @javax.annotation.Nonnull + private Integer statusCode; + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull + private String type; + + public ConflictError() {} + + public ConflictError detail(@javax.annotation.Nonnull String detail) { + this.detail = detail; + return this; + } + + /** + * Human-readable explanation of the specific problem + * + * @return detail + */ + @javax.annotation.Nonnull + public String getDetail() { + return detail; + } + + public void setDetail(@javax.annotation.Nonnull String detail) { + this.detail = detail; + } + + public ConflictError errorDescription(@javax.annotation.Nonnull String errorDescription) { + this.errorDescription = errorDescription; + return this; + } + + /** + * Human-readable string of the error that occurred + * + * @return errorDescription + */ + @javax.annotation.Nonnull + public String getErrorDescription() { + return errorDescription; + } + + public void setErrorDescription(@javax.annotation.Nonnull String errorDescription) { + this.errorDescription = errorDescription; + } + + public ConflictError statusCode(@javax.annotation.Nonnull Integer statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * The HTTP status code + * + * @return statusCode + */ + @javax.annotation.Nonnull + public Integer getStatusCode() { + return statusCode; + } + + public void setStatusCode(@javax.annotation.Nonnull Integer statusCode) { + this.statusCode = statusCode; + } + + public ConflictError type(@javax.annotation.Nonnull String type) { + this.type = type; + return this; + } + + /** + * URI Uniquely identifies the error type. It will be in the format of + * storage.stackit.cloud/<error-type> e.g. storage.stackit.cloud/conflict + * + * @return type + */ + @javax.annotation.Nonnull + public String getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull String type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ConflictError instance itself + */ + public ConflictError putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConflictError conflictError = (ConflictError) o; + return Objects.equals(this.detail, conflictError.detail) + && Objects.equals(this.errorDescription, conflictError.errorDescription) + && Objects.equals(this.statusCode, conflictError.statusCode) + && Objects.equals(this.type, conflictError.type) + && Objects.equals(this.additionalProperties, conflictError.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(detail, errorDescription, statusCode, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConflictError {\n"); + sb.append(" detail: ").append(toIndentedString(detail)).append("\n"); + sb.append(" errorDescription: ").append(toIndentedString(errorDescription)).append("\n"); + sb.append(" statusCode: ").append(toIndentedString(statusCode)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = + new HashSet( + Arrays.asList("detail", "error_description", "status_code", "type")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = + new HashSet( + Arrays.asList("detail", "error_description", "status_code", "type")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ConflictError + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ConflictError.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "The required field(s) %s in ConflictError is not found in the empty JSON string", + ConflictError.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ConflictError.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "The required field `%s` is not found in the JSON string: %s", + requiredField, + jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("detail").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `detail` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("detail").toString())); + } + if (!jsonObj.get("error_description").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `error_description` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("error_description").toString())); + } + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `type` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ConflictError.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ConflictError' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ConflictError.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ConflictError value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + 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()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ConflictError read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ConflictError instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "The field `%s` has unknown primitive type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ConflictError given an JSON string + * + * @param jsonString JSON string + * @return An instance of ConflictError + * @throws IOException if the JSON string is invalid with respect to ConflictError + */ + public static ConflictError fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ConflictError.class); + } + + /** + * Convert an instance of ConflictError to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateResourcePoolPayload.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateResourcePoolPayload.java index 58ffae9d..8fb4afcf 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateResourcePoolPayload.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateResourcePoolPayload.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.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; /** CreateResourcePoolPayload */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class CreateResourcePoolPayload { public static final String SERIALIZED_NAME_AVAILABILITY_ZONE = "availabilityZone"; @@ -144,9 +145,7 @@ public CreateResourcePoolPayload putLabelsItem(String key, String labelsItem) { } /** - * An optional object that represents the labels associated with the resource pool keys are - * validated using the following regex '^[\\\\p{Ll}][\\\\p{Ll}\\\\p{N}_-]*$' and cannot - * be empty values are validated using the following regex '^[\\\\p{Ll}\\\\p{N}_-]*$' + * An optional object that represents the labels associated with the resource pool. * * @return labels */ @@ -365,10 +364,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; @@ -506,7 +502,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateResourcePoolResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateResourcePoolResponse.java index 2d482dba..9accc763 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateResourcePoolResponse.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateResourcePoolResponse.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.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; /** CreateResourcePoolResponse */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class CreateResourcePoolResponse { public static final String SERIALIZED_NAME_RESOURCE_POOL = "resourcePool"; @@ -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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateResourcePoolSnapshotPayload.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateResourcePoolSnapshotPayload.java index 0e5d4618..4c536b3b 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateResourcePoolSnapshotPayload.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateResourcePoolSnapshotPayload.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.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 org.openapitools.jackson.nullable.JsonNullable; /** CreateResourcePoolSnapshotPayload */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class CreateResourcePoolSnapshotPayload { public static final String SERIALIZED_NAME_COMMENT = "comment"; @@ -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; @@ -304,7 +302,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateResourcePoolSnapshotResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateResourcePoolSnapshotResponse.java index 6f9ac5ec..56cf419b 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateResourcePoolSnapshotResponse.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateResourcePoolSnapshotResponse.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.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; /** CreateResourcePoolSnapshotResponse */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class CreateResourcePoolSnapshotResponse { public static final String SERIALIZED_NAME_RESOURCE_POOL_SNAPSHOT = "resourcePoolSnapshot"; @@ -146,10 +147,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; @@ -225,7 +223,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateShareExportPolicyPayload.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateShareExportPolicyPayload.java index 9acc21a7..2c3e9964 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateShareExportPolicyPayload.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateShareExportPolicyPayload.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; /** CreateShareExportPolicyPayload */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class CreateShareExportPolicyPayload { public static final String SERIALIZED_NAME_LABELS = "labels"; @@ -68,10 +69,7 @@ public CreateShareExportPolicyPayload putLabelsItem(String key, String labelsIte } /** - * An optional object that represents the labels associated with the share export policy keys - * are validated using the following regex '^[\\\\p{Ll}][\\\\p{Ll}\\\\p{N}_-]*$' and - * cannot be empty values are validated using the following regex - * '^[\\\\p{Ll}\\\\p{N}_-]*$' + * An optional object that represents the labels associated with the share export policy. * * @return labels */ @@ -218,10 +216,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; @@ -329,7 +324,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateShareExportPolicyRequestRule.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateShareExportPolicyRequestRule.java index 50aa68f8..89173484 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateShareExportPolicyRequestRule.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateShareExportPolicyRequestRule.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.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 org.openapitools.jackson.nullable.JsonNullable; /** CreateShareExportPolicyRequestRule */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class CreateShareExportPolicyRequestRule { public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @@ -299,10 +300,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; @@ -399,7 +397,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateShareExportPolicyResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateShareExportPolicyResponse.java index b5ba9a31..5222b894 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateShareExportPolicyResponse.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateShareExportPolicyResponse.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.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; /** CreateShareExportPolicyResponse */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class CreateShareExportPolicyResponse { public static final String SERIALIZED_NAME_SHARE_EXPORT_POLICY = "shareExportPolicy"; @@ -145,10 +146,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; @@ -223,7 +221,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateSharePayload.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateSharePayload.java index d92ae778..c0f8e9a4 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateSharePayload.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateSharePayload.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.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 org.openapitools.jackson.nullable.JsonNullable; /** CreateSharePayload */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class CreateSharePayload { public static final String SERIALIZED_NAME_EXPORT_POLICY_NAME = "exportPolicyName"; @@ -93,9 +94,7 @@ public CreateSharePayload putLabelsItem(String key, String labelsItem) { } /** - * An optional object that represents the labels associated with the share keys are validated - * using the following regex '^[\\\\p{Ll}][\\\\p{Ll}\\\\p{N}_-]*$' and cannot be empty - * values are validated using the following regex '^[\\\\p{Ll}\\\\p{N}_-]*$' + * An optional object that represents the labels associated with the share. * * @return labels */ @@ -254,10 +253,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; @@ -356,7 +352,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateShareResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateShareResponse.java index ff3e2ef3..e74ae06a 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateShareResponse.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateShareResponse.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.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; /** CreateShareResponse */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class CreateShareResponse { public static final String SERIALIZED_NAME_SHARE = "share"; @@ -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; @@ -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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/EnableLockResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/EnableLockResponse.java index ed70577b..86d8a043 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/EnableLockResponse.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/EnableLockResponse.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.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; /** EnableLockResponse */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class EnableLockResponse { public static final String SERIALIZED_NAME_LOCK_ID = "lockId"; @@ -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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/Error.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/Error.java index f78b9b6a..5dcb56cc 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/Error.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/Error.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.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 org.openapitools.jackson.nullable.JsonNullable; /** Error */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class Error { public static final String SERIALIZED_NAME_ERROR_DESCRIPTION = "error_description"; @@ -214,10 +215,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; @@ -309,7 +307,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/GetLockResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/GetLockResponse.java index 56e33ef1..965430e1 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/GetLockResponse.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/GetLockResponse.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.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; /** GetLockResponse */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class GetLockResponse { public static final String SERIALIZED_NAME_LOCK_ID = "lockId"; @@ -137,10 +138,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/GetResourcePoolResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/GetResourcePoolResponse.java index 28c5435a..38396ce1 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/GetResourcePoolResponse.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/GetResourcePoolResponse.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.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; /** GetResourcePoolResponse */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class GetResourcePoolResponse { public static final String SERIALIZED_NAME_RESOURCE_POOL = "resourcePool"; @@ -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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/GetResourcePoolSnapshotResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/GetResourcePoolSnapshotResponse.java index faeb05da..03b1babd 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/GetResourcePoolSnapshotResponse.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/GetResourcePoolSnapshotResponse.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.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; /** GetResourcePoolSnapshotResponse */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class GetResourcePoolSnapshotResponse { public static final String SERIALIZED_NAME_RESOURCE_POOL_SNAPSHOT = "resourcePoolSnapshot"; @@ -146,10 +147,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; @@ -224,7 +222,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/GetScheduleResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/GetScheduleResponse.java index ecd4ec72..8f5bed26 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/GetScheduleResponse.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/GetScheduleResponse.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.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; /** GetScheduleResponse */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class GetScheduleResponse { public static final String SERIALIZED_NAME_SCHEDULE = "schedule"; @@ -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; @@ -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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/GetShareExportPolicyResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/GetShareExportPolicyResponse.java index 2e9b19f2..ea94f697 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/GetShareExportPolicyResponse.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/GetShareExportPolicyResponse.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.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; /** GetShareExportPolicyResponse */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class GetShareExportPolicyResponse { public static final String SERIALIZED_NAME_SHARE_EXPORT_POLICY = "shareExportPolicy"; @@ -145,10 +146,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; @@ -223,7 +221,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/GetShareResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/GetShareResponse.java index 61b770ff..c1785e21 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/GetShareResponse.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/GetShareResponse.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.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; /** GetShareResponse */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class GetShareResponse { public static final String SERIALIZED_NAME_SHARE = "share"; @@ -137,10 +138,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; @@ -211,7 +209,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/GetSnapshotPolicyResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/GetSnapshotPolicyResponse.java index ea3722d3..11042bcb 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/GetSnapshotPolicyResponse.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/GetSnapshotPolicyResponse.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.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; /** GetSnapshotPolicyResponse */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class GetSnapshotPolicyResponse { public static final String SERIALIZED_NAME_SNAPSHOT_POLICY = "snapshotPolicy"; @@ -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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/GoogleProtobufAny.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/GoogleProtobufAny.java index 6ff45fee..6c14e242 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/GoogleProtobufAny.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/GoogleProtobufAny.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ListPerformanceClassesResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ListPerformanceClassesResponse.java index 9c95d697..89979756 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ListPerformanceClassesResponse.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ListPerformanceClassesResponse.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; /** ListPerformanceClassesResponse */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class ListPerformanceClassesResponse { public static final String SERIALIZED_NAME_PERFORMANCE_CLASSES = "performanceClasses"; @@ -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; @@ -249,7 +247,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ListResourcePoolSnapshotsResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ListResourcePoolSnapshotsResponse.java index 9d7ab66e..ade9c164 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ListResourcePoolSnapshotsResponse.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ListResourcePoolSnapshotsResponse.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; /** ListResourcePoolSnapshotsResponse */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class ListResourcePoolSnapshotsResponse { public static final String SERIALIZED_NAME_RESOURCE_POOL_SNAPSHOTS = "resourcePoolSnapshots"; @@ -157,10 +158,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ListResourcePoolsResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ListResourcePoolsResponse.java index 31363cd8..7e1e2a11 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ListResourcePoolsResponse.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ListResourcePoolsResponse.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; /** ListResourcePoolsResponse */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class ListResourcePoolsResponse { public static final String SERIALIZED_NAME_RESOURCE_POOLS = "resourcePools"; @@ -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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ListSchedulesResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ListSchedulesResponse.java index 8f26dba8..ad82c58e 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ListSchedulesResponse.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ListSchedulesResponse.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; /** ListSchedulesResponse */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class ListSchedulesResponse { public static final String SERIALIZED_NAME_SCHEDULES = "schedules"; @@ -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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ListShareExportPoliciesResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ListShareExportPoliciesResponse.java index 5c69c2b0..30e1be7a 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ListShareExportPoliciesResponse.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ListShareExportPoliciesResponse.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; /** ListShareExportPoliciesResponse */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class ListShareExportPoliciesResponse { public static final String SERIALIZED_NAME_SHARE_EXPORT_POLICIES = "shareExportPolicies"; @@ -157,10 +158,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ListSharesResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ListSharesResponse.java index f92db506..34ba682c 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ListSharesResponse.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ListSharesResponse.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; /** ListSharesResponse */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class ListSharesResponse { public static final String SERIALIZED_NAME_SHARES = "shares"; @@ -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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ListSnapshotPoliciesResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ListSnapshotPoliciesResponse.java index 55cd250f..7eb341ac 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ListSnapshotPoliciesResponse.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ListSnapshotPoliciesResponse.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; /** ListSnapshotPoliciesResponse */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class ListSnapshotPoliciesResponse { public static final String SERIALIZED_NAME_SNAPSHOT_POLICIES = "snapshotPolicies"; @@ -153,10 +154,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,7 +244,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/PerformanceClass.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/PerformanceClass.java index 87d00f9b..d150f969 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/PerformanceClass.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/PerformanceClass.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.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; /** PerformanceClass */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class PerformanceClass { public static final String SERIALIZED_NAME_IOPS = "iops"; @@ -187,10 +188,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; @@ -265,7 +263,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ResourcePool.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ResourcePool.java index e7a55a6b..25b50df1 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ResourcePool.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ResourcePool.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.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 @@ import org.openapitools.jackson.nullable.JsonNullable; /** ResourcePool */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class ResourcePool { public static final String SERIALIZED_NAME_AVAILABILITY_ZONE = "availabilityZone"; @@ -560,10 +561,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; @@ -710,7 +708,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ResourcePoolPerformanceClass.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ResourcePoolPerformanceClass.java index 9b504bbf..cea2e5bd 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ResourcePoolPerformanceClass.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ResourcePoolPerformanceClass.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.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; /** ResourcePoolPerformanceClass */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class ResourcePoolPerformanceClass { public static final String SERIALIZED_NAME_NAME = "name"; @@ -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; @@ -271,7 +269,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ResourcePoolSnapshot.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ResourcePoolSnapshot.java index b8e11b32..5655f06c 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ResourcePoolSnapshot.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ResourcePoolSnapshot.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.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 org.openapitools.jackson.nullable.JsonNullable; /** ResourcePoolSnapshot */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class ResourcePoolSnapshot { public static final String SERIALIZED_NAME_COMMENT = "comment"; @@ -324,10 +325,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ResourcePoolSnapshotPolicy.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ResourcePoolSnapshotPolicy.java index f84bdc8c..61dc6d01 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ResourcePoolSnapshotPolicy.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ResourcePoolSnapshotPolicy.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.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; /** ResourcePoolSnapshotPolicy */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class ResourcePoolSnapshotPolicy { public static final String SERIALIZED_NAME_ID = "id"; @@ -163,10 +164,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ResourcePoolSpace.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ResourcePoolSpace.java index 438fb27e..323d3d2c 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ResourcePoolSpace.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ResourcePoolSpace.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.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 org.openapitools.jackson.nullable.JsonNullable; /** ResourcePoolSpace */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class ResourcePoolSpace { public static final String SERIALIZED_NAME_AVAILABLE_GIGABYTES = "availableGigabytes"; @@ -245,10 +246,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; @@ -321,7 +319,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/Schedule.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/Schedule.java index cbf4f402..4f804fd4 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/Schedule.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/Schedule.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.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; /** Schedule */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class Schedule { public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; @@ -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; @@ -306,7 +304,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/Share.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/Share.java index 891f8fb7..2fd293b0 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/Share.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/Share.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.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 org.openapitools.jackson.nullable.JsonNullable; /** Share */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class Share { public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; @@ -148,9 +149,7 @@ public Share putLabelsItem(String key, String labelsItem) { } /** - * An optional object that represents the labels associated with the share keys are validated - * using the following regex '^[\\\\p{Ll}][\\\\p{Ll}\\\\p{N}_-]*$' and cannot be empty - * values are validated using the following regex '^[\\\\p{Ll}\\\\p{N}_-]*$' + * An optional object that represents the labels associated with the share. * * @return labels */ @@ -358,10 +357,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; @@ -473,7 +469,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ShareExportPolicy.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ShareExportPolicy.java index bc513c3a..821bdea0 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ShareExportPolicy.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ShareExportPolicy.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; /** ShareExportPolicy */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class ShareExportPolicy { public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; @@ -119,10 +120,7 @@ public ShareExportPolicy putLabelsItem(String key, String labelsItem) { } /** - * An optional object that represents the labels associated with the share export policy keys - * are validated using the following regex '^[\\\\p{Ll}][\\\\p{Ll}\\\\p{N}_-]*$' and - * cannot be empty values are validated using the following regex - * '^[\\\\p{Ll}\\\\p{N}_-]*$' + * An optional object that represents the labels associated with the share export policy. * * @return labels */ @@ -293,10 +291,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; @@ -406,7 +401,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ShareExportPolicyRule.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ShareExportPolicyRule.java index 9aa142b4..5fa3c404 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ShareExportPolicyRule.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ShareExportPolicyRule.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.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 @@ import org.openapitools.jackson.nullable.JsonNullable; /** ShareExportPolicyRule */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class ShareExportPolicyRule { public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; @@ -353,10 +354,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; @@ -459,7 +457,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/SnapshotPolicy.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/SnapshotPolicy.java index 049fc0cf..cc943190 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/SnapshotPolicy.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/SnapshotPolicy.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; /** SnapshotPolicy */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class SnapshotPolicy { public static final String SERIALIZED_NAME_COMMENT = "comment"; @@ -325,10 +326,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; @@ -467,7 +465,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/SnapshotPolicySchedule.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/SnapshotPolicySchedule.java index 4abc053d..59d8cfdc 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/SnapshotPolicySchedule.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/SnapshotPolicySchedule.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.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; /** SnapshotPolicySchedule */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class SnapshotPolicySchedule { public static final String SERIALIZED_NAME_COUNT = "count"; @@ -240,10 +241,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; @@ -345,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/SnapshotPolicySnapshotPolicySchedule.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/SnapshotPolicySnapshotPolicySchedule.java index 07e70d6a..01b0c5d5 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/SnapshotPolicySnapshotPolicySchedule.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/SnapshotPolicySnapshotPolicySchedule.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.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; /** SnapshotPolicySnapshotPolicySchedule */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class SnapshotPolicySnapshotPolicySchedule { public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; @@ -305,10 +306,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; @@ -429,7 +427,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/Status.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/Status.java index faaf4694..e85e4257 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/Status.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/Status.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateResourcePoolPayload.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateResourcePoolPayload.java index 82fa0e9e..a43970c9 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateResourcePoolPayload.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateResourcePoolPayload.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.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 org.openapitools.jackson.nullable.JsonNullable; /** UpdateResourcePoolPayload */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class UpdateResourcePoolPayload { public static final String SERIALIZED_NAME_IP_ACL = "ipAcl"; @@ -109,9 +110,7 @@ public UpdateResourcePoolPayload putLabelsItem(String key, String labelsItem) { } /** - * An optional object that represents the labels associated with the resource pool keys are - * validated using the following regex '^[\\\\p{Ll}][\\\\p{Ll}\\\\p{N}_-]*$' and cannot - * be empty values are validated using the following regex '^[\\\\p{Ll}\\\\p{N}_-]*$' + * An optional object that represents the labels associated with the resource pool. * * @return labels */ @@ -320,10 +319,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 +423,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateResourcePoolResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateResourcePoolResponse.java index 26c2f53c..06277baf 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateResourcePoolResponse.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateResourcePoolResponse.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.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; /** UpdateResourcePoolResponse */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class UpdateResourcePoolResponse { public static final String SERIALIZED_NAME_RESOURCE_POOL = "resourcePool"; @@ -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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateResourcePoolSnapshotPayload.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateResourcePoolSnapshotPayload.java index fe5eff8c..6fdd040a 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateResourcePoolSnapshotPayload.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateResourcePoolSnapshotPayload.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.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 org.openapitools.jackson.nullable.JsonNullable; /** UpdateResourcePoolSnapshotPayload */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class UpdateResourcePoolSnapshotPayload { public static final String SERIALIZED_NAME_COMMENT = "comment"; @@ -182,10 +183,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateResourcePoolSnapshotResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateResourcePoolSnapshotResponse.java index 9b4b3af0..6c85d7bb 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateResourcePoolSnapshotResponse.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateResourcePoolSnapshotResponse.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.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; /** UpdateResourcePoolSnapshotResponse */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class UpdateResourcePoolSnapshotResponse { public static final String SERIALIZED_NAME_RESOURCE_POOL_SNAPSHOT = "resourcePoolSnapshot"; @@ -146,10 +147,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; @@ -225,7 +223,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateShareExportPolicyBodyRule.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateShareExportPolicyBodyRule.java index 8c43d05a..06b73ecf 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateShareExportPolicyBodyRule.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateShareExportPolicyBodyRule.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.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 org.openapitools.jackson.nullable.JsonNullable; /** UpdateShareExportPolicyBodyRule */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class UpdateShareExportPolicyBodyRule { public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @@ -297,10 +298,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; @@ -396,7 +394,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateShareExportPolicyPayload.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateShareExportPolicyPayload.java index d910cde9..0506d971 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateShareExportPolicyPayload.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateShareExportPolicyPayload.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 org.openapitools.jackson.nullable.JsonNullable; /** UpdateShareExportPolicyPayload */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class UpdateShareExportPolicyPayload { public static final String SERIALIZED_NAME_LABELS = "labels"; @@ -63,10 +64,7 @@ public UpdateShareExportPolicyPayload putLabelsItem(String key, String labelsIte } /** - * An optional object that represents the labels associated with the share export policy keys - * are validated using the following regex '^[\\\\p{Ll}][\\\\p{Ll}\\\\p{N}_-]*$' and - * cannot be empty values are validated using the following regex - * '^[\\\\p{Ll}\\\\p{N}_-]*$' + * An optional object that represents the labels associated with the share export policy. * * @return labels */ @@ -210,10 +208,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; @@ -302,7 +297,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateShareExportPolicyResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateShareExportPolicyResponse.java index a698c1dc..841a6df7 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateShareExportPolicyResponse.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateShareExportPolicyResponse.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.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; /** UpdateShareExportPolicyResponse */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class UpdateShareExportPolicyResponse { public static final String SERIALIZED_NAME_SHARE_EXPORT_POLICY = "shareExportPolicy"; @@ -145,10 +146,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; @@ -223,7 +221,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateSharePayload.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateSharePayload.java index 15b005c6..e51d567d 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateSharePayload.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateSharePayload.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.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 org.openapitools.jackson.nullable.JsonNullable; /** UpdateSharePayload */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class UpdateSharePayload { public static final String SERIALIZED_NAME_EXPORT_POLICY_NAME = "exportPolicyName"; @@ -87,9 +88,7 @@ public UpdateSharePayload putLabelsItem(String key, String labelsItem) { } /** - * An optional object that represents the labels associated with the share keys are validated - * using the following regex '^[\\\\p{Ll}][\\\\p{Ll}\\\\p{N}_-]*$' and cannot be empty - * values are validated using the following regex '^[\\\\p{Ll}\\\\p{N}_-]*$' + * An optional object that represents the labels associated with the share. * * @return labels */ @@ -226,10 +225,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; @@ -307,7 +303,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateShareResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateShareResponse.java index a5ad11ef..cbbd2c66 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateShareResponse.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateShareResponse.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.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; /** UpdateShareResponse */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class UpdateShareResponse { public static final String SERIALIZED_NAME_SHARE = "share"; @@ -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; @@ -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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ValidationError.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ValidationError.java index 14f47910..0d1ca51d 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ValidationError.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ValidationError.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 org.openapitools.jackson.nullable.JsonNullable; /** ValidationError */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class ValidationError { public static final String SERIALIZED_NAME_ERROR_DESCRIPTION = "error_description"; @@ -251,10 +252,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; @@ -313,21 +311,20 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } - // ensure the json data is an array - if (!jsonObj.get("fields").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - java.util.Locale.ROOT, - "Expected the field `fields` to be an array in the JSON string but got `%s`", - jsonObj.get("fields").toString())); - } - - JsonArray jsonArrayfields = jsonObj.getAsJsonArray("fields"); - // validate the required field `fields` (array) - for (int i = 0; i < jsonArrayfields.size(); i++) { - ValidationErrorField.validateJsonElement(jsonArrayfields.get(i)); + if (jsonObj.get("fields") != null) { + if (!jsonObj.get("fields").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `fields` to be an array in the JSON string but got `%s`", + jsonObj.get("fields").toString())); + } + JsonArray jsonArrayfields = jsonObj.getAsJsonArray("fields"); + // validate the required field `fields` (array) + for (int i = 0; i < jsonArrayfields.size(); i++) { + ValidationErrorField.validateJsonElement(jsonArrayfields.get(i)); + } } - ; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -363,7 +360,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ValidationErrorField.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ValidationErrorField.java index d2038b88..95c4d7bd 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ValidationErrorField.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ValidationErrorField.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.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; /** ValidationErrorField */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class ValidationErrorField { public static final String SERIALIZED_NAME_FIELD = "field"; @@ -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; @@ -263,7 +261,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/ApiClient.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/ApiClient.java index 092471fc..622cf6a7 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/ApiClient.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/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.sfs.v1betaapi.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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/JSON.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/JSON.java index edeb21da..6e0657eb 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/JSON.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/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,7 +98,10 @@ 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.sfs.v1betaapi.model.ConflictError.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new cloud.stackit.sdk.sfs.v1betaapi.model.CreateResourcePoolPayload .CustomTypeAdapterFactory()); @@ -408,6 +415,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); } @@ -416,6 +470,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/Pair.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/Pair.java index 68002e93..0db05cc7 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/Pair.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/Pair.java @@ -12,7 +12,7 @@ package cloud.stackit.sdk.sfs.v1betaapi; -@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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/ServerConfiguration.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/ServerConfiguration.java index 7247d6ce..0cd2ae1b 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/ServerConfiguration.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/ServerVariable.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/ServerVariable.java index e0b8bd1e..65479f45 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/ServerVariable.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/StringUtil.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/StringUtil.java index 2f6163bb..721db95c 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/StringUtil.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/api/DefaultApi.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/api/DefaultApi.java index 35449a30..c690a8e7 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/api/DefaultApi.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/api/DefaultApi.java @@ -144,6 +144,7 @@ public void setCustomBaseUrl(String customBaseUrl) { * 200 OK - * 400 Some fields of the request have failed the validation procedure. - * 401 Please make sure the Authorization Header is set and uses correct credentials - + * 409 The request conflicts with the current state of the resource. - * 500 Please retry again later or contact support if the issue persists - * */ @@ -258,6 +259,7 @@ private okhttp3.Call createResourcePoolValidateBeforeCall( * 200 OK - * 400 Some fields of the request have failed the validation procedure. - * 401 Please make sure the Authorization Header is set and uses correct credentials - + * 409 The request conflicts with the current state of the resource. - * 500 Please retry again later or contact support if the issue persists - * */ @@ -287,6 +289,7 @@ public CreateResourcePoolResponse createResourcePool( * 200 OK - * 400 Some fields of the request have failed the validation procedure. - * 401 Please make sure the Authorization Header is set and uses correct credentials - + * 409 The request conflicts with the current state of the resource. - * 500 Please retry again later or contact support if the issue persists - * */ @@ -319,6 +322,7 @@ public ApiResponse createResourcePoolWithHttpInfo( * 200 OK - * 400 Some fields of the request have failed the validation procedure. - * 401 Please make sure the Authorization Header is set and uses correct credentials - + * 409 The request conflicts with the current state of the resource. - * 500 Please retry again later or contact support if the issue persists - * */ @@ -354,6 +358,7 @@ public okhttp3.Call createResourcePoolAsync( * 200 OK - * 400 Some fields of the request have failed the validation procedure. - * 401 Please make sure the Authorization Header is set and uses correct credentials - + * 409 The request conflicts with the current state of the resource. - * 500 Please retry again later or contact support if the issue persists - * */ @@ -483,6 +488,7 @@ private okhttp3.Call createResourcePoolSnapshotValidateBeforeCall( * 200 OK - * 400 Some fields of the request have failed the validation procedure. - * 401 Please make sure the Authorization Header is set and uses correct credentials - + * 409 The request conflicts with the current state of the resource. - * 500 Please retry again later or contact support if the issue persists - * */ @@ -516,6 +522,7 @@ public CreateResourcePoolSnapshotResponse createResourcePoolSnapshot( * 200 OK - * 400 Some fields of the request have failed the validation procedure. - * 401 Please make sure the Authorization Header is set and uses correct credentials - + * 409 The request conflicts with the current state of the resource. - * 500 Please retry again later or contact support if the issue persists - * */ @@ -552,6 +559,7 @@ public ApiResponse createResourcePoolSnapsho * 200 OK - * 400 Some fields of the request have failed the validation procedure. - * 401 Please make sure the Authorization Header is set and uses correct credentials - + * 409 The request conflicts with the current state of the resource. - * 500 Please retry again later or contact support if the issue persists - * */ @@ -593,6 +601,7 @@ public okhttp3.Call createResourcePoolSnapshotAsync( * 200 OK - * 400 Some fields of the request have failed the validation procedure. - * 401 Please make sure the Authorization Header is set and uses correct credentials - + * 409 The request conflicts with the current state of the resource. - * 500 Please retry again later or contact support if the issue persists - * */ @@ -719,6 +728,7 @@ private okhttp3.Call createShareValidateBeforeCall( * 200 OK - * 400 Some fields of the request have failed the validation procedure. - * 401 Please make sure the Authorization Header is set and uses correct credentials - + * 409 The request conflicts with the current state of the resource. - * 500 Please retry again later or contact support if the issue persists - * */ @@ -750,6 +760,7 @@ public CreateShareResponse createShare( * 200 OK - * 400 Some fields of the request have failed the validation procedure. - * 401 Please make sure the Authorization Header is set and uses correct credentials - + * 409 The request conflicts with the current state of the resource. - * 500 Please retry again later or contact support if the issue persists - * */ @@ -784,6 +795,7 @@ public ApiResponse createShareWithHttpInfo( * 200 OK - * 400 Some fields of the request have failed the validation procedure. - * 401 Please make sure the Authorization Header is set and uses correct credentials - + * 409 The request conflicts with the current state of the resource. - * 500 Please retry again later or contact support if the issue persists - * */ @@ -819,6 +831,7 @@ public okhttp3.Call createShareAsync( * 200 OK - * 400 Some fields of the request have failed the validation procedure. - * 401 Please make sure the Authorization Header is set and uses correct credentials - + * 409 The request conflicts with the current state of the resource. - * 500 Please retry again later or contact support if the issue persists - * */ @@ -934,6 +947,7 @@ private okhttp3.Call createShareExportPolicyValidateBeforeCall( * 200 OK - * 400 Some fields of the request have failed the validation procedure. - * 401 Please make sure the Authorization Header is set and uses correct credentials - + * 409 The request conflicts with the current state of the resource. - * 500 Please retry again later or contact support if the issue persists - * */ @@ -964,6 +978,7 @@ public CreateShareExportPolicyResponse createShareExportPolicy( * 200 OK - * 400 Some fields of the request have failed the validation procedure. - * 401 Please make sure the Authorization Header is set and uses correct credentials - + * 409 The request conflicts with the current state of the resource. - * 500 Please retry again later or contact support if the issue persists - * */ @@ -997,6 +1012,7 @@ public ApiResponse createShareExportPolicyWithH * 200 OK - * 400 Some fields of the request have failed the validation procedure. - * 401 Please make sure the Authorization Header is set and uses correct credentials - + * 409 The request conflicts with the current state of the resource. - * 500 Please retry again later or contact support if the issue persists - * */ @@ -1031,6 +1047,7 @@ public okhttp3.Call createShareExportPolicyAsync( * 200 OK - * 400 Some fields of the request have failed the validation procedure. - * 401 Please make sure the Authorization Header is set and uses correct credentials - + * 409 The request conflicts with the current state of the resource. - * 500 Please retry again later or contact support if the issue persists - * */ @@ -1148,6 +1165,7 @@ private okhttp3.Call deleteResourcePoolValidateBeforeCall( * 200 OK - * 400 Some fields of the request have failed the validation procedure. - * 401 Please make sure the Authorization Header is set and uses correct credentials - + * 409 The request conflicts with the current state of the resource. - * 500 Please retry again later or contact support if the issue persists - * */ @@ -1177,6 +1195,7 @@ public Object deleteResourcePool( * 200 OK - * 400 Some fields of the request have failed the validation procedure. - * 401 Please make sure the Authorization Header is set and uses correct credentials - + * 409 The request conflicts with the current state of the resource. - * 500 Please retry again later or contact support if the issue persists - * */ @@ -1208,6 +1227,7 @@ public ApiResponse deleteResourcePoolWithHttpInfo( * 200 OK - * 400 Some fields of the request have failed the validation procedure. - * 401 Please make sure the Authorization Header is set and uses correct credentials - + * 409 The request conflicts with the current state of the resource. - * 500 Please retry again later or contact support if the issue persists - * */ @@ -1242,6 +1262,7 @@ public okhttp3.Call deleteResourcePoolAsync( * 200 OK - * 400 Some fields of the request have failed the validation procedure. - * 401 Please make sure the Authorization Header is set and uses correct credentials - + * 409 The request conflicts with the current state of the resource. - * 500 Please retry again later or contact support if the issue persists - * */ @@ -1372,6 +1393,7 @@ private okhttp3.Call deleteResourcePoolSnapshotValidateBeforeCall( * 200 OK - * 400 Some fields of the request have failed the validation procedure. - * 401 Please make sure the Authorization Header is set and uses correct credentials - + * 409 The request conflicts with the current state of the resource. - * 500 Please retry again later or contact support if the issue persists - * */ @@ -1404,6 +1426,7 @@ public Object deleteResourcePoolSnapshot( * 200 OK - * 400 Some fields of the request have failed the validation procedure. - * 401 Please make sure the Authorization Header is set and uses correct credentials - + * 409 The request conflicts with the current state of the resource. - * 500 Please retry again later or contact support if the issue persists - * */ @@ -1439,6 +1462,7 @@ public ApiResponse deleteResourcePoolSnapshotWithHttpInfo( * 200 OK - * 400 Some fields of the request have failed the validation procedure. - * 401 Please make sure the Authorization Header is set and uses correct credentials - + * 409 The request conflicts with the current state of the resource. - * 500 Please retry again later or contact support if the issue persists - * */ @@ -3917,6 +3941,7 @@ public okhttp3.Call listSnapshotSchedulesAsync( * 200 OK - * 400 Some fields of the request have failed the validation procedure. - * 401 Please make sure the Authorization Header is set and uses correct credentials - + * 409 The request conflicts with the current state of the resource. - * 500 Please retry again later or contact support if the issue persists - * */ @@ -4044,6 +4069,7 @@ private okhttp3.Call updateResourcePoolValidateBeforeCall( * 200 OK - * 400 Some fields of the request have failed the validation procedure. - * 401 Please make sure the Authorization Header is set and uses correct credentials - + * 409 The request conflicts with the current state of the resource. - * 500 Please retry again later or contact support if the issue persists - * */ @@ -4076,6 +4102,7 @@ public UpdateResourcePoolResponse updateResourcePool( * 200 OK - * 400 Some fields of the request have failed the validation procedure. - * 401 Please make sure the Authorization Header is set and uses correct credentials - + * 409 The request conflicts with the current state of the resource. - * 500 Please retry again later or contact support if the issue persists - * */ @@ -4110,6 +4137,7 @@ public ApiResponse updateResourcePoolWithHttpInfo( * 200 OK - * 400 Some fields of the request have failed the validation procedure. - * 401 Please make sure the Authorization Header is set and uses correct credentials - + * 409 The request conflicts with the current state of the resource. - * 500 Please retry again later or contact support if the issue persists - * */ diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/AbstractOpenApiSchema.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/AbstractOpenApiSchema.java index b7d1ef3a..4a489906 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/AbstractOpenApiSchema.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/ConflictError.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/ConflictError.java new file mode 100644 index 00000000..23efea77 --- /dev/null +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/ConflictError.java @@ -0,0 +1,404 @@ +/* + * STACKIT File Storage (SFS) + * API used to create and manage NFS Shares. + * + * The version of the OpenAPI document: 1beta.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package cloud.stackit.sdk.sfs.v1betaapi.model; + +import cloud.stackit.sdk.sfs.v1betaapi.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; +import com.google.gson.annotations.SerializedName; +import com.google.gson.reflect.TypeToken; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Conflict error response */ +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") +public class ConflictError { + public static final String SERIALIZED_NAME_DETAIL = "detail"; + + @SerializedName(SERIALIZED_NAME_DETAIL) + @javax.annotation.Nonnull + private String detail; + + public static final String SERIALIZED_NAME_ERROR_DESCRIPTION = "error_description"; + + @SerializedName(SERIALIZED_NAME_ERROR_DESCRIPTION) + @javax.annotation.Nonnull + private String errorDescription; + + public static final String SERIALIZED_NAME_STATUS_CODE = "status_code"; + + @SerializedName(SERIALIZED_NAME_STATUS_CODE) + @javax.annotation.Nonnull + private Integer statusCode; + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull + private String type; + + public ConflictError() {} + + public ConflictError detail(@javax.annotation.Nonnull String detail) { + this.detail = detail; + return this; + } + + /** + * Human-readable explanation of the specific problem + * + * @return detail + */ + @javax.annotation.Nonnull + public String getDetail() { + return detail; + } + + public void setDetail(@javax.annotation.Nonnull String detail) { + this.detail = detail; + } + + public ConflictError errorDescription(@javax.annotation.Nonnull String errorDescription) { + this.errorDescription = errorDescription; + return this; + } + + /** + * Human-readable string of the error that occurred + * + * @return errorDescription + */ + @javax.annotation.Nonnull + public String getErrorDescription() { + return errorDescription; + } + + public void setErrorDescription(@javax.annotation.Nonnull String errorDescription) { + this.errorDescription = errorDescription; + } + + public ConflictError statusCode(@javax.annotation.Nonnull Integer statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * The HTTP status code + * + * @return statusCode + */ + @javax.annotation.Nonnull + public Integer getStatusCode() { + return statusCode; + } + + public void setStatusCode(@javax.annotation.Nonnull Integer statusCode) { + this.statusCode = statusCode; + } + + public ConflictError type(@javax.annotation.Nonnull String type) { + this.type = type; + return this; + } + + /** + * URI Uniquely identifies the error type. It will be in the format of + * storage.stackit.cloud/<error-type> e.g. storage.stackit.cloud/conflict + * + * @return type + */ + @javax.annotation.Nonnull + public String getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull String type) { + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the ConflictError instance itself + */ + public ConflictError putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ConflictError conflictError = (ConflictError) o; + return Objects.equals(this.detail, conflictError.detail) + && Objects.equals(this.errorDescription, conflictError.errorDescription) + && Objects.equals(this.statusCode, conflictError.statusCode) + && Objects.equals(this.type, conflictError.type) + && Objects.equals(this.additionalProperties, conflictError.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(detail, errorDescription, statusCode, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ConflictError {\n"); + sb.append(" detail: ").append(toIndentedString(detail)).append("\n"); + sb.append(" errorDescription: ").append(toIndentedString(errorDescription)).append("\n"); + sb.append(" statusCode: ").append(toIndentedString(statusCode)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces (except the first + * line). + */ + private String toIndentedString(Object o) { + return o == null ? "null" : o.toString().replace("\n", "\n "); + } + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = + new HashSet( + Arrays.asList("detail", "error_description", "status_code", "type")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = + new HashSet( + Arrays.asList("detail", "error_description", "status_code", "type")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to ConflictError + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ConflictError.openapiRequiredFields + .isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "The required field(s) %s in ConflictError is not found in the empty JSON string", + ConflictError.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ConflictError.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "The required field `%s` is not found in the JSON string: %s", + requiredField, + jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("detail").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `detail` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("detail").toString())); + } + if (!jsonObj.get("error_description").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `error_description` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("error_description").toString())); + } + if (!jsonObj.get("type").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `type` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("type").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ConflictError.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ConflictError' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ConflictError.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ConflictError value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : + value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty( + entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + 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()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public ConflictError read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ConflictError instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty( + entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty( + entry.getKey(), + entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "The field `%s` has unknown primitive type. Value: %s", + entry.getKey(), + entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty( + entry.getKey(), + gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + }.nullSafe(); + } + } + + /** + * Create an instance of ConflictError given an JSON string + * + * @param jsonString JSON string + * @return An instance of ConflictError + * @throws IOException if the JSON string is invalid with respect to ConflictError + */ + public static ConflictError fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ConflictError.class); + } + + /** + * Convert an instance of ConflictError to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/CreateResourcePoolPayload.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/CreateResourcePoolPayload.java index 46692a78..e627cf18 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/CreateResourcePoolPayload.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/CreateResourcePoolPayload.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.v1betaapi.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; /** CreateResourcePoolPayload */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class CreateResourcePoolPayload { public static final String SERIALIZED_NAME_AVAILABILITY_ZONE = "availabilityZone"; @@ -137,9 +138,7 @@ public CreateResourcePoolPayload putLabelsItem(String key, String labelsItem) { } /** - * An optional object that represents the labels associated with the resource pool keys are - * validated using the following regex '^[\\\\p{Ll}][\\\\p{Ll}\\\\p{N}_-]*$' and cannot - * be empty values are validated using the following regex '^[\\\\p{Ll}\\\\p{N}_-]*$' + * An optional object that represents the labels associated with the resource pool. * * @return labels */ @@ -358,10 +357,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; @@ -484,7 +480,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/CreateResourcePoolResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/CreateResourcePoolResponse.java index 81971283..3721f040 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/CreateResourcePoolResponse.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/CreateResourcePoolResponse.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.v1betaapi.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; /** CreateResourcePoolResponse */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class CreateResourcePoolResponse { public static final String SERIALIZED_NAME_RESOURCE_POOL = "resourcePool"; @@ -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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/CreateResourcePoolSnapshotPayload.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/CreateResourcePoolSnapshotPayload.java index 7a7f9e97..bf18eb4e 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/CreateResourcePoolSnapshotPayload.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/CreateResourcePoolSnapshotPayload.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.v1betaapi.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 org.openapitools.jackson.nullable.JsonNullable; /** CreateResourcePoolSnapshotPayload */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class CreateResourcePoolSnapshotPayload { public static final String SERIALIZED_NAME_COMMENT = "comment"; @@ -182,10 +183,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/CreateResourcePoolSnapshotResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/CreateResourcePoolSnapshotResponse.java index 0832fa9c..868c391b 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/CreateResourcePoolSnapshotResponse.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/CreateResourcePoolSnapshotResponse.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.v1betaapi.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; /** CreateResourcePoolSnapshotResponse */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class CreateResourcePoolSnapshotResponse { public static final String SERIALIZED_NAME_RESOURCE_POOL_SNAPSHOT = "resourcePoolSnapshot"; @@ -146,10 +147,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; @@ -225,7 +223,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/CreateShareExportPolicyPayload.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/CreateShareExportPolicyPayload.java index b3522dfb..25310636 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/CreateShareExportPolicyPayload.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/CreateShareExportPolicyPayload.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; /** CreateShareExportPolicyPayload */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class CreateShareExportPolicyPayload { public static final String SERIALIZED_NAME_LABELS = "labels"; @@ -67,10 +68,7 @@ public CreateShareExportPolicyPayload putLabelsItem(String key, String labelsIte } /** - * An optional object that represents the labels associated with the share export policy keys - * are validated using the following regex '^[\\\\p{Ll}][\\\\p{Ll}\\\\p{N}_-]*$' and - * cannot be empty values are validated using the following regex - * '^[\\\\p{Ll}\\\\p{N}_-]*$' + * An optional object that represents the labels associated with the share export policy. * * @return labels */ @@ -216,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; @@ -316,7 +311,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/CreateShareExportPolicyRequestRule.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/CreateShareExportPolicyRequestRule.java index c2c3c190..9bbc1c48 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/CreateShareExportPolicyRequestRule.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/CreateShareExportPolicyRequestRule.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.v1betaapi.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 org.openapitools.jackson.nullable.JsonNullable; /** CreateShareExportPolicyRequestRule */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class CreateShareExportPolicyRequestRule { public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @@ -299,10 +300,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; @@ -399,7 +397,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/CreateShareExportPolicyResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/CreateShareExportPolicyResponse.java index 8a8f9b23..ff1b9682 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/CreateShareExportPolicyResponse.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/CreateShareExportPolicyResponse.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.v1betaapi.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; /** CreateShareExportPolicyResponse */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class CreateShareExportPolicyResponse { public static final String SERIALIZED_NAME_SHARE_EXPORT_POLICY = "shareExportPolicy"; @@ -145,10 +146,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; @@ -223,7 +221,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/CreateSharePayload.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/CreateSharePayload.java index 9994735d..0c5da015 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/CreateSharePayload.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/CreateSharePayload.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.v1betaapi.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 org.openapitools.jackson.nullable.JsonNullable; /** CreateSharePayload */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class CreateSharePayload { public static final String SERIALIZED_NAME_EXPORT_POLICY_NAME = "exportPolicyName"; @@ -91,9 +92,7 @@ public CreateSharePayload putLabelsItem(String key, String labelsItem) { } /** - * An optional object that represents the labels associated with the share keys are validated - * using the following regex '^[\\\\p{Ll}][\\\\p{Ll}\\\\p{N}_-]*$' and cannot be empty - * values are validated using the following regex '^[\\\\p{Ll}\\\\p{N}_-]*$' + * An optional object that represents the labels associated with the share. * * @return labels */ @@ -250,10 +249,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 +336,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/CreateShareResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/CreateShareResponse.java index 1d0ee28e..7a2ecae1 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/CreateShareResponse.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/CreateShareResponse.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.v1betaapi.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; /** CreateShareResponse */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class CreateShareResponse { public static final String SERIALIZED_NAME_SHARE = "share"; @@ -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; @@ -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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/Error.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/Error.java index efd62887..6483fcac 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/Error.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/Error.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.v1betaapi.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 org.openapitools.jackson.nullable.JsonNullable; /** Error */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class Error { public static final String SERIALIZED_NAME_ERROR_DESCRIPTION = "error_description"; @@ -214,10 +215,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; @@ -309,7 +307,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/GetResourcePoolResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/GetResourcePoolResponse.java index a73597b5..f38ab1d3 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/GetResourcePoolResponse.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/GetResourcePoolResponse.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.v1betaapi.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; /** GetResourcePoolResponse */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class GetResourcePoolResponse { public static final String SERIALIZED_NAME_RESOURCE_POOL = "resourcePool"; @@ -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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/GetResourcePoolSnapshotResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/GetResourcePoolSnapshotResponse.java index 1fbfa064..44e573fd 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/GetResourcePoolSnapshotResponse.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/GetResourcePoolSnapshotResponse.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.v1betaapi.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; /** GetResourcePoolSnapshotResponse */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class GetResourcePoolSnapshotResponse { public static final String SERIALIZED_NAME_RESOURCE_POOL_SNAPSHOT = "resourcePoolSnapshot"; @@ -146,10 +147,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; @@ -224,7 +222,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/GetShareExportPolicyResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/GetShareExportPolicyResponse.java index 1a49eacb..c482c285 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/GetShareExportPolicyResponse.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/GetShareExportPolicyResponse.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.v1betaapi.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; /** GetShareExportPolicyResponse */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class GetShareExportPolicyResponse { public static final String SERIALIZED_NAME_SHARE_EXPORT_POLICY = "shareExportPolicy"; @@ -145,10 +146,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; @@ -223,7 +221,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/GetShareResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/GetShareResponse.java index 33491655..cec94c5c 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/GetShareResponse.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/GetShareResponse.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.v1betaapi.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; /** GetShareResponse */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class GetShareResponse { public static final String SERIALIZED_NAME_SHARE = "share"; @@ -137,10 +138,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; @@ -211,7 +209,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/GoogleProtobufAny.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/GoogleProtobufAny.java index 03994270..970b1996 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/GoogleProtobufAny.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/GoogleProtobufAny.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.v1betaapi.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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/ListPerformanceClassesResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/ListPerformanceClassesResponse.java index 0945701b..08654046 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/ListPerformanceClassesResponse.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/ListPerformanceClassesResponse.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; /** ListPerformanceClassesResponse */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class ListPerformanceClassesResponse { public static final String SERIALIZED_NAME_PERFORMANCE_CLASSES = "performanceClasses"; @@ -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; @@ -249,7 +247,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/ListResourcePoolSnapshotsResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/ListResourcePoolSnapshotsResponse.java index 9a940bdb..c30248be 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/ListResourcePoolSnapshotsResponse.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/ListResourcePoolSnapshotsResponse.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; /** ListResourcePoolSnapshotsResponse */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class ListResourcePoolSnapshotsResponse { public static final String SERIALIZED_NAME_RESOURCE_POOL_SNAPSHOTS = "resourcePoolSnapshots"; @@ -157,10 +158,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/ListResourcePoolsResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/ListResourcePoolsResponse.java index ede788b2..be41fef6 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/ListResourcePoolsResponse.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/ListResourcePoolsResponse.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; /** ListResourcePoolsResponse */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class ListResourcePoolsResponse { public static final String SERIALIZED_NAME_RESOURCE_POOLS = "resourcePools"; @@ -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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/ListShareExportPoliciesResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/ListShareExportPoliciesResponse.java index 8bd69d8b..f96f6182 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/ListShareExportPoliciesResponse.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/ListShareExportPoliciesResponse.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; /** ListShareExportPoliciesResponse */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class ListShareExportPoliciesResponse { public static final String SERIALIZED_NAME_SHARE_EXPORT_POLICIES = "shareExportPolicies"; @@ -157,10 +158,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/ListSharesResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/ListSharesResponse.java index 0bb63e0f..38540d8f 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/ListSharesResponse.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/ListSharesResponse.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; /** ListSharesResponse */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class ListSharesResponse { public static final String SERIALIZED_NAME_SHARES = "shares"; @@ -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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/ListSnapshotSchedulesResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/ListSnapshotSchedulesResponse.java index 66012673..07bf3755 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/ListSnapshotSchedulesResponse.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/ListSnapshotSchedulesResponse.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; /** ListSnapshotSchedulesResponse */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class ListSnapshotSchedulesResponse { public static final String SERIALIZED_NAME_SNAPSHOT_SCHEDULES = "snapshotSchedules"; @@ -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; @@ -249,7 +247,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/PerformanceClass.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/PerformanceClass.java index ae324786..2d5695bc 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/PerformanceClass.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/PerformanceClass.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.v1betaapi.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; /** PerformanceClass */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class PerformanceClass { public static final String SERIALIZED_NAME_IOPS = "iops"; @@ -187,10 +188,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; @@ -265,7 +263,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/ResourcePool.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/ResourcePool.java index 93bab8f3..de00e030 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/ResourcePool.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/ResourcePool.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.v1betaapi.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.Objects; /** ResourcePool */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class ResourcePool { public static final String SERIALIZED_NAME_AVAILABILITY_ZONE = "availabilityZone"; @@ -542,10 +543,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; @@ -693,7 +691,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/ResourcePoolPerformanceClass.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/ResourcePoolPerformanceClass.java index 2abc256a..ecd9238b 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/ResourcePoolPerformanceClass.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/ResourcePoolPerformanceClass.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.v1betaapi.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; /** ResourcePoolPerformanceClass */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class ResourcePoolPerformanceClass { public static final String SERIALIZED_NAME_NAME = "name"; @@ -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; @@ -271,7 +269,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/ResourcePoolSnapshot.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/ResourcePoolSnapshot.java index a6ca8d49..d2bc37ae 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/ResourcePoolSnapshot.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/ResourcePoolSnapshot.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.v1betaapi.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 org.openapitools.jackson.nullable.JsonNullable; /** ResourcePoolSnapshot */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class ResourcePoolSnapshot { public static final String SERIALIZED_NAME_COMMENT = "comment"; @@ -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; @@ -396,7 +394,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/ResourcePoolSpace.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/ResourcePoolSpace.java index 5e6c0286..119034f5 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/ResourcePoolSpace.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/ResourcePoolSpace.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.v1betaapi.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 org.openapitools.jackson.nullable.JsonNullable; /** ResourcePoolSpace */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class ResourcePoolSpace { public static final String SERIALIZED_NAME_AVAILABLE_GIGABYTES = "availableGigabytes"; @@ -209,10 +210,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; @@ -281,7 +279,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/Share.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/Share.java index 05b2dc16..fd9bf672 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/Share.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/Share.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.v1betaapi.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 org.openapitools.jackson.nullable.JsonNullable; /** Share */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class Share { public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; @@ -148,9 +149,7 @@ public Share putLabelsItem(String key, String labelsItem) { } /** - * An optional object that represents the labels associated with the share keys are validated - * using the following regex '^[\\\\p{Ll}][\\\\p{Ll}\\\\p{N}_-]*$' and cannot be empty - * values are validated using the following regex '^[\\\\p{Ll}\\\\p{N}_-]*$' + * An optional object that represents the labels associated with the share. * * @return labels */ @@ -358,10 +357,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; @@ -473,7 +469,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/ShareExportPolicy.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/ShareExportPolicy.java index e255f60c..33211243 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/ShareExportPolicy.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/ShareExportPolicy.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; /** ShareExportPolicy */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class ShareExportPolicy { public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; @@ -119,10 +120,7 @@ public ShareExportPolicy putLabelsItem(String key, String labelsItem) { } /** - * An optional object that represents the labels associated with the share export policy keys - * are validated using the following regex '^[\\\\p{Ll}][\\\\p{Ll}\\\\p{N}_-]*$' and - * cannot be empty values are validated using the following regex - * '^[\\\\p{Ll}\\\\p{N}_-]*$' + * An optional object that represents the labels associated with the share export policy. * * @return labels */ @@ -293,10 +291,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; @@ -406,7 +401,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/ShareExportPolicyRule.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/ShareExportPolicyRule.java index 42ab14d3..6a3d0ecc 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/ShareExportPolicyRule.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/ShareExportPolicyRule.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.v1betaapi.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 @@ import org.openapitools.jackson.nullable.JsonNullable; /** ShareExportPolicyRule */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class ShareExportPolicyRule { public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; @@ -353,10 +354,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; @@ -459,7 +457,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/SnapshotSchedule.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/SnapshotSchedule.java index 212ac6f4..b0530e5b 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/SnapshotSchedule.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/SnapshotSchedule.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.v1betaapi.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; /** SnapshotSchedule */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class SnapshotSchedule { public static final String SERIALIZED_NAME_CRON = "cron"; @@ -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; @@ -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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/Status.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/Status.java index 519d6972..4201d0cd 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/Status.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/Status.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.v1betaapi.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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/UpdateResourcePoolPayload.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/UpdateResourcePoolPayload.java index ba7c1e98..345268ae 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/UpdateResourcePoolPayload.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/UpdateResourcePoolPayload.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.v1betaapi.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 org.openapitools.jackson.nullable.JsonNullable; /** UpdateResourcePoolPayload */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class UpdateResourcePoolPayload { public static final String SERIALIZED_NAME_IP_ACL = "ipAcl"; @@ -109,9 +110,7 @@ public UpdateResourcePoolPayload putLabelsItem(String key, String labelsItem) { } /** - * An optional object that represents the labels associated with the resource pool keys are - * validated using the following regex '^[\\\\p{Ll}][\\\\p{Ll}\\\\p{N}_-]*$' and cannot - * be empty values are validated using the following regex '^[\\\\p{Ll}\\\\p{N}_-]*$' + * An optional object that represents the labels associated with the resource pool. * * @return labels */ @@ -323,10 +322,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; @@ -430,7 +426,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/UpdateResourcePoolResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/UpdateResourcePoolResponse.java index 100bf5a8..ee3a684b 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/UpdateResourcePoolResponse.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/UpdateResourcePoolResponse.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.v1betaapi.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; /** UpdateResourcePoolResponse */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class UpdateResourcePoolResponse { public static final String SERIALIZED_NAME_RESOURCE_POOL = "resourcePool"; @@ -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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/UpdateShareExportPolicyBodyRule.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/UpdateShareExportPolicyBodyRule.java index 5f137a7e..57c8e164 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/UpdateShareExportPolicyBodyRule.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/UpdateShareExportPolicyBodyRule.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.v1betaapi.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 org.openapitools.jackson.nullable.JsonNullable; /** UpdateShareExportPolicyBodyRule */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class UpdateShareExportPolicyBodyRule { public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @@ -297,10 +298,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; @@ -396,7 +394,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/UpdateShareExportPolicyPayload.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/UpdateShareExportPolicyPayload.java index fe37ecf9..d03a02c8 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/UpdateShareExportPolicyPayload.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/UpdateShareExportPolicyPayload.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 org.openapitools.jackson.nullable.JsonNullable; /** UpdateShareExportPolicyPayload */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class UpdateShareExportPolicyPayload { public static final String SERIALIZED_NAME_LABELS = "labels"; @@ -63,10 +64,7 @@ public UpdateShareExportPolicyPayload putLabelsItem(String key, String labelsIte } /** - * An optional object that represents the labels associated with the share export policy keys - * are validated using the following regex '^[\\\\p{Ll}][\\\\p{Ll}\\\\p{N}_-]*$' and - * cannot be empty values are validated using the following regex - * '^[\\\\p{Ll}\\\\p{N}_-]*$' + * An optional object that represents the labels associated with the share export policy. * * @return labels */ @@ -210,10 +208,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; @@ -302,7 +297,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/UpdateShareExportPolicyResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/UpdateShareExportPolicyResponse.java index 42b4d114..2cd5413f 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/UpdateShareExportPolicyResponse.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/UpdateShareExportPolicyResponse.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.v1betaapi.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; /** UpdateShareExportPolicyResponse */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class UpdateShareExportPolicyResponse { public static final String SERIALIZED_NAME_SHARE_EXPORT_POLICY = "shareExportPolicy"; @@ -145,10 +146,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; @@ -223,7 +221,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/UpdateSharePayload.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/UpdateSharePayload.java index 1d31ce91..3c5a8714 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/UpdateSharePayload.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/UpdateSharePayload.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.v1betaapi.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 org.openapitools.jackson.nullable.JsonNullable; /** UpdateSharePayload */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class UpdateSharePayload { public static final String SERIALIZED_NAME_EXPORT_POLICY_NAME = "exportPolicyName"; @@ -87,9 +88,7 @@ public UpdateSharePayload putLabelsItem(String key, String labelsItem) { } /** - * An optional object that represents the labels associated with the share keys are validated - * using the following regex '^[\\\\p{Ll}][\\\\p{Ll}\\\\p{N}_-]*$' and cannot be empty - * values are validated using the following regex '^[\\\\p{Ll}\\\\p{N}_-]*$' + * An optional object that represents the labels associated with the share. * * @return labels */ @@ -226,10 +225,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; @@ -307,7 +303,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/UpdateShareResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/UpdateShareResponse.java index 853bc43e..cfbcc8c7 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/UpdateShareResponse.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/UpdateShareResponse.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.v1betaapi.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; /** UpdateShareResponse */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class UpdateShareResponse { public static final String SERIALIZED_NAME_SHARE = "share"; @@ -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; @@ -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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/ValidationError.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/ValidationError.java index 898c663e..c9c52668 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/ValidationError.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/ValidationError.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 org.openapitools.jackson.nullable.JsonNullable; /** ValidationError */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class ValidationError { public static final String SERIALIZED_NAME_ERROR_DESCRIPTION = "error_description"; @@ -251,10 +252,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; @@ -313,21 +311,20 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); } - // ensure the json data is an array - if (!jsonObj.get("fields").isJsonArray()) { - throw new IllegalArgumentException( - String.format( - java.util.Locale.ROOT, - "Expected the field `fields` to be an array in the JSON string but got `%s`", - jsonObj.get("fields").toString())); - } - - JsonArray jsonArrayfields = jsonObj.getAsJsonArray("fields"); - // validate the required field `fields` (array) - for (int i = 0; i < jsonArrayfields.size(); i++) { - ValidationErrorField.validateJsonElement(jsonArrayfields.get(i)); + if (jsonObj.get("fields") != null) { + if (!jsonObj.get("fields").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `fields` to be an array in the JSON string but got `%s`", + jsonObj.get("fields").toString())); + } + JsonArray jsonArrayfields = jsonObj.getAsJsonArray("fields"); + // validate the required field `fields` (array) + for (int i = 0; i < jsonArrayfields.size(); i++) { + ValidationErrorField.validateJsonElement(jsonArrayfields.get(i)); + } } - ; } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @@ -363,7 +360,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/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/ValidationErrorField.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/ValidationErrorField.java index 135d054b..534b0418 100644 --- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/ValidationErrorField.java +++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/ValidationErrorField.java @@ -15,6 +15,7 @@ import cloud.stackit.sdk.sfs.v1betaapi.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; /** ValidationErrorField */ -@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0") public class ValidationErrorField { public static final String SERIALIZED_NAME_FIELD = "field"; @@ -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; @@ -263,7 +261,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());