Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## Release (2026-MM-DD)

- `resourcemanager`:
- [v0.7.0](services/resourcemanager/CHANGELOG.md#v070)
- **Dependencies:** Bump `org.openapitools:jackson-databind-nullable` from `0.2.8` to `0.2.12`
- **Feature:** The `members` attribute in the `CreateProjectPayload` model class is now optional (previously required) and therefore changed from `@javax.annotation.Nonnull` to `@javax.annotation.Nullable`

## Release (2026-10-16)

- `alb`: [v0.7.0](services/alb/CHANGELOG.md#v070)
Expand Down
4 changes: 4 additions & 0 deletions services/resourcemanager/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## v0.7.0
- **Dependencies:** Bump `org.openapitools:jackson-databind-nullable` from `0.2.8` to `0.2.12`
- **Feature:** The `members` attribute in the `CreateProjectPayload` model class is now optional (previously required) and therefore changed from `@javax.annotation.Nonnull` to `@javax.annotation.Nullable`

## v0.6.1
- `v0api`:
- Updated javadoc comments regarding labels of model classes
Expand Down
2 changes: 1 addition & 1 deletion services/resourcemanager/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.6.1
0.7.0
2 changes: 1 addition & 1 deletion services/resourcemanager/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion services/resourcemanager/oas_commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7a688091c603097448c818da2fd8386f3b02a6d8
3d55d58fe8607afa4f894077e1e5c0a19ef57b3f
Original file line number Diff line number Diff line change
Expand Up @@ -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.resourcemanager.v0api.ApiClient} object
*/
public ApiClient setLocalDateTimeFormat(DateTimeFormatter dateFormat) {
JSON.setLocalDateTimeFormat(dateFormat);
return this;
}

/**
* Set LenientOnJson.
*
Expand Down Expand Up @@ -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.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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")
Expand Down Expand Up @@ -94,6 +98,7 @@ private static Class getClassByDiscriminator(
gsonBuilder.registerTypeAdapter(java.sql.Date.class, sqlDateTypeAdapter);
gsonBuilder.registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter);
gsonBuilder.registerTypeAdapter(LocalDate.class, localDateTypeAdapter);
gsonBuilder.registerTypeAdapter(LocalDateTime.class, localDateTimeTypeAdapter);
gsonBuilder.registerTypeAdapter(byte[].class, byteArrayAdapter);
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.resourcemanager.v0api.model.CreateFolderPayload
Expand Down Expand Up @@ -349,6 +354,53 @@ public LocalDate read(JsonReader in) throws IOException {
}
}

/** Gson TypeAdapter for JSR310 LocalDateTime type */
public static class LocalDateTimeTypeAdapter extends TypeAdapter<LocalDateTime> {

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);
}
Expand All @@ -357,6 +409,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).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

package cloud.stackit.sdk.resourcemanager.v0api;

@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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -34,7 +35,7 @@
import java.util.Set;

/** CreateFolderPayload */
@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0")
@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.26.0")
public class CreateFolderPayload {
public static final String SERIALIZED_NAME_CONTAINER_PARENT_ID = "containerParentId";

Expand Down Expand Up @@ -67,8 +68,7 @@ public CreateFolderPayload containerParentId(
}

/**
* Identifier of the parent resource container - containerId as well as UUID identifier is
* supported.
* Identifier of the parent resource container
*
* @return containerParentId
*/
Expand All @@ -95,17 +95,20 @@ public CreateFolderPayload putLabelsItem(String key, String labelsItem) {
}

/**
* Key-value string pairs attached to an existing resource container. Certain labels may be
* enforced via organizational policies. * **Key:** Must be between 1 and 63 characters long
* Key-value string pairs attached to a resource container during creation. Certain labels may
* be enforced via organizational policies. * **Key:** Must be between 1 and 63 characters long
* (excluding an optional domain prefix). Must start and end with an alphanumeric character
* &#x60;[a-zA-Z0-9]&#x60; and can contain alphanumerics, dashes (-), underscores (_), and dots
* (.). May include an optional domain prefix up to 250 characters (a lowercase DNS subdomain
* containing &#x60;[a-z0-9]&#x60;, &#x60;-&#x60;, and &#x60;.&#x60;) followed by a slash (/).
* Total maximum key length is 314 characters. * **Value:** Must be 63 characters or less. May
* be empty (\&quot;\&quot;). If non-empty, must start and end with an alphanumeric character
* &#x60;[a-zA-Z0-9]&#x60; and can contain alphanumerics, dashes (-), underscores (_), and dots
* (.). &gt; Note: Additional naming restrictions may apply depending on your specific
* organization.*
* (.). * Either a &#x60;\&quot;scope\&quot;: \&quot;PUBLIC\&quot;&#x60; label or a valid
* &#x60;networkArea&#x60; label must be provided for project creation. * To create a project
* within a STACKIT Network Area, you must set the label &#x60;\&quot;networkArea\&quot;:
* \&quot;&lt;networkAreaID&gt;\&quot;&#x60;. &gt; **Important:** The &#x60;networkArea&#x60;
* label is immutable and **cannot be changed** after project creation.
*
* @return labels
*/
Expand All @@ -131,8 +134,7 @@ public CreateFolderPayload addMembersItem(Member membersItem) {
}

/**
* The initial members assigned to the project. At least one subject needs to be a user, and not
* a client or service account.
* The initial members assigned to the folder.
*
* @return members
*/
Expand All @@ -150,8 +152,8 @@ public CreateFolderPayload name(@javax.annotation.Nonnull String name) {
}

/**
* The name of the folder matching the regex &#x60;^[a-zA-ZäüöÄÜÖ0-9](
* ?[a-zA-ZäüöÄÜÖß0-9_+&amp;-]){0,39}$&#x60;.
* Folder name matching the regex &#x60;^[a-zA-ZäüöÄÜÖ0-9](
* ?[a-zA-ZäüöÄÜÖß0-9_+&amp;-]){1,40}$&#x60;.
*
* @return name
*/
Expand Down Expand Up @@ -252,10 +254,7 @@ public String toString() {
* line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
return o == null ? "null" : o.toString().replace("\n", "\n ");
}

public static HashSet<String> openapiFields;
Expand Down Expand Up @@ -369,7 +368,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());
Expand Down
Loading
Loading