diff --git a/services/iaas/oas_commit b/services/iaas/oas_commit index c0a0c9b8..16ab3e1f 100644 --- a/services/iaas/oas_commit +++ b/services/iaas/oas_commit @@ -1 +1 @@ -43a874547d9e5b23655d0f351c47b32b46d4a19e +20c75d1fe743052968e3837f1eb1cf9fc84f40cd diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/Backup.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/Backup.java index 41619f84..f9fe2ad5 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/Backup.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/Backup.java @@ -179,11 +179,21 @@ public Backup labels(@javax.annotation.Nullable Object labels) { } /** - * Object that represents the labels of an object. Regex for keys: - * `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: - * `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a - * `null` value for a key will remove that key. The `stackit-` prefix is - * reserved and cannot be used for Keys. + * Object that represents the labels as key-value pairs of a resource. Key constraints: - May + * contain an optional domain prefix separated by a slash (`/`). - Domain prefix must + * be less than or equal to 250 characters. - Domain prefix must ba a valid DNS subdomain + * containing only lowercase alphanumerics (`[a-z0-9]`) and dashes (`-`), + * separated by dots (`.`). - Length (excluding the domain prefix) must be between 1 + * and 63 characters. - Must begin and end with an alphanumerical character + * (`[a-z0-9A-Z]`). - May contain dashes (`-`), underscores (`_`), + * dots (`.`), and alphanumerics in between. - Keys starting with the prefix + * `stackit-` or having a domain prefix of `stackit.cloud` (including its + * subdomains, e.g., `*.stackit.cloud/`) are reserved for system use. Value + * constraints: - Must be less than or equal to 63 characters long (can be empty). - If not + * empty it must begin and end with an alphanumeric character (`[a-z0-9A-Z]`). - May + * contain dashes (`-`), underscores (`_`), dots (`.`), and + * alphanumerics in between. A resource can have a maximum of 64 labels. Reserved labels are + * excluded from this count. Providing a `null` value for a key will remove that key. * * @return labels */ diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/CreateBackupPayload.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/CreateBackupPayload.java index 6d3e541b..ee9450e9 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/CreateBackupPayload.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/CreateBackupPayload.java @@ -80,11 +80,21 @@ public CreateBackupPayload labels(@javax.annotation.Nullable Object labels) { } /** - * Object that represents the labels of an object. Regex for keys: - * `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: - * `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a - * `null` value for a key will remove that key. The `stackit-` prefix is - * reserved and cannot be used for Keys. + * Object that represents the labels as key-value pairs of a resource. Key constraints: - May + * contain an optional domain prefix separated by a slash (`/`). - Domain prefix must + * be less than or equal to 250 characters. - Domain prefix must ba a valid DNS subdomain + * containing only lowercase alphanumerics (`[a-z0-9]`) and dashes (`-`), + * separated by dots (`.`). - Length (excluding the domain prefix) must be between 1 + * and 63 characters. - Must begin and end with an alphanumerical character + * (`[a-z0-9A-Z]`). - May contain dashes (`-`), underscores (`_`), + * dots (`.`), and alphanumerics in between. - Keys starting with the prefix + * `stackit-` or having a domain prefix of `stackit.cloud` (including its + * subdomains, e.g., `*.stackit.cloud/`) are reserved for system use. Value + * constraints: - Must be less than or equal to 63 characters long (can be empty). - If not + * empty it must begin and end with an alphanumeric character (`[a-z0-9A-Z]`). - May + * contain dashes (`-`), underscores (`_`), dots (`.`), and + * alphanumerics in between. A resource can have a maximum of 64 labels. Reserved labels are + * excluded from this count. Providing a `null` value for a key will remove that key. * * @return labels */ diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/CreateImagePayload.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/CreateImagePayload.java index 94a5ec4f..da0d19b2 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/CreateImagePayload.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/CreateImagePayload.java @@ -246,11 +246,21 @@ public CreateImagePayload labels(@javax.annotation.Nullable Object labels) { } /** - * Object that represents the labels of an object. Regex for keys: - * `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: - * `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a - * `null` value for a key will remove that key. The `stackit-` prefix is - * reserved and cannot be used for Keys. + * Object that represents the labels as key-value pairs of a resource. Key constraints: - May + * contain an optional domain prefix separated by a slash (`/`). - Domain prefix must + * be less than or equal to 250 characters. - Domain prefix must ba a valid DNS subdomain + * containing only lowercase alphanumerics (`[a-z0-9]`) and dashes (`-`), + * separated by dots (`.`). - Length (excluding the domain prefix) must be between 1 + * and 63 characters. - Must begin and end with an alphanumerical character + * (`[a-z0-9A-Z]`). - May contain dashes (`-`), underscores (`_`), + * dots (`.`), and alphanumerics in between. - Keys starting with the prefix + * `stackit-` or having a domain prefix of `stackit.cloud` (including its + * subdomains, e.g., `*.stackit.cloud/`) are reserved for system use. Value + * constraints: - Must be less than or equal to 63 characters long (can be empty). - If not + * empty it must begin and end with an alphanumeric character (`[a-z0-9A-Z]`). - May + * contain dashes (`-`), underscores (`_`), dots (`.`), and + * alphanumerics in between. A resource can have a maximum of 64 labels. Reserved labels are + * excluded from this count. Providing a `null` value for a key will remove that key. * * @return labels */ diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/CreateKeyPairPayload.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/CreateKeyPairPayload.java index 8060519a..8d41aa27 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/CreateKeyPairPayload.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/CreateKeyPairPayload.java @@ -99,11 +99,21 @@ public CreateKeyPairPayload labels(@javax.annotation.Nullable Object labels) { } /** - * Object that represents the labels of an object. Regex for keys: - * `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: - * `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a - * `null` value for a key will remove that key. The `stackit-` prefix is - * reserved and cannot be used for Keys. + * Object that represents the labels as key-value pairs of a resource. Key constraints: - May + * contain an optional domain prefix separated by a slash (`/`). - Domain prefix must + * be less than or equal to 250 characters. - Domain prefix must ba a valid DNS subdomain + * containing only lowercase alphanumerics (`[a-z0-9]`) and dashes (`-`), + * separated by dots (`.`). - Length (excluding the domain prefix) must be between 1 + * and 63 characters. - Must begin and end with an alphanumerical character + * (`[a-z0-9A-Z]`). - May contain dashes (`-`), underscores (`_`), + * dots (`.`), and alphanumerics in between. - Keys starting with the prefix + * `stackit-` or having a domain prefix of `stackit.cloud` (including its + * subdomains, e.g., `*.stackit.cloud/`) are reserved for system use. Value + * constraints: - Must be less than or equal to 63 characters long (can be empty). - If not + * empty it must begin and end with an alphanumeric character (`[a-z0-9A-Z]`). - May + * contain dashes (`-`), underscores (`_`), dots (`.`), and + * alphanumerics in between. A resource can have a maximum of 64 labels. Reserved labels are + * excluded from this count. Providing a `null` value for a key will remove that key. * * @return labels */ diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/CreateNetworkAreaPayload.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/CreateNetworkAreaPayload.java index 12242de7..03d5de50 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/CreateNetworkAreaPayload.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/CreateNetworkAreaPayload.java @@ -78,11 +78,21 @@ public CreateNetworkAreaPayload labels(@javax.annotation.Nullable Object labels) } /** - * Object that represents the labels of an object. Regex for keys: - * `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: - * `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a - * `null` value for a key will remove that key. The `stackit-` prefix is - * reserved and cannot be used for Keys. + * Object that represents the labels as key-value pairs of a resource. Key constraints: - May + * contain an optional domain prefix separated by a slash (`/`). - Domain prefix must + * be less than or equal to 250 characters. - Domain prefix must ba a valid DNS subdomain + * containing only lowercase alphanumerics (`[a-z0-9]`) and dashes (`-`), + * separated by dots (`.`). - Length (excluding the domain prefix) must be between 1 + * and 63 characters. - Must begin and end with an alphanumerical character + * (`[a-z0-9A-Z]`). - May contain dashes (`-`), underscores (`_`), + * dots (`.`), and alphanumerics in between. - Keys starting with the prefix + * `stackit-` or having a domain prefix of `stackit.cloud` (including its + * subdomains, e.g., `*.stackit.cloud/`) are reserved for system use. Value + * constraints: - Must be less than or equal to 63 characters long (can be empty). - If not + * empty it must begin and end with an alphanumeric character (`[a-z0-9A-Z]`). - May + * contain dashes (`-`), underscores (`_`), dots (`.`), and + * alphanumerics in between. A resource can have a maximum of 64 labels. Reserved labels are + * excluded from this count. Providing a `null` value for a key will remove that key. * * @return labels */ diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/CreateNetworkPayload.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/CreateNetworkPayload.java index 7db3e4a5..fadd5b24 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/CreateNetworkPayload.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/CreateNetworkPayload.java @@ -38,6 +38,11 @@ public class CreateNetworkPayload { @SerializedName(SERIALIZED_NAME_ADDRESS_FAMILY) @javax.annotation.Nullable private CreateNetworkAddressFamily addressFamily; + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable private String description; + public static final String SERIALIZED_NAME_DHCP = "dhcp"; @SerializedName(SERIALIZED_NAME_DHCP) @@ -81,6 +86,24 @@ public void setAddressFamily( this.addressFamily = addressFamily; } + public CreateNetworkPayload description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Description Object. Allows string up to 255 Characters. + * + * @return description + */ + @javax.annotation.Nullable public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + public CreateNetworkPayload dhcp(@javax.annotation.Nullable Boolean dhcp) { this.dhcp = dhcp; return this; @@ -105,11 +128,21 @@ public CreateNetworkPayload labels(@javax.annotation.Nullable Object labels) { } /** - * Object that represents the labels of an object. Regex for keys: - * `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: - * `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a - * `null` value for a key will remove that key. The `stackit-` prefix is - * reserved and cannot be used for Keys. + * Object that represents the labels as key-value pairs of a resource. Key constraints: - May + * contain an optional domain prefix separated by a slash (`/`). - Domain prefix must + * be less than or equal to 250 characters. - Domain prefix must ba a valid DNS subdomain + * containing only lowercase alphanumerics (`[a-z0-9]`) and dashes (`-`), + * separated by dots (`.`). - Length (excluding the domain prefix) must be between 1 + * and 63 characters. - Must begin and end with an alphanumerical character + * (`[a-z0-9A-Z]`). - May contain dashes (`-`), underscores (`_`), + * dots (`.`), and alphanumerics in between. - Keys starting with the prefix + * `stackit-` or having a domain prefix of `stackit.cloud` (including its + * subdomains, e.g., `*.stackit.cloud/`) are reserved for system use. Value + * constraints: - Must be less than or equal to 63 characters long (can be empty). - If not + * empty it must begin and end with an alphanumeric character (`[a-z0-9A-Z]`). - May + * contain dashes (`-`), underscores (`_`), dots (`.`), and + * alphanumerics in between. A resource can have a maximum of 64 labels. Reserved labels are + * excluded from this count. Providing a `null` value for a key will remove that key. * * @return labels */ @@ -212,6 +245,7 @@ public boolean equals(Object o) { } CreateNetworkPayload createNetworkPayload = (CreateNetworkPayload) o; return Objects.equals(this.addressFamily, createNetworkPayload.addressFamily) + && Objects.equals(this.description, createNetworkPayload.description) && Objects.equals(this.dhcp, createNetworkPayload.dhcp) && Objects.equals(this.labels, createNetworkPayload.labels) && Objects.equals(this.name, createNetworkPayload.name) @@ -222,7 +256,8 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(addressFamily, dhcp, labels, name, routed, additionalProperties); + return Objects.hash( + addressFamily, description, dhcp, labels, name, routed, additionalProperties); } @Override @@ -230,6 +265,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CreateNetworkPayload {\n"); sb.append(" addressFamily: ").append(toIndentedString(addressFamily)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" dhcp: ").append(toIndentedString(dhcp)).append("\n"); sb.append(" labels: ").append(toIndentedString(labels)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); @@ -259,7 +295,13 @@ private String toIndentedString(Object o) { // a set of all properties/fields (JSON key names) openapiFields = new HashSet( - Arrays.asList("addressFamily", "dhcp", "labels", "name", "routed")); + Arrays.asList( + "addressFamily", + "description", + "dhcp", + "labels", + "name", + "routed")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("name")); @@ -299,6 +341,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("addressFamily") != null && !jsonObj.get("addressFamily").isJsonNull()) { CreateNetworkAddressFamily.validateJsonElement(jsonObj.get("addressFamily")); } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) + && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `description` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("description").toString())); + } if (!jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException( String.format( diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/CreateNicPayload.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/CreateNicPayload.java index abfde85f..6c4ff1ff 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/CreateNicPayload.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/CreateNicPayload.java @@ -24,6 +24,7 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; @@ -41,6 +42,11 @@ public class CreateNicPayload { @SerializedName(SERIALIZED_NAME_ALLOWED_ADDRESSES) @javax.annotation.Nullable private List allowedAddresses = new ArrayList<>(); + public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; + + @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nullable private OffsetDateTime createdAt; + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) @@ -106,17 +112,31 @@ public class CreateNicPayload { @SerializedName(SERIALIZED_NAME_TYPE) @javax.annotation.Nullable private String type; + public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; + + @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @javax.annotation.Nullable private OffsetDateTime updatedAt; + public CreateNicPayload() {} public CreateNicPayload( - UUID device, UUID id, String mac, UUID networkId, String status, String type) { + OffsetDateTime createdAt, + UUID device, + UUID id, + String mac, + UUID networkId, + String status, + String type, + OffsetDateTime updatedAt) { this(); + this.createdAt = createdAt; this.device = device; this.id = id; this.mac = mac; this.networkId = networkId; this.status = status; this.type = type; + this.updatedAt = updatedAt; } public CreateNicPayload allowedAddresses( @@ -147,6 +167,15 @@ public void setAllowedAddresses( this.allowedAddresses = allowedAddresses; } + /** + * Date-time when resource was created. + * + * @return createdAt + */ + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { + return createdAt; + } + public CreateNicPayload description(@javax.annotation.Nullable String description) { this.description = description; return this; @@ -225,11 +254,21 @@ public CreateNicPayload labels(@javax.annotation.Nullable Object labels) { } /** - * Object that represents the labels of an object. Regex for keys: - * `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: - * `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a - * `null` value for a key will remove that key. The `stackit-` prefix is - * reserved and cannot be used for Keys. + * Object that represents the labels as key-value pairs of a resource. Key constraints: - May + * contain an optional domain prefix separated by a slash (`/`). - Domain prefix must + * be less than or equal to 250 characters. - Domain prefix must ba a valid DNS subdomain + * containing only lowercase alphanumerics (`[a-z0-9]`) and dashes (`-`), + * separated by dots (`.`). - Length (excluding the domain prefix) must be between 1 + * and 63 characters. - Must begin and end with an alphanumerical character + * (`[a-z0-9A-Z]`). - May contain dashes (`-`), underscores (`_`), + * dots (`.`), and alphanumerics in between. - Keys starting with the prefix + * `stackit-` or having a domain prefix of `stackit.cloud` (including its + * subdomains, e.g., `*.stackit.cloud/`) are reserved for system use. Value + * constraints: - Must be less than or equal to 63 characters long (can be empty). - If not + * empty it must begin and end with an alphanumeric character (`[a-z0-9A-Z]`). - May + * contain dashes (`-`), underscores (`_`), dots (`.`), and + * alphanumerics in between. A resource can have a maximum of 64 labels. Reserved labels are + * excluded from this count. Providing a `null` value for a key will remove that key. * * @return labels */ @@ -340,6 +379,15 @@ public void setSecurityGroups(@javax.annotation.Nullable List securityGrou return type; } + /** + * Date-time when resource was last updated. + * + * @return updatedAt + */ + @javax.annotation.Nullable public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -394,6 +442,7 @@ public boolean equals(Object o) { } CreateNicPayload createNicPayload = (CreateNicPayload) o; return Objects.equals(this.allowedAddresses, createNicPayload.allowedAddresses) + && Objects.equals(this.createdAt, createNicPayload.createdAt) && Objects.equals(this.description, createNicPayload.description) && Objects.equals(this.device, createNicPayload.device) && Objects.equals(this.id, createNicPayload.id) @@ -407,6 +456,7 @@ public boolean equals(Object o) { && Objects.equals(this.securityGroups, createNicPayload.securityGroups) && Objects.equals(this.status, createNicPayload.status) && Objects.equals(this.type, createNicPayload.type) + && Objects.equals(this.updatedAt, createNicPayload.updatedAt) && Objects.equals(this.additionalProperties, createNicPayload.additionalProperties); } @@ -414,6 +464,7 @@ public boolean equals(Object o) { public int hashCode() { return Objects.hash( allowedAddresses, + createdAt, description, device, id, @@ -427,6 +478,7 @@ public int hashCode() { securityGroups, status, type, + updatedAt, additionalProperties); } @@ -435,6 +487,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CreateNicPayload {\n"); sb.append(" allowedAddresses: ").append(toIndentedString(allowedAddresses)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" device: ").append(toIndentedString(device)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); @@ -448,6 +501,7 @@ public String toString() { sb.append(" securityGroups: ").append(toIndentedString(securityGroups)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); @@ -475,6 +529,7 @@ private String toIndentedString(Object o) { new HashSet( Arrays.asList( "allowedAddresses", + "createdAt", "description", "device", "id", @@ -487,7 +542,8 @@ private String toIndentedString(Object o) { "nicSecurity", "securityGroups", "status", - "type")); + "type", + "updatedAt")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(0); diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/CreatePublicIPPayload.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/CreatePublicIPPayload.java index 697fa223..aec63b55 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/CreatePublicIPPayload.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/CreatePublicIPPayload.java @@ -23,6 +23,7 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.time.OffsetDateTime; import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; @@ -35,6 +36,11 @@ /** Object that represents a public IP. */ @javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") public class CreatePublicIPPayload { + public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; + + @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nullable private OffsetDateTime createdAt; + public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -55,12 +61,29 @@ public class CreatePublicIPPayload { @SerializedName(SERIALIZED_NAME_NETWORK_INTERFACE) @javax.annotation.Nullable private UUID networkInterface; + public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; + + @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @javax.annotation.Nullable private OffsetDateTime updatedAt; + public CreatePublicIPPayload() {} - public CreatePublicIPPayload(UUID id, String ip) { + public CreatePublicIPPayload( + OffsetDateTime createdAt, UUID id, String ip, OffsetDateTime updatedAt) { this(); + this.createdAt = createdAt; this.id = id; this.ip = ip; + this.updatedAt = updatedAt; + } + + /** + * Date-time when resource was created. + * + * @return createdAt + */ + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { + return createdAt; } /** @@ -87,11 +110,21 @@ public CreatePublicIPPayload labels(@javax.annotation.Nullable Object labels) { } /** - * Object that represents the labels of an object. Regex for keys: - * `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: - * `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a - * `null` value for a key will remove that key. The `stackit-` prefix is - * reserved and cannot be used for Keys. + * Object that represents the labels as key-value pairs of a resource. Key constraints: - May + * contain an optional domain prefix separated by a slash (`/`). - Domain prefix must + * be less than or equal to 250 characters. - Domain prefix must ba a valid DNS subdomain + * containing only lowercase alphanumerics (`[a-z0-9]`) and dashes (`-`), + * separated by dots (`.`). - Length (excluding the domain prefix) must be between 1 + * and 63 characters. - Must begin and end with an alphanumerical character + * (`[a-z0-9A-Z]`). - May contain dashes (`-`), underscores (`_`), + * dots (`.`), and alphanumerics in between. - Keys starting with the prefix + * `stackit-` or having a domain prefix of `stackit.cloud` (including its + * subdomains, e.g., `*.stackit.cloud/`) are reserved for system use. Value + * constraints: - Must be less than or equal to 63 characters long (can be empty). - If not + * empty it must begin and end with an alphanumeric character (`[a-z0-9A-Z]`). - May + * contain dashes (`-`), underscores (`_`), dots (`.`), and + * alphanumerics in between. A resource can have a maximum of 64 labels. Reserved labels are + * excluded from this count. Providing a `null` value for a key will remove that key. * * @return labels */ @@ -122,6 +155,15 @@ public void setNetworkInterface(@javax.annotation.Nullable UUID networkInterface this.networkInterface = networkInterface; } + /** + * Date-time when resource was last updated. + * + * @return updatedAt + */ + @javax.annotation.Nullable public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -175,10 +217,12 @@ public boolean equals(Object o) { return false; } CreatePublicIPPayload createPublicIPPayload = (CreatePublicIPPayload) o; - return Objects.equals(this.id, createPublicIPPayload.id) + return Objects.equals(this.createdAt, createPublicIPPayload.createdAt) + && Objects.equals(this.id, createPublicIPPayload.id) && Objects.equals(this.ip, createPublicIPPayload.ip) && Objects.equals(this.labels, createPublicIPPayload.labels) && Objects.equals(this.networkInterface, createPublicIPPayload.networkInterface) + && Objects.equals(this.updatedAt, createPublicIPPayload.updatedAt) && Objects.equals( this.additionalProperties, createPublicIPPayload.additionalProperties); } @@ -194,7 +238,8 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(id, ip, labels, networkInterface, additionalProperties); + return Objects.hash( + createdAt, id, ip, labels, networkInterface, updatedAt, additionalProperties); } private static int hashCodeNullable(JsonNullable a) { @@ -208,10 +253,12 @@ private static int hashCodeNullable(JsonNullable a) { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CreatePublicIPPayload {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" ip: ").append(toIndentedString(ip)).append("\n"); sb.append(" labels: ").append(toIndentedString(labels)).append("\n"); sb.append(" networkInterface: ").append(toIndentedString(networkInterface)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); @@ -236,7 +283,14 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = - new HashSet(Arrays.asList("id", "ip", "labels", "networkInterface")); + new HashSet( + Arrays.asList( + "createdAt", + "id", + "ip", + "labels", + "networkInterface", + "updatedAt")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(0); diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/CreateSecurityGroupPayload.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/CreateSecurityGroupPayload.java index 662c4778..82b40274 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/CreateSecurityGroupPayload.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/CreateSecurityGroupPayload.java @@ -133,11 +133,21 @@ public CreateSecurityGroupPayload labels(@javax.annotation.Nullable Object label } /** - * Object that represents the labels of an object. Regex for keys: - * `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: - * `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a - * `null` value for a key will remove that key. The `stackit-` prefix is - * reserved and cannot be used for Keys. + * Object that represents the labels as key-value pairs of a resource. Key constraints: - May + * contain an optional domain prefix separated by a slash (`/`). - Domain prefix must + * be less than or equal to 250 characters. - Domain prefix must ba a valid DNS subdomain + * containing only lowercase alphanumerics (`[a-z0-9]`) and dashes (`-`), + * separated by dots (`.`). - Length (excluding the domain prefix) must be between 1 + * and 63 characters. - Must begin and end with an alphanumerical character + * (`[a-z0-9A-Z]`). - May contain dashes (`-`), underscores (`_`), + * dots (`.`), and alphanumerics in between. - Keys starting with the prefix + * `stackit-` or having a domain prefix of `stackit.cloud` (including its + * subdomains, e.g., `*.stackit.cloud/`) are reserved for system use. Value + * constraints: - Must be less than or equal to 63 characters long (can be empty). - If not + * empty it must begin and end with an alphanumeric character (`[a-z0-9A-Z]`). - May + * contain dashes (`-`), underscores (`_`), dots (`.`), and + * alphanumerics in between. A resource can have a maximum of 64 labels. Reserved labels are + * excluded from this count. Providing a `null` value for a key will remove that key. * * @return labels */ diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/CreateServerPayload.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/CreateServerPayload.java index f1248325..b10b7f4f 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/CreateServerPayload.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/CreateServerPayload.java @@ -351,11 +351,21 @@ public CreateServerPayload labels(@javax.annotation.Nullable Object labels) { } /** - * Object that represents the labels of an object. Regex for keys: - * `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: - * `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a - * `null` value for a key will remove that key. The `stackit-` prefix is - * reserved and cannot be used for Keys. + * Object that represents the labels as key-value pairs of a resource. Key constraints: - May + * contain an optional domain prefix separated by a slash (`/`). - Domain prefix must + * be less than or equal to 250 characters. - Domain prefix must ba a valid DNS subdomain + * containing only lowercase alphanumerics (`[a-z0-9]`) and dashes (`-`), + * separated by dots (`.`). - Length (excluding the domain prefix) must be between 1 + * and 63 characters. - Must begin and end with an alphanumerical character + * (`[a-z0-9A-Z]`). - May contain dashes (`-`), underscores (`_`), + * dots (`.`), and alphanumerics in between. - Keys starting with the prefix + * `stackit-` or having a domain prefix of `stackit.cloud` (including its + * subdomains, e.g., `*.stackit.cloud/`) are reserved for system use. Value + * constraints: - Must be less than or equal to 63 characters long (can be empty). - If not + * empty it must begin and end with an alphanumeric character (`[a-z0-9A-Z]`). - May + * contain dashes (`-`), underscores (`_`), dots (`.`), and + * alphanumerics in between. A resource can have a maximum of 64 labels. Reserved labels are + * excluded from this count. Providing a `null` value for a key will remove that key. * * @return labels */ diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/CreateSnapshotPayload.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/CreateSnapshotPayload.java index ab75445a..03c68bf5 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/CreateSnapshotPayload.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/CreateSnapshotPayload.java @@ -155,11 +155,21 @@ public CreateSnapshotPayload labels(@javax.annotation.Nullable Object labels) { } /** - * Object that represents the labels of an object. Regex for keys: - * `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: - * `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a - * `null` value for a key will remove that key. The `stackit-` prefix is - * reserved and cannot be used for Keys. + * Object that represents the labels as key-value pairs of a resource. Key constraints: - May + * contain an optional domain prefix separated by a slash (`/`). - Domain prefix must + * be less than or equal to 250 characters. - Domain prefix must ba a valid DNS subdomain + * containing only lowercase alphanumerics (`[a-z0-9]`) and dashes (`-`), + * separated by dots (`.`). - Length (excluding the domain prefix) must be between 1 + * and 63 characters. - Must begin and end with an alphanumerical character + * (`[a-z0-9A-Z]`). - May contain dashes (`-`), underscores (`_`), + * dots (`.`), and alphanumerics in between. - Keys starting with the prefix + * `stackit-` or having a domain prefix of `stackit.cloud` (including its + * subdomains, e.g., `*.stackit.cloud/`) are reserved for system use. Value + * constraints: - Must be less than or equal to 63 characters long (can be empty). - If not + * empty it must begin and end with an alphanumeric character (`[a-z0-9A-Z]`). - May + * contain dashes (`-`), underscores (`_`), dots (`.`), and + * alphanumerics in between. A resource can have a maximum of 64 labels. Reserved labels are + * excluded from this count. Providing a `null` value for a key will remove that key. * * @return labels */ diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/CreateVolumePayload.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/CreateVolumePayload.java index 6fac28e5..7ad4e64f 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/CreateVolumePayload.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/CreateVolumePayload.java @@ -255,11 +255,21 @@ public CreateVolumePayload labels(@javax.annotation.Nullable Object labels) { } /** - * Object that represents the labels of an object. Regex for keys: - * `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: - * `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a - * `null` value for a key will remove that key. The `stackit-` prefix is - * reserved and cannot be used for Keys. + * Object that represents the labels as key-value pairs of a resource. Key constraints: - May + * contain an optional domain prefix separated by a slash (`/`). - Domain prefix must + * be less than or equal to 250 characters. - Domain prefix must ba a valid DNS subdomain + * containing only lowercase alphanumerics (`[a-z0-9]`) and dashes (`-`), + * separated by dots (`.`). - Length (excluding the domain prefix) must be between 1 + * and 63 characters. - Must begin and end with an alphanumerical character + * (`[a-z0-9A-Z]`). - May contain dashes (`-`), underscores (`_`), + * dots (`.`), and alphanumerics in between. - Keys starting with the prefix + * `stackit-` or having a domain prefix of `stackit.cloud` (including its + * subdomains, e.g., `*.stackit.cloud/`) are reserved for system use. Value + * constraints: - Must be less than or equal to 63 characters long (can be empty). - If not + * empty it must begin and end with an alphanumeric character (`[a-z0-9A-Z]`). - May + * contain dashes (`-`), underscores (`_`), dots (`.`), and + * alphanumerics in between. A resource can have a maximum of 64 labels. Reserved labels are + * excluded from this count. Providing a `null` value for a key will remove that key. * * @return labels */ diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/Image.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/Image.java index 604ac770..8ed4d718 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/Image.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/Image.java @@ -246,11 +246,21 @@ public Image labels(@javax.annotation.Nullable Object labels) { } /** - * Object that represents the labels of an object. Regex for keys: - * `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: - * `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a - * `null` value for a key will remove that key. The `stackit-` prefix is - * reserved and cannot be used for Keys. + * Object that represents the labels as key-value pairs of a resource. Key constraints: - May + * contain an optional domain prefix separated by a slash (`/`). - Domain prefix must + * be less than or equal to 250 characters. - Domain prefix must ba a valid DNS subdomain + * containing only lowercase alphanumerics (`[a-z0-9]`) and dashes (`-`), + * separated by dots (`.`). - Length (excluding the domain prefix) must be between 1 + * and 63 characters. - Must begin and end with an alphanumerical character + * (`[a-z0-9A-Z]`). - May contain dashes (`-`), underscores (`_`), + * dots (`.`), and alphanumerics in between. - Keys starting with the prefix + * `stackit-` or having a domain prefix of `stackit.cloud` (including its + * subdomains, e.g., `*.stackit.cloud/`) are reserved for system use. Value + * constraints: - Must be less than or equal to 63 characters long (can be empty). - If not + * empty it must begin and end with an alphanumeric character (`[a-z0-9A-Z]`). - May + * contain dashes (`-`), underscores (`_`), dots (`.`), and + * alphanumerics in between. A resource can have a maximum of 64 labels. Reserved labels are + * excluded from this count. Providing a `null` value for a key will remove that key. * * @return labels */ diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/Keypair.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/Keypair.java index 045f6eba..14eeb5f2 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/Keypair.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/Keypair.java @@ -98,11 +98,21 @@ public Keypair labels(@javax.annotation.Nullable Object labels) { } /** - * Object that represents the labels of an object. Regex for keys: - * `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: - * `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a - * `null` value for a key will remove that key. The `stackit-` prefix is - * reserved and cannot be used for Keys. + * Object that represents the labels as key-value pairs of a resource. Key constraints: - May + * contain an optional domain prefix separated by a slash (`/`). - Domain prefix must + * be less than or equal to 250 characters. - Domain prefix must ba a valid DNS subdomain + * containing only lowercase alphanumerics (`[a-z0-9]`) and dashes (`-`), + * separated by dots (`.`). - Length (excluding the domain prefix) must be between 1 + * and 63 characters. - Must begin and end with an alphanumerical character + * (`[a-z0-9A-Z]`). - May contain dashes (`-`), underscores (`_`), + * dots (`.`), and alphanumerics in between. - Keys starting with the prefix + * `stackit-` or having a domain prefix of `stackit.cloud` (including its + * subdomains, e.g., `*.stackit.cloud/`) are reserved for system use. Value + * constraints: - Must be less than or equal to 63 characters long (can be empty). - If not + * empty it must begin and end with an alphanumeric character (`[a-z0-9A-Z]`). - May + * contain dashes (`-`), underscores (`_`), dots (`.`), and + * alphanumerics in between. A resource can have a maximum of 64 labels. Reserved labels are + * excluded from this count. Providing a `null` value for a key will remove that key. * * @return labels */ diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/NIC.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/NIC.java index 23833cc8..6e71cc43 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/NIC.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/NIC.java @@ -24,6 +24,7 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; @@ -41,6 +42,11 @@ public class NIC { @SerializedName(SERIALIZED_NAME_ALLOWED_ADDRESSES) @javax.annotation.Nullable private List allowedAddresses = new ArrayList<>(); + public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; + + @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nullable private OffsetDateTime createdAt; + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) @@ -106,16 +112,31 @@ public class NIC { @SerializedName(SERIALIZED_NAME_TYPE) @javax.annotation.Nullable private String type; + public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; + + @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @javax.annotation.Nullable private OffsetDateTime updatedAt; + public NIC() {} - public NIC(UUID device, UUID id, String mac, UUID networkId, String status, String type) { + public NIC( + OffsetDateTime createdAt, + UUID device, + UUID id, + String mac, + UUID networkId, + String status, + String type, + OffsetDateTime updatedAt) { this(); + this.createdAt = createdAt; this.device = device; this.id = id; this.mac = mac; this.networkId = networkId; this.status = status; this.type = type; + this.updatedAt = updatedAt; } public NIC allowedAddresses( @@ -146,6 +167,15 @@ public void setAllowedAddresses( this.allowedAddresses = allowedAddresses; } + /** + * Date-time when resource was created. + * + * @return createdAt + */ + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { + return createdAt; + } + public NIC description(@javax.annotation.Nullable String description) { this.description = description; return this; @@ -224,11 +254,21 @@ public NIC labels(@javax.annotation.Nullable Object labels) { } /** - * Object that represents the labels of an object. Regex for keys: - * `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: - * `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a - * `null` value for a key will remove that key. The `stackit-` prefix is - * reserved and cannot be used for Keys. + * Object that represents the labels as key-value pairs of a resource. Key constraints: - May + * contain an optional domain prefix separated by a slash (`/`). - Domain prefix must + * be less than or equal to 250 characters. - Domain prefix must ba a valid DNS subdomain + * containing only lowercase alphanumerics (`[a-z0-9]`) and dashes (`-`), + * separated by dots (`.`). - Length (excluding the domain prefix) must be between 1 + * and 63 characters. - Must begin and end with an alphanumerical character + * (`[a-z0-9A-Z]`). - May contain dashes (`-`), underscores (`_`), + * dots (`.`), and alphanumerics in between. - Keys starting with the prefix + * `stackit-` or having a domain prefix of `stackit.cloud` (including its + * subdomains, e.g., `*.stackit.cloud/`) are reserved for system use. Value + * constraints: - Must be less than or equal to 63 characters long (can be empty). - If not + * empty it must begin and end with an alphanumeric character (`[a-z0-9A-Z]`). - May + * contain dashes (`-`), underscores (`_`), dots (`.`), and + * alphanumerics in between. A resource can have a maximum of 64 labels. Reserved labels are + * excluded from this count. Providing a `null` value for a key will remove that key. * * @return labels */ @@ -339,6 +379,15 @@ public void setSecurityGroups(@javax.annotation.Nullable List securityGrou return type; } + /** + * Date-time when resource was last updated. + * + * @return updatedAt + */ + @javax.annotation.Nullable public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -393,6 +442,7 @@ public boolean equals(Object o) { } NIC NIC = (NIC) o; return Objects.equals(this.allowedAddresses, NIC.allowedAddresses) + && Objects.equals(this.createdAt, NIC.createdAt) && Objects.equals(this.description, NIC.description) && Objects.equals(this.device, NIC.device) && Objects.equals(this.id, NIC.id) @@ -406,6 +456,7 @@ public boolean equals(Object o) { && Objects.equals(this.securityGroups, NIC.securityGroups) && Objects.equals(this.status, NIC.status) && Objects.equals(this.type, NIC.type) + && Objects.equals(this.updatedAt, NIC.updatedAt) && Objects.equals(this.additionalProperties, NIC.additionalProperties); } @@ -413,6 +464,7 @@ public boolean equals(Object o) { public int hashCode() { return Objects.hash( allowedAddresses, + createdAt, description, device, id, @@ -426,6 +478,7 @@ public int hashCode() { securityGroups, status, type, + updatedAt, additionalProperties); } @@ -434,6 +487,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NIC {\n"); sb.append(" allowedAddresses: ").append(toIndentedString(allowedAddresses)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" device: ").append(toIndentedString(device)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); @@ -447,6 +501,7 @@ public String toString() { sb.append(" securityGroups: ").append(toIndentedString(securityGroups)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); @@ -474,6 +529,7 @@ private String toIndentedString(Object o) { new HashSet( Arrays.asList( "allowedAddresses", + "createdAt", "description", "device", "id", @@ -486,7 +542,8 @@ private String toIndentedString(Object o) { "nicSecurity", "securityGroups", "status", - "type")); + "type", + "updatedAt")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(0); diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/Network.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/Network.java index 6c3a3192..8a9bb5a7 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/Network.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/Network.java @@ -42,6 +42,11 @@ public class Network { @SerializedName(SERIALIZED_NAME_CREATED_AT) @javax.annotation.Nullable private OffsetDateTime createdAt; + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable private String description; + public static final String SERIALIZED_NAME_DHCP = "dhcp"; @SerializedName(SERIALIZED_NAME_DHCP) @@ -132,6 +137,24 @@ public Network(OffsetDateTime createdAt, OffsetDateTime updatedAt) { return createdAt; } + public Network description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Description Object. Allows string up to 255 Characters. + * + * @return description + */ + @javax.annotation.Nullable public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + public Network dhcp(@javax.annotation.Nullable Boolean dhcp) { this.dhcp = dhcp; return this; @@ -194,11 +217,21 @@ public Network labels(@javax.annotation.Nullable Object labels) { } /** - * Object that represents the labels of an object. Regex for keys: - * `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: - * `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a - * `null` value for a key will remove that key. The `stackit-` prefix is - * reserved and cannot be used for Keys. + * Object that represents the labels as key-value pairs of a resource. Key constraints: - May + * contain an optional domain prefix separated by a slash (`/`). - Domain prefix must + * be less than or equal to 250 characters. - Domain prefix must ba a valid DNS subdomain + * containing only lowercase alphanumerics (`[a-z0-9]`) and dashes (`-`), + * separated by dots (`.`). - Length (excluding the domain prefix) must be between 1 + * and 63 characters. - Must begin and end with an alphanumerical character + * (`[a-z0-9A-Z]`). - May contain dashes (`-`), underscores (`_`), + * dots (`.`), and alphanumerics in between. - Keys starting with the prefix + * `stackit-` or having a domain prefix of `stackit.cloud` (including its + * subdomains, e.g., `*.stackit.cloud/`) are reserved for system use. Value + * constraints: - Must be less than or equal to 63 characters long (can be empty). - If not + * empty it must begin and end with an alphanumeric character (`[a-z0-9A-Z]`). - May + * contain dashes (`-`), underscores (`_`), dots (`.`), and + * alphanumerics in between. A resource can have a maximum of 64 labels. Reserved labels are + * excluded from this count. Providing a `null` value for a key will remove that key. * * @return labels */ @@ -472,6 +505,7 @@ public boolean equals(Object o) { } Network network = (Network) o; return Objects.equals(this.createdAt, network.createdAt) + && Objects.equals(this.description, network.description) && Objects.equals(this.dhcp, network.dhcp) && Objects.equals(this.gateway, network.gateway) && Objects.equals(this.gatewayv6, network.gatewayv6) @@ -502,6 +536,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) public int hashCode() { return Objects.hash( createdAt, + description, dhcp, gateway, gatewayv6, @@ -531,6 +566,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Network {\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" dhcp: ").append(toIndentedString(dhcp)).append("\n"); sb.append(" gateway: ").append(toIndentedString(gateway)).append("\n"); sb.append(" gatewayv6: ").append(toIndentedString(gatewayv6)).append("\n"); @@ -572,6 +608,7 @@ private String toIndentedString(Object o) { new HashSet( Arrays.asList( "createdAt", + "description", "dhcp", "gateway", "gatewayv6", @@ -621,6 +658,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) + && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `description` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("description").toString())); + } if ((jsonObj.get("gateway") != null && !jsonObj.get("gateway").isJsonNull()) && !jsonObj.get("gateway").isJsonPrimitive()) { throw new IllegalArgumentException( diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/NetworkArea.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/NetworkArea.java index 694ffc38..73c8ac44 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/NetworkArea.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/NetworkArea.java @@ -139,11 +139,21 @@ public NetworkArea labels(@javax.annotation.Nullable Object labels) { } /** - * Object that represents the labels of an object. Regex for keys: - * `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: - * `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a - * `null` value for a key will remove that key. The `stackit-` prefix is - * reserved and cannot be used for Keys. + * Object that represents the labels as key-value pairs of a resource. Key constraints: - May + * contain an optional domain prefix separated by a slash (`/`). - Domain prefix must + * be less than or equal to 250 characters. - Domain prefix must ba a valid DNS subdomain + * containing only lowercase alphanumerics (`[a-z0-9]`) and dashes (`-`), + * separated by dots (`.`). - Length (excluding the domain prefix) must be between 1 + * and 63 characters. - Must begin and end with an alphanumerical character + * (`[a-z0-9A-Z]`). - May contain dashes (`-`), underscores (`_`), + * dots (`.`), and alphanumerics in between. - Keys starting with the prefix + * `stackit-` or having a domain prefix of `stackit.cloud` (including its + * subdomains, e.g., `*.stackit.cloud/`) are reserved for system use. Value + * constraints: - Must be less than or equal to 63 characters long (can be empty). - If not + * empty it must begin and end with an alphanumeric character (`[a-z0-9A-Z]`). - May + * contain dashes (`-`), underscores (`_`), dots (`.`), and + * alphanumerics in between. A resource can have a maximum of 64 labels. Reserved labels are + * excluded from this count. Providing a `null` value for a key will remove that key. * * @return labels */ diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/PartialUpdateNetworkAreaPayload.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/PartialUpdateNetworkAreaPayload.java index 36c1f9f0..7b7e114f 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/PartialUpdateNetworkAreaPayload.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/PartialUpdateNetworkAreaPayload.java @@ -75,11 +75,21 @@ public PartialUpdateNetworkAreaPayload labels(@javax.annotation.Nullable Object } /** - * Object that represents the labels of an object. Regex for keys: - * `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: - * `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a - * `null` value for a key will remove that key. The `stackit-` prefix is - * reserved and cannot be used for Keys. + * Object that represents the labels as key-value pairs of a resource. Key constraints: - May + * contain an optional domain prefix separated by a slash (`/`). - Domain prefix must + * be less than or equal to 250 characters. - Domain prefix must ba a valid DNS subdomain + * containing only lowercase alphanumerics (`[a-z0-9]`) and dashes (`-`), + * separated by dots (`.`). - Length (excluding the domain prefix) must be between 1 + * and 63 characters. - Must begin and end with an alphanumerical character + * (`[a-z0-9A-Z]`). - May contain dashes (`-`), underscores (`_`), + * dots (`.`), and alphanumerics in between. - Keys starting with the prefix + * `stackit-` or having a domain prefix of `stackit.cloud` (including its + * subdomains, e.g., `*.stackit.cloud/`) are reserved for system use. Value + * constraints: - Must be less than or equal to 63 characters long (can be empty). - If not + * empty it must begin and end with an alphanumeric character (`[a-z0-9A-Z]`). - May + * contain dashes (`-`), underscores (`_`), dots (`.`), and + * alphanumerics in between. A resource can have a maximum of 64 labels. Reserved labels are + * excluded from this count. Providing a `null` value for a key will remove that key. * * @return labels */ diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/PartialUpdateNetworkPayload.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/PartialUpdateNetworkPayload.java index b72e0dd7..e66af204 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/PartialUpdateNetworkPayload.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/PartialUpdateNetworkPayload.java @@ -38,6 +38,11 @@ public class PartialUpdateNetworkPayload { @SerializedName(SERIALIZED_NAME_ADDRESS_FAMILY) @javax.annotation.Nullable private UpdateNetworkAddressFamily addressFamily; + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable private String description; + public static final String SERIALIZED_NAME_DHCP = "dhcp"; @SerializedName(SERIALIZED_NAME_DHCP) @@ -80,6 +85,24 @@ public void setAddressFamily( this.addressFamily = addressFamily; } + public PartialUpdateNetworkPayload description(@javax.annotation.Nullable String description) { + this.description = description; + return this; + } + + /** + * Description Object. Allows string up to 255 Characters. + * + * @return description + */ + @javax.annotation.Nullable public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nullable String description) { + this.description = description; + } + public PartialUpdateNetworkPayload dhcp(@javax.annotation.Nullable Boolean dhcp) { this.dhcp = dhcp; return this; @@ -104,11 +127,21 @@ public PartialUpdateNetworkPayload labels(@javax.annotation.Nullable Object labe } /** - * Object that represents the labels of an object. Regex for keys: - * `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: - * `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a - * `null` value for a key will remove that key. The `stackit-` prefix is - * reserved and cannot be used for Keys. + * Object that represents the labels as key-value pairs of a resource. Key constraints: - May + * contain an optional domain prefix separated by a slash (`/`). - Domain prefix must + * be less than or equal to 250 characters. - Domain prefix must ba a valid DNS subdomain + * containing only lowercase alphanumerics (`[a-z0-9]`) and dashes (`-`), + * separated by dots (`.`). - Length (excluding the domain prefix) must be between 1 + * and 63 characters. - Must begin and end with an alphanumerical character + * (`[a-z0-9A-Z]`). - May contain dashes (`-`), underscores (`_`), + * dots (`.`), and alphanumerics in between. - Keys starting with the prefix + * `stackit-` or having a domain prefix of `stackit.cloud` (including its + * subdomains, e.g., `*.stackit.cloud/`) are reserved for system use. Value + * constraints: - Must be less than or equal to 63 characters long (can be empty). - If not + * empty it must begin and end with an alphanumeric character (`[a-z0-9A-Z]`). - May + * contain dashes (`-`), underscores (`_`), dots (`.`), and + * alphanumerics in between. A resource can have a maximum of 64 labels. Reserved labels are + * excluded from this count. Providing a `null` value for a key will remove that key. * * @return labels */ @@ -210,6 +243,7 @@ public boolean equals(Object o) { } PartialUpdateNetworkPayload partialUpdateNetworkPayload = (PartialUpdateNetworkPayload) o; return Objects.equals(this.addressFamily, partialUpdateNetworkPayload.addressFamily) + && Objects.equals(this.description, partialUpdateNetworkPayload.description) && Objects.equals(this.dhcp, partialUpdateNetworkPayload.dhcp) && Objects.equals(this.labels, partialUpdateNetworkPayload.labels) && Objects.equals(this.name, partialUpdateNetworkPayload.name) @@ -221,7 +255,8 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(addressFamily, dhcp, labels, name, routed, additionalProperties); + return Objects.hash( + addressFamily, description, dhcp, labels, name, routed, additionalProperties); } @Override @@ -229,6 +264,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class PartialUpdateNetworkPayload {\n"); sb.append(" addressFamily: ").append(toIndentedString(addressFamily)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" dhcp: ").append(toIndentedString(dhcp)).append("\n"); sb.append(" labels: ").append(toIndentedString(labels)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); @@ -258,7 +294,13 @@ private String toIndentedString(Object o) { // a set of all properties/fields (JSON key names) openapiFields = new HashSet( - Arrays.asList("addressFamily", "dhcp", "labels", "name", "routed")); + Arrays.asList( + "addressFamily", + "description", + "dhcp", + "labels", + "name", + "routed")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(0); @@ -287,6 +329,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("addressFamily") != null && !jsonObj.get("addressFamily").isJsonNull()) { UpdateNetworkAddressFamily.validateJsonElement(jsonObj.get("addressFamily")); } + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) + && !jsonObj.get("description").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `description` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("description").toString())); + } if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException( diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/PublicIp.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/PublicIp.java index c73d44fa..f51bb2ec 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/PublicIp.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/PublicIp.java @@ -23,6 +23,7 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.time.OffsetDateTime; import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; @@ -35,6 +36,11 @@ /** Object that represents a public IP. */ @javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") public class PublicIp { + public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; + + @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nullable private OffsetDateTime createdAt; + public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -55,12 +61,28 @@ public class PublicIp { @SerializedName(SERIALIZED_NAME_NETWORK_INTERFACE) @javax.annotation.Nullable private UUID networkInterface; + public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; + + @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @javax.annotation.Nullable private OffsetDateTime updatedAt; + public PublicIp() {} - public PublicIp(UUID id, String ip) { + public PublicIp(OffsetDateTime createdAt, UUID id, String ip, OffsetDateTime updatedAt) { this(); + this.createdAt = createdAt; this.id = id; this.ip = ip; + this.updatedAt = updatedAt; + } + + /** + * Date-time when resource was created. + * + * @return createdAt + */ + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { + return createdAt; } /** @@ -87,11 +109,21 @@ public PublicIp labels(@javax.annotation.Nullable Object labels) { } /** - * Object that represents the labels of an object. Regex for keys: - * `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: - * `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a - * `null` value for a key will remove that key. The `stackit-` prefix is - * reserved and cannot be used for Keys. + * Object that represents the labels as key-value pairs of a resource. Key constraints: - May + * contain an optional domain prefix separated by a slash (`/`). - Domain prefix must + * be less than or equal to 250 characters. - Domain prefix must ba a valid DNS subdomain + * containing only lowercase alphanumerics (`[a-z0-9]`) and dashes (`-`), + * separated by dots (`.`). - Length (excluding the domain prefix) must be between 1 + * and 63 characters. - Must begin and end with an alphanumerical character + * (`[a-z0-9A-Z]`). - May contain dashes (`-`), underscores (`_`), + * dots (`.`), and alphanumerics in between. - Keys starting with the prefix + * `stackit-` or having a domain prefix of `stackit.cloud` (including its + * subdomains, e.g., `*.stackit.cloud/`) are reserved for system use. Value + * constraints: - Must be less than or equal to 63 characters long (can be empty). - If not + * empty it must begin and end with an alphanumeric character (`[a-z0-9A-Z]`). - May + * contain dashes (`-`), underscores (`_`), dots (`.`), and + * alphanumerics in between. A resource can have a maximum of 64 labels. Reserved labels are + * excluded from this count. Providing a `null` value for a key will remove that key. * * @return labels */ @@ -121,6 +153,15 @@ public void setNetworkInterface(@javax.annotation.Nullable UUID networkInterface this.networkInterface = networkInterface; } + /** + * Date-time when resource was last updated. + * + * @return updatedAt + */ + @javax.annotation.Nullable public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -174,10 +215,12 @@ public boolean equals(Object o) { return false; } PublicIp publicIp = (PublicIp) o; - return Objects.equals(this.id, publicIp.id) + return Objects.equals(this.createdAt, publicIp.createdAt) + && Objects.equals(this.id, publicIp.id) && Objects.equals(this.ip, publicIp.ip) && Objects.equals(this.labels, publicIp.labels) && Objects.equals(this.networkInterface, publicIp.networkInterface) + && Objects.equals(this.updatedAt, publicIp.updatedAt) && Objects.equals(this.additionalProperties, publicIp.additionalProperties); } @@ -192,7 +235,8 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(id, ip, labels, networkInterface, additionalProperties); + return Objects.hash( + createdAt, id, ip, labels, networkInterface, updatedAt, additionalProperties); } private static int hashCodeNullable(JsonNullable a) { @@ -206,10 +250,12 @@ private static int hashCodeNullable(JsonNullable a) { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class PublicIp {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" ip: ").append(toIndentedString(ip)).append("\n"); sb.append(" labels: ").append(toIndentedString(labels)).append("\n"); sb.append(" networkInterface: ").append(toIndentedString(networkInterface)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); @@ -234,7 +280,14 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = - new HashSet(Arrays.asList("id", "ip", "labels", "networkInterface")); + new HashSet( + Arrays.asList( + "createdAt", + "id", + "ip", + "labels", + "networkInterface", + "updatedAt")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(0); diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/Route.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/Route.java index e7f89d3b..60c59807 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/Route.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/Route.java @@ -91,11 +91,21 @@ public Route labels(@javax.annotation.Nullable Object labels) { } /** - * Object that represents the labels of an object. Regex for keys: - * `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: - * `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a - * `null` value for a key will remove that key. The `stackit-` prefix is - * reserved and cannot be used for Keys. + * Object that represents the labels as key-value pairs of a resource. Key constraints: - May + * contain an optional domain prefix separated by a slash (`/`). - Domain prefix must + * be less than or equal to 250 characters. - Domain prefix must ba a valid DNS subdomain + * containing only lowercase alphanumerics (`[a-z0-9]`) and dashes (`-`), + * separated by dots (`.`). - Length (excluding the domain prefix) must be between 1 + * and 63 characters. - Must begin and end with an alphanumerical character + * (`[a-z0-9A-Z]`). - May contain dashes (`-`), underscores (`_`), + * dots (`.`), and alphanumerics in between. - Keys starting with the prefix + * `stackit-` or having a domain prefix of `stackit.cloud` (including its + * subdomains, e.g., `*.stackit.cloud/`) are reserved for system use. Value + * constraints: - Must be less than or equal to 63 characters long (can be empty). - If not + * empty it must begin and end with an alphanumeric character (`[a-z0-9A-Z]`). - May + * contain dashes (`-`), underscores (`_`), dots (`.`), and + * alphanumerics in between. A resource can have a maximum of 64 labels. Reserved labels are + * excluded from this count. Providing a `null` value for a key will remove that key. * * @return labels */ diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/SecurityGroup.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/SecurityGroup.java index 939310be..67a8014f 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/SecurityGroup.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/SecurityGroup.java @@ -133,11 +133,21 @@ public SecurityGroup labels(@javax.annotation.Nullable Object labels) { } /** - * Object that represents the labels of an object. Regex for keys: - * `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: - * `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a - * `null` value for a key will remove that key. The `stackit-` prefix is - * reserved and cannot be used for Keys. + * Object that represents the labels as key-value pairs of a resource. Key constraints: - May + * contain an optional domain prefix separated by a slash (`/`). - Domain prefix must + * be less than or equal to 250 characters. - Domain prefix must ba a valid DNS subdomain + * containing only lowercase alphanumerics (`[a-z0-9]`) and dashes (`-`), + * separated by dots (`.`). - Length (excluding the domain prefix) must be between 1 + * and 63 characters. - Must begin and end with an alphanumerical character + * (`[a-z0-9A-Z]`). - May contain dashes (`-`), underscores (`_`), + * dots (`.`), and alphanumerics in between. - Keys starting with the prefix + * `stackit-` or having a domain prefix of `stackit.cloud` (including its + * subdomains, e.g., `*.stackit.cloud/`) are reserved for system use. Value + * constraints: - Must be less than or equal to 63 characters long (can be empty). - If not + * empty it must begin and end with an alphanumeric character (`[a-z0-9A-Z]`). - May + * contain dashes (`-`), underscores (`_`), dots (`.`), and + * alphanumerics in between. A resource can have a maximum of 64 labels. Reserved labels are + * excluded from this count. Providing a `null` value for a key will remove that key. * * @return labels */ diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/Server.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/Server.java index 925d8eb0..4b999f2f 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/Server.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/Server.java @@ -350,11 +350,21 @@ public Server labels(@javax.annotation.Nullable Object labels) { } /** - * Object that represents the labels of an object. Regex for keys: - * `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: - * `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a - * `null` value for a key will remove that key. The `stackit-` prefix is - * reserved and cannot be used for Keys. + * Object that represents the labels as key-value pairs of a resource. Key constraints: - May + * contain an optional domain prefix separated by a slash (`/`). - Domain prefix must + * be less than or equal to 250 characters. - Domain prefix must ba a valid DNS subdomain + * containing only lowercase alphanumerics (`[a-z0-9]`) and dashes (`-`), + * separated by dots (`.`). - Length (excluding the domain prefix) must be between 1 + * and 63 characters. - Must begin and end with an alphanumerical character + * (`[a-z0-9A-Z]`). - May contain dashes (`-`), underscores (`_`), + * dots (`.`), and alphanumerics in between. - Keys starting with the prefix + * `stackit-` or having a domain prefix of `stackit.cloud` (including its + * subdomains, e.g., `*.stackit.cloud/`) are reserved for system use. Value + * constraints: - Must be less than or equal to 63 characters long (can be empty). - If not + * empty it must begin and end with an alphanumeric character (`[a-z0-9A-Z]`). - May + * contain dashes (`-`), underscores (`_`), dots (`.`), and + * alphanumerics in between. A resource can have a maximum of 64 labels. Reserved labels are + * excluded from this count. Providing a `null` value for a key will remove that key. * * @return labels */ diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/ServerNetwork.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/ServerNetwork.java index a64db7d9..c60b85cd 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/ServerNetwork.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/ServerNetwork.java @@ -24,6 +24,7 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; @@ -41,6 +42,11 @@ public class ServerNetwork { @SerializedName(SERIALIZED_NAME_ALLOWED_ADDRESSES) @javax.annotation.Nullable private List allowedAddresses = new ArrayList<>(); + public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; + + @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nullable private OffsetDateTime createdAt; + public static final String SERIALIZED_NAME_IPV4 = "ipv4"; @SerializedName(SERIALIZED_NAME_IPV4) @@ -91,8 +97,19 @@ public class ServerNetwork { @SerializedName(SERIALIZED_NAME_SECURITY_GROUPS) @javax.annotation.Nullable private List securityGroups = new ArrayList<>(); + public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; + + @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @javax.annotation.Nullable private OffsetDateTime updatedAt; + public ServerNetwork() {} + public ServerNetwork(OffsetDateTime createdAt, OffsetDateTime updatedAt) { + this(); + this.createdAt = createdAt; + this.updatedAt = updatedAt; + } + public ServerNetwork allowedAddresses( @javax.annotation.Nullable List allowedAddresses) { this.allowedAddresses = allowedAddresses; @@ -121,6 +138,15 @@ public void setAllowedAddresses( this.allowedAddresses = allowedAddresses; } + /** + * Date-time when resource was created. + * + * @return createdAt + */ + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { + return createdAt; + } + public ServerNetwork ipv4(@javax.annotation.Nullable String ipv4) { this.ipv4 = ipv4; return this; @@ -296,6 +322,15 @@ public void setSecurityGroups(@javax.annotation.Nullable List securityGrou this.securityGroups = securityGroups; } + /** + * Date-time when resource was last updated. + * + * @return updatedAt + */ + @javax.annotation.Nullable public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -350,6 +385,7 @@ public boolean equals(Object o) { } ServerNetwork serverNetwork = (ServerNetwork) o; return Objects.equals(this.allowedAddresses, serverNetwork.allowedAddresses) + && Objects.equals(this.createdAt, serverNetwork.createdAt) && Objects.equals(this.ipv4, serverNetwork.ipv4) && Objects.equals(this.ipv6, serverNetwork.ipv6) && Objects.equals(this.mac, serverNetwork.mac) @@ -359,6 +395,7 @@ public boolean equals(Object o) { && Objects.equals(this.nicSecurity, serverNetwork.nicSecurity) && Objects.equals(this.publicIp, serverNetwork.publicIp) && Objects.equals(this.securityGroups, serverNetwork.securityGroups) + && Objects.equals(this.updatedAt, serverNetwork.updatedAt) && Objects.equals(this.additionalProperties, serverNetwork.additionalProperties); } @@ -366,6 +403,7 @@ public boolean equals(Object o) { public int hashCode() { return Objects.hash( allowedAddresses, + createdAt, ipv4, ipv6, mac, @@ -375,6 +413,7 @@ public int hashCode() { nicSecurity, publicIp, securityGroups, + updatedAt, additionalProperties); } @@ -383,6 +422,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ServerNetwork {\n"); sb.append(" allowedAddresses: ").append(toIndentedString(allowedAddresses)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" ipv4: ").append(toIndentedString(ipv4)).append("\n"); sb.append(" ipv6: ").append(toIndentedString(ipv6)).append("\n"); sb.append(" mac: ").append(toIndentedString(mac)).append("\n"); @@ -392,6 +432,7 @@ public String toString() { sb.append(" nicSecurity: ").append(toIndentedString(nicSecurity)).append("\n"); sb.append(" publicIp: ").append(toIndentedString(publicIp)).append("\n"); sb.append(" securityGroups: ").append(toIndentedString(securityGroups)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); @@ -419,6 +460,7 @@ private String toIndentedString(Object o) { new HashSet( Arrays.asList( "allowedAddresses", + "createdAt", "ipv4", "ipv6", "mac", @@ -427,7 +469,8 @@ private String toIndentedString(Object o) { "nicId", "nicSecurity", "publicIp", - "securityGroups")); + "securityGroups", + "updatedAt")); // a set of required properties/fields (JSON key names) openapiRequiredFields = diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/Snapshot.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/Snapshot.java index c9f90a9f..3b1684c9 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/Snapshot.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/Snapshot.java @@ -155,11 +155,21 @@ public Snapshot labels(@javax.annotation.Nullable Object labels) { } /** - * Object that represents the labels of an object. Regex for keys: - * `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: - * `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a - * `null` value for a key will remove that key. The `stackit-` prefix is - * reserved and cannot be used for Keys. + * Object that represents the labels as key-value pairs of a resource. Key constraints: - May + * contain an optional domain prefix separated by a slash (`/`). - Domain prefix must + * be less than or equal to 250 characters. - Domain prefix must ba a valid DNS subdomain + * containing only lowercase alphanumerics (`[a-z0-9]`) and dashes (`-`), + * separated by dots (`.`). - Length (excluding the domain prefix) must be between 1 + * and 63 characters. - Must begin and end with an alphanumerical character + * (`[a-z0-9A-Z]`). - May contain dashes (`-`), underscores (`_`), + * dots (`.`), and alphanumerics in between. - Keys starting with the prefix + * `stackit-` or having a domain prefix of `stackit.cloud` (including its + * subdomains, e.g., `*.stackit.cloud/`) are reserved for system use. Value + * constraints: - Must be less than or equal to 63 characters long (can be empty). - If not + * empty it must begin and end with an alphanumeric character (`[a-z0-9A-Z]`). - May + * contain dashes (`-`), underscores (`_`), dots (`.`), and + * alphanumerics in between. A resource can have a maximum of 64 labels. Reserved labels are + * excluded from this count. Providing a `null` value for a key will remove that key. * * @return labels */ diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/UpdateBackupPayload.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/UpdateBackupPayload.java index d0541ed2..eb96861a 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/UpdateBackupPayload.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/UpdateBackupPayload.java @@ -179,11 +179,21 @@ public UpdateBackupPayload labels(@javax.annotation.Nullable Object labels) { } /** - * Object that represents the labels of an object. Regex for keys: - * `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: - * `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a - * `null` value for a key will remove that key. The `stackit-` prefix is - * reserved and cannot be used for Keys. + * Object that represents the labels as key-value pairs of a resource. Key constraints: - May + * contain an optional domain prefix separated by a slash (`/`). - Domain prefix must + * be less than or equal to 250 characters. - Domain prefix must ba a valid DNS subdomain + * containing only lowercase alphanumerics (`[a-z0-9]`) and dashes (`-`), + * separated by dots (`.`). - Length (excluding the domain prefix) must be between 1 + * and 63 characters. - Must begin and end with an alphanumerical character + * (`[a-z0-9A-Z]`). - May contain dashes (`-`), underscores (`_`), + * dots (`.`), and alphanumerics in between. - Keys starting with the prefix + * `stackit-` or having a domain prefix of `stackit.cloud` (including its + * subdomains, e.g., `*.stackit.cloud/`) are reserved for system use. Value + * constraints: - Must be less than or equal to 63 characters long (can be empty). - If not + * empty it must begin and end with an alphanumeric character (`[a-z0-9A-Z]`). - May + * contain dashes (`-`), underscores (`_`), dots (`.`), and + * alphanumerics in between. A resource can have a maximum of 64 labels. Reserved labels are + * excluded from this count. Providing a `null` value for a key will remove that key. * * @return labels */ diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/UpdateImagePayload.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/UpdateImagePayload.java index 938a11aa..61a6c16a 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/UpdateImagePayload.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/UpdateImagePayload.java @@ -136,11 +136,21 @@ public UpdateImagePayload labels(@javax.annotation.Nullable Object labels) { } /** - * Object that represents the labels of an object. Regex for keys: - * `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: - * `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a - * `null` value for a key will remove that key. The `stackit-` prefix is - * reserved and cannot be used for Keys. + * Object that represents the labels as key-value pairs of a resource. Key constraints: - May + * contain an optional domain prefix separated by a slash (`/`). - Domain prefix must + * be less than or equal to 250 characters. - Domain prefix must ba a valid DNS subdomain + * containing only lowercase alphanumerics (`[a-z0-9]`) and dashes (`-`), + * separated by dots (`.`). - Length (excluding the domain prefix) must be between 1 + * and 63 characters. - Must begin and end with an alphanumerical character + * (`[a-z0-9A-Z]`). - May contain dashes (`-`), underscores (`_`), + * dots (`.`), and alphanumerics in between. - Keys starting with the prefix + * `stackit-` or having a domain prefix of `stackit.cloud` (including its + * subdomains, e.g., `*.stackit.cloud/`) are reserved for system use. Value + * constraints: - Must be less than or equal to 63 characters long (can be empty). - If not + * empty it must begin and end with an alphanumeric character (`[a-z0-9A-Z]`). - May + * contain dashes (`-`), underscores (`_`), dots (`.`), and + * alphanumerics in between. A resource can have a maximum of 64 labels. Reserved labels are + * excluded from this count. Providing a `null` value for a key will remove that key. * * @return labels */ diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/UpdateKeyPairPayload.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/UpdateKeyPairPayload.java index b23f84a3..8808ddd4 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/UpdateKeyPairPayload.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/UpdateKeyPairPayload.java @@ -46,11 +46,21 @@ public UpdateKeyPairPayload labels(@javax.annotation.Nullable Object labels) { } /** - * Object that represents the labels of an object. Regex for keys: - * `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: - * `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a - * `null` value for a key will remove that key. The `stackit-` prefix is - * reserved and cannot be used for Keys. + * Object that represents the labels as key-value pairs of a resource. Key constraints: - May + * contain an optional domain prefix separated by a slash (`/`). - Domain prefix must + * be less than or equal to 250 characters. - Domain prefix must ba a valid DNS subdomain + * containing only lowercase alphanumerics (`[a-z0-9]`) and dashes (`-`), + * separated by dots (`.`). - Length (excluding the domain prefix) must be between 1 + * and 63 characters. - Must begin and end with an alphanumerical character + * (`[a-z0-9A-Z]`). - May contain dashes (`-`), underscores (`_`), + * dots (`.`), and alphanumerics in between. - Keys starting with the prefix + * `stackit-` or having a domain prefix of `stackit.cloud` (including its + * subdomains, e.g., `*.stackit.cloud/`) are reserved for system use. Value + * constraints: - Must be less than or equal to 63 characters long (can be empty). - If not + * empty it must begin and end with an alphanumeric character (`[a-z0-9A-Z]`). - May + * contain dashes (`-`), underscores (`_`), dots (`.`), and + * alphanumerics in between. A resource can have a maximum of 64 labels. Reserved labels are + * excluded from this count. Providing a `null` value for a key will remove that key. * * @return labels */ diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/UpdateNetworkAreaRoutePayload.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/UpdateNetworkAreaRoutePayload.java index 5d5cd69a..246dcdf9 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/UpdateNetworkAreaRoutePayload.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/UpdateNetworkAreaRoutePayload.java @@ -46,11 +46,21 @@ public UpdateNetworkAreaRoutePayload labels(@javax.annotation.Nullable Object la } /** - * Object that represents the labels of an object. Regex for keys: - * `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: - * `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a - * `null` value for a key will remove that key. The `stackit-` prefix is - * reserved and cannot be used for Keys. + * Object that represents the labels as key-value pairs of a resource. Key constraints: - May + * contain an optional domain prefix separated by a slash (`/`). - Domain prefix must + * be less than or equal to 250 characters. - Domain prefix must ba a valid DNS subdomain + * containing only lowercase alphanumerics (`[a-z0-9]`) and dashes (`-`), + * separated by dots (`.`). - Length (excluding the domain prefix) must be between 1 + * and 63 characters. - Must begin and end with an alphanumerical character + * (`[a-z0-9A-Z]`). - May contain dashes (`-`), underscores (`_`), + * dots (`.`), and alphanumerics in between. - Keys starting with the prefix + * `stackit-` or having a domain prefix of `stackit.cloud` (including its + * subdomains, e.g., `*.stackit.cloud/`) are reserved for system use. Value + * constraints: - Must be less than or equal to 63 characters long (can be empty). - If not + * empty it must begin and end with an alphanumeric character (`[a-z0-9A-Z]`). - May + * contain dashes (`-`), underscores (`_`), dots (`.`), and + * alphanumerics in between. A resource can have a maximum of 64 labels. Reserved labels are + * excluded from this count. Providing a `null` value for a key will remove that key. * * @return labels */ diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/UpdateNicPayload.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/UpdateNicPayload.java index 974fd652..a6e40cd5 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/UpdateNicPayload.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/UpdateNicPayload.java @@ -120,11 +120,21 @@ public UpdateNicPayload labels(@javax.annotation.Nullable Object labels) { } /** - * Object that represents the labels of an object. Regex for keys: - * `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: - * `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a - * `null` value for a key will remove that key. The `stackit-` prefix is - * reserved and cannot be used for Keys. + * Object that represents the labels as key-value pairs of a resource. Key constraints: - May + * contain an optional domain prefix separated by a slash (`/`). - Domain prefix must + * be less than or equal to 250 characters. - Domain prefix must ba a valid DNS subdomain + * containing only lowercase alphanumerics (`[a-z0-9]`) and dashes (`-`), + * separated by dots (`.`). - Length (excluding the domain prefix) must be between 1 + * and 63 characters. - Must begin and end with an alphanumerical character + * (`[a-z0-9A-Z]`). - May contain dashes (`-`), underscores (`_`), + * dots (`.`), and alphanumerics in between. - Keys starting with the prefix + * `stackit-` or having a domain prefix of `stackit.cloud` (including its + * subdomains, e.g., `*.stackit.cloud/`) are reserved for system use. Value + * constraints: - Must be less than or equal to 63 characters long (can be empty). - If not + * empty it must begin and end with an alphanumeric character (`[a-z0-9A-Z]`). - May + * contain dashes (`-`), underscores (`_`), dots (`.`), and + * alphanumerics in between. A resource can have a maximum of 64 labels. Reserved labels are + * excluded from this count. Providing a `null` value for a key will remove that key. * * @return labels */ diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/UpdatePublicIPPayload.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/UpdatePublicIPPayload.java index 5fdb7c71..23380154 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/UpdatePublicIPPayload.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/UpdatePublicIPPayload.java @@ -23,6 +23,7 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.time.OffsetDateTime; import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; @@ -35,6 +36,11 @@ /** Object that represents a public IP. */ @javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") public class UpdatePublicIPPayload { + public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; + + @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nullable private OffsetDateTime createdAt; + public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -55,12 +61,29 @@ public class UpdatePublicIPPayload { @SerializedName(SERIALIZED_NAME_NETWORK_INTERFACE) @javax.annotation.Nullable private UUID networkInterface; + public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; + + @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @javax.annotation.Nullable private OffsetDateTime updatedAt; + public UpdatePublicIPPayload() {} - public UpdatePublicIPPayload(UUID id, String ip) { + public UpdatePublicIPPayload( + OffsetDateTime createdAt, UUID id, String ip, OffsetDateTime updatedAt) { this(); + this.createdAt = createdAt; this.id = id; this.ip = ip; + this.updatedAt = updatedAt; + } + + /** + * Date-time when resource was created. + * + * @return createdAt + */ + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { + return createdAt; } /** @@ -87,11 +110,21 @@ public UpdatePublicIPPayload labels(@javax.annotation.Nullable Object labels) { } /** - * Object that represents the labels of an object. Regex for keys: - * `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: - * `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a - * `null` value for a key will remove that key. The `stackit-` prefix is - * reserved and cannot be used for Keys. + * Object that represents the labels as key-value pairs of a resource. Key constraints: - May + * contain an optional domain prefix separated by a slash (`/`). - Domain prefix must + * be less than or equal to 250 characters. - Domain prefix must ba a valid DNS subdomain + * containing only lowercase alphanumerics (`[a-z0-9]`) and dashes (`-`), + * separated by dots (`.`). - Length (excluding the domain prefix) must be between 1 + * and 63 characters. - Must begin and end with an alphanumerical character + * (`[a-z0-9A-Z]`). - May contain dashes (`-`), underscores (`_`), + * dots (`.`), and alphanumerics in between. - Keys starting with the prefix + * `stackit-` or having a domain prefix of `stackit.cloud` (including its + * subdomains, e.g., `*.stackit.cloud/`) are reserved for system use. Value + * constraints: - Must be less than or equal to 63 characters long (can be empty). - If not + * empty it must begin and end with an alphanumeric character (`[a-z0-9A-Z]`). - May + * contain dashes (`-`), underscores (`_`), dots (`.`), and + * alphanumerics in between. A resource can have a maximum of 64 labels. Reserved labels are + * excluded from this count. Providing a `null` value for a key will remove that key. * * @return labels */ @@ -122,6 +155,15 @@ public void setNetworkInterface(@javax.annotation.Nullable UUID networkInterface this.networkInterface = networkInterface; } + /** + * Date-time when resource was last updated. + * + * @return updatedAt + */ + @javax.annotation.Nullable public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -175,10 +217,12 @@ public boolean equals(Object o) { return false; } UpdatePublicIPPayload updatePublicIPPayload = (UpdatePublicIPPayload) o; - return Objects.equals(this.id, updatePublicIPPayload.id) + return Objects.equals(this.createdAt, updatePublicIPPayload.createdAt) + && Objects.equals(this.id, updatePublicIPPayload.id) && Objects.equals(this.ip, updatePublicIPPayload.ip) && Objects.equals(this.labels, updatePublicIPPayload.labels) && Objects.equals(this.networkInterface, updatePublicIPPayload.networkInterface) + && Objects.equals(this.updatedAt, updatePublicIPPayload.updatedAt) && Objects.equals( this.additionalProperties, updatePublicIPPayload.additionalProperties); } @@ -194,7 +238,8 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(id, ip, labels, networkInterface, additionalProperties); + return Objects.hash( + createdAt, id, ip, labels, networkInterface, updatedAt, additionalProperties); } private static int hashCodeNullable(JsonNullable a) { @@ -208,10 +253,12 @@ private static int hashCodeNullable(JsonNullable a) { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class UpdatePublicIPPayload {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" ip: ").append(toIndentedString(ip)).append("\n"); sb.append(" labels: ").append(toIndentedString(labels)).append("\n"); sb.append(" networkInterface: ").append(toIndentedString(networkInterface)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); @@ -236,7 +283,14 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = - new HashSet(Arrays.asList("id", "ip", "labels", "networkInterface")); + new HashSet( + Arrays.asList( + "createdAt", + "id", + "ip", + "labels", + "networkInterface", + "updatedAt")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(0); diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/UpdateSecurityGroupPayload.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/UpdateSecurityGroupPayload.java index 1ab40acf..f7cec935 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/UpdateSecurityGroupPayload.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/UpdateSecurityGroupPayload.java @@ -74,11 +74,21 @@ public UpdateSecurityGroupPayload labels(@javax.annotation.Nullable Object label } /** - * Object that represents the labels of an object. Regex for keys: - * `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: - * `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a - * `null` value for a key will remove that key. The `stackit-` prefix is - * reserved and cannot be used for Keys. + * Object that represents the labels as key-value pairs of a resource. Key constraints: - May + * contain an optional domain prefix separated by a slash (`/`). - Domain prefix must + * be less than or equal to 250 characters. - Domain prefix must ba a valid DNS subdomain + * containing only lowercase alphanumerics (`[a-z0-9]`) and dashes (`-`), + * separated by dots (`.`). - Length (excluding the domain prefix) must be between 1 + * and 63 characters. - Must begin and end with an alphanumerical character + * (`[a-z0-9A-Z]`). - May contain dashes (`-`), underscores (`_`), + * dots (`.`), and alphanumerics in between. - Keys starting with the prefix + * `stackit-` or having a domain prefix of `stackit.cloud` (including its + * subdomains, e.g., `*.stackit.cloud/`) are reserved for system use. Value + * constraints: - Must be less than or equal to 63 characters long (can be empty). - If not + * empty it must begin and end with an alphanumeric character (`[a-z0-9A-Z]`). - May + * contain dashes (`-`), underscores (`_`), dots (`.`), and + * alphanumerics in between. A resource can have a maximum of 64 labels. Reserved labels are + * excluded from this count. Providing a `null` value for a key will remove that key. * * @return labels */ diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/UpdateServerPayload.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/UpdateServerPayload.java index 6393b9d5..e8188609 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/UpdateServerPayload.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/UpdateServerPayload.java @@ -56,11 +56,21 @@ public UpdateServerPayload labels(@javax.annotation.Nullable Object labels) { } /** - * Object that represents the labels of an object. Regex for keys: - * `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: - * `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a - * `null` value for a key will remove that key. The `stackit-` prefix is - * reserved and cannot be used for Keys. + * Object that represents the labels as key-value pairs of a resource. Key constraints: - May + * contain an optional domain prefix separated by a slash (`/`). - Domain prefix must + * be less than or equal to 250 characters. - Domain prefix must ba a valid DNS subdomain + * containing only lowercase alphanumerics (`[a-z0-9]`) and dashes (`-`), + * separated by dots (`.`). - Length (excluding the domain prefix) must be between 1 + * and 63 characters. - Must begin and end with an alphanumerical character + * (`[a-z0-9A-Z]`). - May contain dashes (`-`), underscores (`_`), + * dots (`.`), and alphanumerics in between. - Keys starting with the prefix + * `stackit-` or having a domain prefix of `stackit.cloud` (including its + * subdomains, e.g., `*.stackit.cloud/`) are reserved for system use. Value + * constraints: - Must be less than or equal to 63 characters long (can be empty). - If not + * empty it must begin and end with an alphanumeric character (`[a-z0-9A-Z]`). - May + * contain dashes (`-`), underscores (`_`), dots (`.`), and + * alphanumerics in between. A resource can have a maximum of 64 labels. Reserved labels are + * excluded from this count. Providing a `null` value for a key will remove that key. * * @return labels */ diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/UpdateSnapshotPayload.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/UpdateSnapshotPayload.java index 98587294..350c9699 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/UpdateSnapshotPayload.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/UpdateSnapshotPayload.java @@ -74,11 +74,21 @@ public UpdateSnapshotPayload labels(@javax.annotation.Nullable Object labels) { } /** - * Object that represents the labels of an object. Regex for keys: - * `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: - * `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a - * `null` value for a key will remove that key. The `stackit-` prefix is - * reserved and cannot be used for Keys. + * Object that represents the labels as key-value pairs of a resource. Key constraints: - May + * contain an optional domain prefix separated by a slash (`/`). - Domain prefix must + * be less than or equal to 250 characters. - Domain prefix must ba a valid DNS subdomain + * containing only lowercase alphanumerics (`[a-z0-9]`) and dashes (`-`), + * separated by dots (`.`). - Length (excluding the domain prefix) must be between 1 + * and 63 characters. - Must begin and end with an alphanumerical character + * (`[a-z0-9A-Z]`). - May contain dashes (`-`), underscores (`_`), + * dots (`.`), and alphanumerics in between. - Keys starting with the prefix + * `stackit-` or having a domain prefix of `stackit.cloud` (including its + * subdomains, e.g., `*.stackit.cloud/`) are reserved for system use. Value + * constraints: - Must be less than or equal to 63 characters long (can be empty). - If not + * empty it must begin and end with an alphanumeric character (`[a-z0-9A-Z]`). - May + * contain dashes (`-`), underscores (`_`), dots (`.`), and + * alphanumerics in between. A resource can have a maximum of 64 labels. Reserved labels are + * excluded from this count. Providing a `null` value for a key will remove that key. * * @return labels */ diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/UpdateVolumePayload.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/UpdateVolumePayload.java index bd6eac7e..203b926d 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/UpdateVolumePayload.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/UpdateVolumePayload.java @@ -120,11 +120,21 @@ public UpdateVolumePayload labels(@javax.annotation.Nullable Object labels) { } /** - * Object that represents the labels of an object. Regex for keys: - * `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: - * `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a - * `null` value for a key will remove that key. The `stackit-` prefix is - * reserved and cannot be used for Keys. + * Object that represents the labels as key-value pairs of a resource. Key constraints: - May + * contain an optional domain prefix separated by a slash (`/`). - Domain prefix must + * be less than or equal to 250 characters. - Domain prefix must ba a valid DNS subdomain + * containing only lowercase alphanumerics (`[a-z0-9]`) and dashes (`-`), + * separated by dots (`.`). - Length (excluding the domain prefix) must be between 1 + * and 63 characters. - Must begin and end with an alphanumerical character + * (`[a-z0-9A-Z]`). - May contain dashes (`-`), underscores (`_`), + * dots (`.`), and alphanumerics in between. - Keys starting with the prefix + * `stackit-` or having a domain prefix of `stackit.cloud` (including its + * subdomains, e.g., `*.stackit.cloud/`) are reserved for system use. Value + * constraints: - Must be less than or equal to 63 characters long (can be empty). - If not + * empty it must begin and end with an alphanumeric character (`[a-z0-9A-Z]`). - May + * contain dashes (`-`), underscores (`_`), dots (`.`), and + * alphanumerics in between. A resource can have a maximum of 64 labels. Reserved labels are + * excluded from this count. Providing a `null` value for a key will remove that key. * * @return labels */ diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/Volume.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/Volume.java index 71dad1b9..4278b578 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/Volume.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/Volume.java @@ -255,11 +255,21 @@ public Volume labels(@javax.annotation.Nullable Object labels) { } /** - * Object that represents the labels of an object. Regex for keys: - * `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: - * `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a - * `null` value for a key will remove that key. The `stackit-` prefix is - * reserved and cannot be used for Keys. + * Object that represents the labels as key-value pairs of a resource. Key constraints: - May + * contain an optional domain prefix separated by a slash (`/`). - Domain prefix must + * be less than or equal to 250 characters. - Domain prefix must ba a valid DNS subdomain + * containing only lowercase alphanumerics (`[a-z0-9]`) and dashes (`-`), + * separated by dots (`.`). - Length (excluding the domain prefix) must be between 1 + * and 63 characters. - Must begin and end with an alphanumerical character + * (`[a-z0-9A-Z]`). - May contain dashes (`-`), underscores (`_`), + * dots (`.`), and alphanumerics in between. - Keys starting with the prefix + * `stackit-` or having a domain prefix of `stackit.cloud` (including its + * subdomains, e.g., `*.stackit.cloud/`) are reserved for system use. Value + * constraints: - Must be less than or equal to 63 characters long (can be empty). - If not + * empty it must begin and end with an alphanumeric character (`[a-z0-9A-Z]`). - May + * contain dashes (`-`), underscores (`_`), dots (`.`), and + * alphanumerics in between. A resource can have a maximum of 64 labels. Reserved labels are + * excluded from this count. Providing a `null` value for a key will remove that key. * * @return labels */ diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/VolumePerformanceClass.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/VolumePerformanceClass.java index 2c6de20b..ba6cc7df 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/VolumePerformanceClass.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v1api/model/VolumePerformanceClass.java @@ -103,11 +103,21 @@ public VolumePerformanceClass labels(@javax.annotation.Nullable Object labels) { } /** - * Object that represents the labels of an object. Regex for keys: - * `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: - * `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a - * `null` value for a key will remove that key. The `stackit-` prefix is - * reserved and cannot be used for Keys. + * Object that represents the labels as key-value pairs of a resource. Key constraints: - May + * contain an optional domain prefix separated by a slash (`/`). - Domain prefix must + * be less than or equal to 250 characters. - Domain prefix must ba a valid DNS subdomain + * containing only lowercase alphanumerics (`[a-z0-9]`) and dashes (`-`), + * separated by dots (`.`). - Length (excluding the domain prefix) must be between 1 + * and 63 characters. - Must begin and end with an alphanumerical character + * (`[a-z0-9A-Z]`). - May contain dashes (`-`), underscores (`_`), + * dots (`.`), and alphanumerics in between. - Keys starting with the prefix + * `stackit-` or having a domain prefix of `stackit.cloud` (including its + * subdomains, e.g., `*.stackit.cloud/`) are reserved for system use. Value + * constraints: - Must be less than or equal to 63 characters long (can be empty). - If not + * empty it must begin and end with an alphanumeric character (`[a-z0-9A-Z]`). - May + * contain dashes (`-`), underscores (`_`), dots (`.`), and + * alphanumerics in between. A resource can have a maximum of 64 labels. Reserved labels are + * excluded from this count. Providing a `null` value for a key will remove that key. * * @return labels */ diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/JSON.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/JSON.java index e5b97e64..b38f8a63 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/JSON.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/JSON.java @@ -79,6 +79,10 @@ public static GsonBuilder createGson() { "cidrv6", cloud.stackit.sdk.iaas.v2api.model.DestinationCIDRv6 .class); + classByDiscriminatorValue.put( + "prefixlist", + cloud.stackit.sdk.iaas.v2api.model + .DestinationPrefixList.class); classByDiscriminatorValue.put( "Route_destination", cloud.stackit.sdk.iaas.v2api.model.RouteDestination @@ -288,6 +292,9 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new cloud.stackit.sdk.iaas.v2api.model.DestinationCIDRv6 .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new cloud.stackit.sdk.iaas.v2api.model.DestinationPrefixList + .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new cloud.stackit.sdk.iaas.v2api.model.Error.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/CreateNicPayload.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/CreateNicPayload.java index 8c9ab8d5..0ba1ac56 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/CreateNicPayload.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/CreateNicPayload.java @@ -24,6 +24,7 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; @@ -41,6 +42,11 @@ public class CreateNicPayload { @SerializedName(SERIALIZED_NAME_ALLOWED_ADDRESSES) @javax.annotation.Nullable private List allowedAddresses = new ArrayList<>(); + public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; + + @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nullable private OffsetDateTime createdAt; + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) @@ -106,17 +112,31 @@ public class CreateNicPayload { @SerializedName(SERIALIZED_NAME_TYPE) @javax.annotation.Nullable private String type; + public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; + + @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @javax.annotation.Nullable private OffsetDateTime updatedAt; + public CreateNicPayload() {} public CreateNicPayload( - UUID device, UUID id, String mac, UUID networkId, String status, String type) { + OffsetDateTime createdAt, + UUID device, + UUID id, + String mac, + UUID networkId, + String status, + String type, + OffsetDateTime updatedAt) { this(); + this.createdAt = createdAt; this.device = device; this.id = id; this.mac = mac; this.networkId = networkId; this.status = status; this.type = type; + this.updatedAt = updatedAt; } public CreateNicPayload allowedAddresses( @@ -147,6 +167,15 @@ public void setAllowedAddresses( this.allowedAddresses = allowedAddresses; } + /** + * Date-time when resource was created. + * + * @return createdAt + */ + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { + return createdAt; + } + public CreateNicPayload description(@javax.annotation.Nullable String description) { this.description = description; return this; @@ -350,6 +379,15 @@ public void setSecurityGroups(@javax.annotation.Nullable List securityGrou return type; } + /** + * Date-time when resource was last updated. + * + * @return updatedAt + */ + @javax.annotation.Nullable public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -404,6 +442,7 @@ public boolean equals(Object o) { } CreateNicPayload createNicPayload = (CreateNicPayload) o; return Objects.equals(this.allowedAddresses, createNicPayload.allowedAddresses) + && Objects.equals(this.createdAt, createNicPayload.createdAt) && Objects.equals(this.description, createNicPayload.description) && Objects.equals(this.device, createNicPayload.device) && Objects.equals(this.id, createNicPayload.id) @@ -417,6 +456,7 @@ public boolean equals(Object o) { && Objects.equals(this.securityGroups, createNicPayload.securityGroups) && Objects.equals(this.status, createNicPayload.status) && Objects.equals(this.type, createNicPayload.type) + && Objects.equals(this.updatedAt, createNicPayload.updatedAt) && Objects.equals(this.additionalProperties, createNicPayload.additionalProperties); } @@ -424,6 +464,7 @@ public boolean equals(Object o) { public int hashCode() { return Objects.hash( allowedAddresses, + createdAt, description, device, id, @@ -437,6 +478,7 @@ public int hashCode() { securityGroups, status, type, + updatedAt, additionalProperties); } @@ -445,6 +487,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CreateNicPayload {\n"); sb.append(" allowedAddresses: ").append(toIndentedString(allowedAddresses)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" device: ").append(toIndentedString(device)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); @@ -458,6 +501,7 @@ public String toString() { sb.append(" securityGroups: ").append(toIndentedString(securityGroups)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); @@ -485,6 +529,7 @@ private String toIndentedString(Object o) { new HashSet( Arrays.asList( "allowedAddresses", + "createdAt", "description", "device", "id", @@ -497,7 +542,8 @@ private String toIndentedString(Object o) { "nicSecurity", "securityGroups", "status", - "type")); + "type", + "updatedAt")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(0); diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/CreatePublicIPPayload.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/CreatePublicIPPayload.java index 867752c5..34e530a0 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/CreatePublicIPPayload.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/CreatePublicIPPayload.java @@ -23,6 +23,7 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.time.OffsetDateTime; import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; @@ -35,6 +36,11 @@ /** Object that represents a public IP. */ @javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") public class CreatePublicIPPayload { + public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; + + @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nullable private OffsetDateTime createdAt; + public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -55,12 +61,29 @@ public class CreatePublicIPPayload { @SerializedName(SERIALIZED_NAME_NETWORK_INTERFACE) @javax.annotation.Nullable private UUID networkInterface; + public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; + + @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @javax.annotation.Nullable private OffsetDateTime updatedAt; + public CreatePublicIPPayload() {} - public CreatePublicIPPayload(UUID id, String ip) { + public CreatePublicIPPayload( + OffsetDateTime createdAt, UUID id, String ip, OffsetDateTime updatedAt) { this(); + this.createdAt = createdAt; this.id = id; this.ip = ip; + this.updatedAt = updatedAt; + } + + /** + * Date-time when resource was created. + * + * @return createdAt + */ + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { + return createdAt; } /** @@ -132,6 +155,15 @@ public void setNetworkInterface(@javax.annotation.Nullable UUID networkInterface this.networkInterface = networkInterface; } + /** + * Date-time when resource was last updated. + * + * @return updatedAt + */ + @javax.annotation.Nullable public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -185,10 +217,12 @@ public boolean equals(Object o) { return false; } CreatePublicIPPayload createPublicIPPayload = (CreatePublicIPPayload) o; - return Objects.equals(this.id, createPublicIPPayload.id) + return Objects.equals(this.createdAt, createPublicIPPayload.createdAt) + && Objects.equals(this.id, createPublicIPPayload.id) && Objects.equals(this.ip, createPublicIPPayload.ip) && Objects.equals(this.labels, createPublicIPPayload.labels) && Objects.equals(this.networkInterface, createPublicIPPayload.networkInterface) + && Objects.equals(this.updatedAt, createPublicIPPayload.updatedAt) && Objects.equals( this.additionalProperties, createPublicIPPayload.additionalProperties); } @@ -204,7 +238,8 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(id, ip, labels, networkInterface, additionalProperties); + return Objects.hash( + createdAt, id, ip, labels, networkInterface, updatedAt, additionalProperties); } private static int hashCodeNullable(JsonNullable a) { @@ -218,10 +253,12 @@ private static int hashCodeNullable(JsonNullable a) { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CreatePublicIPPayload {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" ip: ").append(toIndentedString(ip)).append("\n"); sb.append(" labels: ").append(toIndentedString(labels)).append("\n"); sb.append(" networkInterface: ").append(toIndentedString(networkInterface)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); @@ -246,7 +283,14 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = - new HashSet(Arrays.asList("id", "ip", "labels", "networkInterface")); + new HashSet( + Arrays.asList( + "createdAt", + "id", + "ip", + "labels", + "networkInterface", + "updatedAt")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(0); diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/CreateSnapshotPayload.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/CreateSnapshotPayload.java index ef45d7bd..f4543811 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/CreateSnapshotPayload.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/CreateSnapshotPayload.java @@ -50,6 +50,11 @@ public class CreateSnapshotPayload { @SerializedName(SERIALIZED_NAME_DESCRIPTION) @javax.annotation.Nullable private String description; + public static final String SERIALIZED_NAME_ENCRYPTED = "encrypted"; + + @SerializedName(SERIALIZED_NAME_ENCRYPTED) + @javax.annotation.Nullable private Boolean encrypted; + public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -91,6 +96,7 @@ public CreateSnapshotPayload() {} public CreateSnapshotPayload( String availabilityZone, OffsetDateTime createdAt, + Boolean encrypted, UUID id, Long size, String status, @@ -98,6 +104,7 @@ public CreateSnapshotPayload( this(); this.availabilityZone = availabilityZone; this.createdAt = createdAt; + this.encrypted = encrypted; this.id = id; this.size = size; this.status = status; @@ -140,6 +147,15 @@ public void setDescription(@javax.annotation.Nullable String description) { this.description = description; } + /** + * Indicates if a volume is encrypted. + * + * @return encrypted + */ + @javax.annotation.Nullable public Boolean getEncrypted() { + return encrypted; + } + /** * Universally Unique Identifier (UUID). * @@ -303,6 +319,7 @@ public boolean equals(Object o) { return Objects.equals(this.availabilityZone, createSnapshotPayload.availabilityZone) && Objects.equals(this.createdAt, createSnapshotPayload.createdAt) && Objects.equals(this.description, createSnapshotPayload.description) + && Objects.equals(this.encrypted, createSnapshotPayload.encrypted) && Objects.equals(this.id, createSnapshotPayload.id) && Objects.equals(this.labels, createSnapshotPayload.labels) && Objects.equals(this.name, createSnapshotPayload.name) @@ -320,6 +337,7 @@ public int hashCode() { availabilityZone, createdAt, description, + encrypted, id, labels, name, @@ -337,6 +355,7 @@ public String toString() { sb.append(" availabilityZone: ").append(toIndentedString(availabilityZone)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" encrypted: ").append(toIndentedString(encrypted)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" labels: ").append(toIndentedString(labels)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); @@ -373,6 +392,7 @@ private String toIndentedString(Object o) { "availabilityZone", "createdAt", "description", + "encrypted", "id", "labels", "name", diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/DestinationPrefixList.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/DestinationPrefixList.java new file mode 100644 index 00000000..92868372 --- /dev/null +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/DestinationPrefixList.java @@ -0,0 +1,395 @@ +/* + * STACKIT IaaS API + * This API allows you to create and modify IaaS resources. + * + * The version of the OpenAPI document: 2 + * Contact: stackit-iaas@mail.schwarz + * + * 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.iaas.v2api.model; + +import cloud.stackit.sdk.iaas.v2api.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +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; +import java.util.UUID; + +/** Prefix List destination reference object. */ +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +public class DestinationPrefixList { + /** Gets or Sets type */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + PREFIXLIST("prefixlist"), + + UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return UNKNOWN_DEFAULT_OPEN_API; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull + private TypeEnum type; + + public static final String SERIALIZED_NAME_VALUE = "value"; + + @SerializedName(SERIALIZED_NAME_VALUE) + @javax.annotation.Nonnull + private UUID value; + + public DestinationPrefixList() {} + + public DestinationPrefixList type(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * + * @return type + */ + @javax.annotation.Nonnull + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + } + + public DestinationPrefixList value(@javax.annotation.Nonnull UUID value) { + this.value = value; + return this; + } + + /** + * Universally Unique Identifier (UUID). + * + * @return value + */ + @javax.annotation.Nonnull + public UUID getValue() { + return value; + } + + public void setValue(@javax.annotation.Nonnull UUID value) { + this.value = value; + } + + /** + * 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 DestinationPrefixList instance itself + */ + public DestinationPrefixList 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; + } + DestinationPrefixList destinationPrefixList = (DestinationPrefixList) o; + return Objects.equals(this.type, destinationPrefixList.type) + && Objects.equals(this.value, destinationPrefixList.value) + && Objects.equals( + this.additionalProperties, destinationPrefixList.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(type, value, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DestinationPrefixList {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).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) { + if (o == null) { + return "null"; + } + return 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("type", "value")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("type", "value")); + } + + /** + * 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 DestinationPrefixList + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DestinationPrefixList.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 DestinationPrefixList is not found in the empty JSON string", + DestinationPrefixList.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : DestinationPrefixList.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("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())); + } + // validate the required field `type` + TypeEnum.validateJsonElement(jsonObj.get("type")); + if (!jsonObj.get("value").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `value` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("value").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DestinationPrefixList.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DestinationPrefixList' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(DestinationPrefixList.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, DestinationPrefixList 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.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public DestinationPrefixList read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + DestinationPrefixList 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 DestinationPrefixList given an JSON string + * + * @param jsonString JSON string + * @return An instance of DestinationPrefixList + * @throws IOException if the JSON string is invalid with respect to DestinationPrefixList + */ + public static DestinationPrefixList fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DestinationPrefixList.class); + } + + /** + * Convert an instance of DestinationPrefixList to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/ImageFromVolumePayload.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/ImageFromVolumePayload.java index ddbf6557..105b56f8 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/ImageFromVolumePayload.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/ImageFromVolumePayload.java @@ -86,7 +86,7 @@ public ImageFromVolumePayload force(@javax.annotation.Nullable Boolean force) { } /** - * When true the image is force created from a volume is currently being used. + * When true the image is force created from a volume that is currently being used. * * @return force */ diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/NIC.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/NIC.java index e10738e7..88433dc7 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/NIC.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/NIC.java @@ -24,6 +24,7 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; @@ -41,6 +42,11 @@ public class NIC { @SerializedName(SERIALIZED_NAME_ALLOWED_ADDRESSES) @javax.annotation.Nullable private List allowedAddresses = new ArrayList<>(); + public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; + + @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nullable private OffsetDateTime createdAt; + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) @@ -106,16 +112,31 @@ public class NIC { @SerializedName(SERIALIZED_NAME_TYPE) @javax.annotation.Nullable private String type; + public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; + + @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @javax.annotation.Nullable private OffsetDateTime updatedAt; + public NIC() {} - public NIC(UUID device, UUID id, String mac, UUID networkId, String status, String type) { + public NIC( + OffsetDateTime createdAt, + UUID device, + UUID id, + String mac, + UUID networkId, + String status, + String type, + OffsetDateTime updatedAt) { this(); + this.createdAt = createdAt; this.device = device; this.id = id; this.mac = mac; this.networkId = networkId; this.status = status; this.type = type; + this.updatedAt = updatedAt; } public NIC allowedAddresses( @@ -146,6 +167,15 @@ public void setAllowedAddresses( this.allowedAddresses = allowedAddresses; } + /** + * Date-time when resource was created. + * + * @return createdAt + */ + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { + return createdAt; + } + public NIC description(@javax.annotation.Nullable String description) { this.description = description; return this; @@ -349,6 +379,15 @@ public void setSecurityGroups(@javax.annotation.Nullable List securityGrou return type; } + /** + * Date-time when resource was last updated. + * + * @return updatedAt + */ + @javax.annotation.Nullable public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -403,6 +442,7 @@ public boolean equals(Object o) { } NIC NIC = (NIC) o; return Objects.equals(this.allowedAddresses, NIC.allowedAddresses) + && Objects.equals(this.createdAt, NIC.createdAt) && Objects.equals(this.description, NIC.description) && Objects.equals(this.device, NIC.device) && Objects.equals(this.id, NIC.id) @@ -416,6 +456,7 @@ public boolean equals(Object o) { && Objects.equals(this.securityGroups, NIC.securityGroups) && Objects.equals(this.status, NIC.status) && Objects.equals(this.type, NIC.type) + && Objects.equals(this.updatedAt, NIC.updatedAt) && Objects.equals(this.additionalProperties, NIC.additionalProperties); } @@ -423,6 +464,7 @@ public boolean equals(Object o) { public int hashCode() { return Objects.hash( allowedAddresses, + createdAt, description, device, id, @@ -436,6 +478,7 @@ public int hashCode() { securityGroups, status, type, + updatedAt, additionalProperties); } @@ -444,6 +487,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NIC {\n"); sb.append(" allowedAddresses: ").append(toIndentedString(allowedAddresses)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" device: ").append(toIndentedString(device)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); @@ -457,6 +501,7 @@ public String toString() { sb.append(" securityGroups: ").append(toIndentedString(securityGroups)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); @@ -484,6 +529,7 @@ private String toIndentedString(Object o) { new HashSet( Arrays.asList( "allowedAddresses", + "createdAt", "description", "device", "id", @@ -496,7 +542,8 @@ private String toIndentedString(Object o) { "nicSecurity", "securityGroups", "status", - "type")); + "type", + "updatedAt")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(0); diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/PublicIp.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/PublicIp.java index 6cdeb4ef..2fc22194 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/PublicIp.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/PublicIp.java @@ -23,6 +23,7 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.time.OffsetDateTime; import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; @@ -35,6 +36,11 @@ /** Object that represents a public IP. */ @javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") public class PublicIp { + public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; + + @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nullable private OffsetDateTime createdAt; + public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -55,12 +61,28 @@ public class PublicIp { @SerializedName(SERIALIZED_NAME_NETWORK_INTERFACE) @javax.annotation.Nullable private UUID networkInterface; + public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; + + @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @javax.annotation.Nullable private OffsetDateTime updatedAt; + public PublicIp() {} - public PublicIp(UUID id, String ip) { + public PublicIp(OffsetDateTime createdAt, UUID id, String ip, OffsetDateTime updatedAt) { this(); + this.createdAt = createdAt; this.id = id; this.ip = ip; + this.updatedAt = updatedAt; + } + + /** + * Date-time when resource was created. + * + * @return createdAt + */ + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { + return createdAt; } /** @@ -131,6 +153,15 @@ public void setNetworkInterface(@javax.annotation.Nullable UUID networkInterface this.networkInterface = networkInterface; } + /** + * Date-time when resource was last updated. + * + * @return updatedAt + */ + @javax.annotation.Nullable public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -184,10 +215,12 @@ public boolean equals(Object o) { return false; } PublicIp publicIp = (PublicIp) o; - return Objects.equals(this.id, publicIp.id) + return Objects.equals(this.createdAt, publicIp.createdAt) + && Objects.equals(this.id, publicIp.id) && Objects.equals(this.ip, publicIp.ip) && Objects.equals(this.labels, publicIp.labels) && Objects.equals(this.networkInterface, publicIp.networkInterface) + && Objects.equals(this.updatedAt, publicIp.updatedAt) && Objects.equals(this.additionalProperties, publicIp.additionalProperties); } @@ -202,7 +235,8 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(id, ip, labels, networkInterface, additionalProperties); + return Objects.hash( + createdAt, id, ip, labels, networkInterface, updatedAt, additionalProperties); } private static int hashCodeNullable(JsonNullable a) { @@ -216,10 +250,12 @@ private static int hashCodeNullable(JsonNullable a) { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class PublicIp {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" ip: ").append(toIndentedString(ip)).append("\n"); sb.append(" labels: ").append(toIndentedString(labels)).append("\n"); sb.append(" networkInterface: ").append(toIndentedString(networkInterface)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); @@ -244,7 +280,14 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = - new HashSet(Arrays.asList("id", "ip", "labels", "networkInterface")); + new HashSet( + Arrays.asList( + "createdAt", + "id", + "ip", + "labels", + "networkInterface", + "updatedAt")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(0); diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/RouteDestination.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/RouteDestination.java index 71f30dd1..137fdbdf 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/RouteDestination.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/RouteDestination.java @@ -43,6 +43,8 @@ public TypeAdapter create(Gson gson, TypeToken type) { gson.getDelegateAdapter(this, TypeToken.get(DestinationCIDRv4.class)); final TypeAdapter adapterDestinationCIDRv6 = gson.getDelegateAdapter(this, TypeToken.get(DestinationCIDRv6.class)); + final TypeAdapter adapterDestinationPrefixList = + gson.getDelegateAdapter(this, TypeToken.get(DestinationPrefixList.class)); return (TypeAdapter) new TypeAdapter() { @@ -70,8 +72,16 @@ public void write(JsonWriter out, RouteDestination value) elementAdapter.write(out, element); return; } + // check if the actual instance is of the type `DestinationPrefixList` + if (value.getActualInstance() instanceof DestinationPrefixList) { + JsonElement element = + adapterDestinationPrefixList.toJsonTree( + (DestinationPrefixList) value.getActualInstance()); + elementAdapter.write(out, element); + return; + } throw new IOException( - "Failed to serialize as the type doesn't match oneOf schemas: DestinationCIDRv4, DestinationCIDRv6"); + "Failed to serialize as the type doesn't match oneOf schemas: DestinationCIDRv4, DestinationCIDRv6, DestinationPrefixList"); } @Override @@ -125,6 +135,27 @@ public RouteDestination read(JsonReader in) throws IOException { "Input data does not match schema 'DestinationCIDRv6'", e); } + // deserialize DestinationPrefixList + try { + // validate the JSON object to see if any exception is thrown + DestinationPrefixList.validateJsonElement(jsonElement); + actualAdapter = adapterDestinationPrefixList; + match++; + log.log( + Level.FINER, + "Input data matches schema 'DestinationPrefixList'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + java.util.Locale.ROOT, + "Deserialization for DestinationPrefixList failed with `%s`.", + e.getMessage())); + log.log( + Level.FINER, + "Input data does not match schema 'DestinationPrefixList'", + e); + } if (match == 1) { RouteDestination ret = new RouteDestination(); @@ -159,6 +190,7 @@ public RouteDestination(Object o) { static { schemas.put("DestinationCIDRv4", DestinationCIDRv4.class); schemas.put("DestinationCIDRv6", DestinationCIDRv6.class); + schemas.put("DestinationPrefixList", DestinationPrefixList.class); } @Override @@ -168,7 +200,7 @@ public Map> getSchemas() { /** * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: DestinationCIDRv4, DestinationCIDRv6 + * against the oneOf child schemas: DestinationCIDRv4, DestinationCIDRv6, DestinationPrefixList * *

It could be an instance of the 'oneOf' schemas. */ @@ -184,14 +216,20 @@ public void setActualInstance(Object instance) { return; } + if (instance instanceof DestinationPrefixList) { + super.setActualInstance(instance); + return; + } + throw new RuntimeException( - "Invalid instance type. Must be DestinationCIDRv4, DestinationCIDRv6"); + "Invalid instance type. Must be DestinationCIDRv4, DestinationCIDRv6, DestinationPrefixList"); } /** - * Get the actual instance, which can be the following: DestinationCIDRv4, DestinationCIDRv6 + * Get the actual instance, which can be the following: DestinationCIDRv4, DestinationCIDRv6, + * DestinationPrefixList * - * @return The actual instance (DestinationCIDRv4, DestinationCIDRv6) + * @return The actual instance (DestinationCIDRv4, DestinationCIDRv6, DestinationPrefixList) */ @SuppressWarnings("unchecked") @Override @@ -221,6 +259,17 @@ public DestinationCIDRv6 getDestinationCIDRv6() throws ClassCastException { return (DestinationCIDRv6) super.getActualInstance(); } + /** + * Get the actual instance of `DestinationPrefixList`. If the actual instance is not + * `DestinationPrefixList`, the ClassCastException will be thrown. + * + * @return The actual instance of `DestinationPrefixList` + * @throws ClassCastException if the instance is not `DestinationPrefixList` + */ + public DestinationPrefixList getDestinationPrefixList() throws ClassCastException { + return (DestinationPrefixList) super.getActualInstance(); + } + /** * Validates the JSON Element and throws an exception if issues found * @@ -255,11 +304,23 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti e.getMessage())); // continue to the next one } + // validate the json string with DestinationPrefixList + try { + DestinationPrefixList.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format( + java.util.Locale.ROOT, + "Deserialization for DestinationPrefixList failed with `%s`.", + e.getMessage())); + // continue to the next one + } if (validCount != 1) { throw new IOException( String.format( java.util.Locale.ROOT, - "The JSON string is invalid for RouteDestination with oneOf schemas: DestinationCIDRv4, DestinationCIDRv6. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", + "The JSON string is invalid for RouteDestination with oneOf schemas: DestinationCIDRv4, DestinationCIDRv6, DestinationPrefixList. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/ServerNetwork.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/ServerNetwork.java index fe727811..49279540 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/ServerNetwork.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/ServerNetwork.java @@ -24,6 +24,7 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; @@ -41,6 +42,11 @@ public class ServerNetwork { @SerializedName(SERIALIZED_NAME_ALLOWED_ADDRESSES) @javax.annotation.Nullable private List allowedAddresses = new ArrayList<>(); + public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; + + @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nullable private OffsetDateTime createdAt; + public static final String SERIALIZED_NAME_IPV4 = "ipv4"; @SerializedName(SERIALIZED_NAME_IPV4) @@ -91,8 +97,19 @@ public class ServerNetwork { @SerializedName(SERIALIZED_NAME_SECURITY_GROUPS) @javax.annotation.Nullable private List securityGroups = new ArrayList<>(); + public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; + + @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @javax.annotation.Nullable private OffsetDateTime updatedAt; + public ServerNetwork() {} + public ServerNetwork(OffsetDateTime createdAt, OffsetDateTime updatedAt) { + this(); + this.createdAt = createdAt; + this.updatedAt = updatedAt; + } + public ServerNetwork allowedAddresses( @javax.annotation.Nullable List allowedAddresses) { this.allowedAddresses = allowedAddresses; @@ -121,6 +138,15 @@ public void setAllowedAddresses( this.allowedAddresses = allowedAddresses; } + /** + * Date-time when resource was created. + * + * @return createdAt + */ + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { + return createdAt; + } + public ServerNetwork ipv4(@javax.annotation.Nullable String ipv4) { this.ipv4 = ipv4; return this; @@ -296,6 +322,15 @@ public void setSecurityGroups(@javax.annotation.Nullable List securityGrou this.securityGroups = securityGroups; } + /** + * Date-time when resource was last updated. + * + * @return updatedAt + */ + @javax.annotation.Nullable public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -350,6 +385,7 @@ public boolean equals(Object o) { } ServerNetwork serverNetwork = (ServerNetwork) o; return Objects.equals(this.allowedAddresses, serverNetwork.allowedAddresses) + && Objects.equals(this.createdAt, serverNetwork.createdAt) && Objects.equals(this.ipv4, serverNetwork.ipv4) && Objects.equals(this.ipv6, serverNetwork.ipv6) && Objects.equals(this.mac, serverNetwork.mac) @@ -359,6 +395,7 @@ public boolean equals(Object o) { && Objects.equals(this.nicSecurity, serverNetwork.nicSecurity) && Objects.equals(this.publicIp, serverNetwork.publicIp) && Objects.equals(this.securityGroups, serverNetwork.securityGroups) + && Objects.equals(this.updatedAt, serverNetwork.updatedAt) && Objects.equals(this.additionalProperties, serverNetwork.additionalProperties); } @@ -366,6 +403,7 @@ public boolean equals(Object o) { public int hashCode() { return Objects.hash( allowedAddresses, + createdAt, ipv4, ipv6, mac, @@ -375,6 +413,7 @@ public int hashCode() { nicSecurity, publicIp, securityGroups, + updatedAt, additionalProperties); } @@ -383,6 +422,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ServerNetwork {\n"); sb.append(" allowedAddresses: ").append(toIndentedString(allowedAddresses)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" ipv4: ").append(toIndentedString(ipv4)).append("\n"); sb.append(" ipv6: ").append(toIndentedString(ipv6)).append("\n"); sb.append(" mac: ").append(toIndentedString(mac)).append("\n"); @@ -392,6 +432,7 @@ public String toString() { sb.append(" nicSecurity: ").append(toIndentedString(nicSecurity)).append("\n"); sb.append(" publicIp: ").append(toIndentedString(publicIp)).append("\n"); sb.append(" securityGroups: ").append(toIndentedString(securityGroups)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); @@ -419,6 +460,7 @@ private String toIndentedString(Object o) { new HashSet( Arrays.asList( "allowedAddresses", + "createdAt", "ipv4", "ipv6", "mac", @@ -427,7 +469,8 @@ private String toIndentedString(Object o) { "nicId", "nicSecurity", "publicIp", - "securityGroups")); + "securityGroups", + "updatedAt")); // a set of required properties/fields (JSON key names) openapiRequiredFields = diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/Snapshot.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/Snapshot.java index 087133d6..8085d2ff 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/Snapshot.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/Snapshot.java @@ -50,6 +50,11 @@ public class Snapshot { @SerializedName(SERIALIZED_NAME_DESCRIPTION) @javax.annotation.Nullable private String description; + public static final String SERIALIZED_NAME_ENCRYPTED = "encrypted"; + + @SerializedName(SERIALIZED_NAME_ENCRYPTED) + @javax.annotation.Nullable private Boolean encrypted; + public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -91,6 +96,7 @@ public Snapshot() {} public Snapshot( String availabilityZone, OffsetDateTime createdAt, + Boolean encrypted, UUID id, Long size, String status, @@ -98,6 +104,7 @@ public Snapshot( this(); this.availabilityZone = availabilityZone; this.createdAt = createdAt; + this.encrypted = encrypted; this.id = id; this.size = size; this.status = status; @@ -140,6 +147,15 @@ public void setDescription(@javax.annotation.Nullable String description) { this.description = description; } + /** + * Indicates if a volume is encrypted. + * + * @return encrypted + */ + @javax.annotation.Nullable public Boolean getEncrypted() { + return encrypted; + } + /** * Universally Unique Identifier (UUID). * @@ -303,6 +319,7 @@ public boolean equals(Object o) { return Objects.equals(this.availabilityZone, snapshot.availabilityZone) && Objects.equals(this.createdAt, snapshot.createdAt) && Objects.equals(this.description, snapshot.description) + && Objects.equals(this.encrypted, snapshot.encrypted) && Objects.equals(this.id, snapshot.id) && Objects.equals(this.labels, snapshot.labels) && Objects.equals(this.name, snapshot.name) @@ -319,6 +336,7 @@ public int hashCode() { availabilityZone, createdAt, description, + encrypted, id, labels, name, @@ -336,6 +354,7 @@ public String toString() { sb.append(" availabilityZone: ").append(toIndentedString(availabilityZone)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" encrypted: ").append(toIndentedString(encrypted)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" labels: ").append(toIndentedString(labels)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); @@ -372,6 +391,7 @@ private String toIndentedString(Object o) { "availabilityZone", "createdAt", "description", + "encrypted", "id", "labels", "name", diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/UpdatePublicIPPayload.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/UpdatePublicIPPayload.java index 9b9c73f9..4b02b00b 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/UpdatePublicIPPayload.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/UpdatePublicIPPayload.java @@ -23,6 +23,7 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.time.OffsetDateTime; import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; @@ -35,6 +36,11 @@ /** Object that represents a public IP. */ @javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") public class UpdatePublicIPPayload { + public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; + + @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nullable private OffsetDateTime createdAt; + public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -55,12 +61,29 @@ public class UpdatePublicIPPayload { @SerializedName(SERIALIZED_NAME_NETWORK_INTERFACE) @javax.annotation.Nullable private UUID networkInterface; + public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; + + @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @javax.annotation.Nullable private OffsetDateTime updatedAt; + public UpdatePublicIPPayload() {} - public UpdatePublicIPPayload(UUID id, String ip) { + public UpdatePublicIPPayload( + OffsetDateTime createdAt, UUID id, String ip, OffsetDateTime updatedAt) { this(); + this.createdAt = createdAt; this.id = id; this.ip = ip; + this.updatedAt = updatedAt; + } + + /** + * Date-time when resource was created. + * + * @return createdAt + */ + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { + return createdAt; } /** @@ -132,6 +155,15 @@ public void setNetworkInterface(@javax.annotation.Nullable UUID networkInterface this.networkInterface = networkInterface; } + /** + * Date-time when resource was last updated. + * + * @return updatedAt + */ + @javax.annotation.Nullable public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -185,10 +217,12 @@ public boolean equals(Object o) { return false; } UpdatePublicIPPayload updatePublicIPPayload = (UpdatePublicIPPayload) o; - return Objects.equals(this.id, updatePublicIPPayload.id) + return Objects.equals(this.createdAt, updatePublicIPPayload.createdAt) + && Objects.equals(this.id, updatePublicIPPayload.id) && Objects.equals(this.ip, updatePublicIPPayload.ip) && Objects.equals(this.labels, updatePublicIPPayload.labels) && Objects.equals(this.networkInterface, updatePublicIPPayload.networkInterface) + && Objects.equals(this.updatedAt, updatePublicIPPayload.updatedAt) && Objects.equals( this.additionalProperties, updatePublicIPPayload.additionalProperties); } @@ -204,7 +238,8 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(id, ip, labels, networkInterface, additionalProperties); + return Objects.hash( + createdAt, id, ip, labels, networkInterface, updatedAt, additionalProperties); } private static int hashCodeNullable(JsonNullable a) { @@ -218,10 +253,12 @@ private static int hashCodeNullable(JsonNullable a) { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class UpdatePublicIPPayload {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" ip: ").append(toIndentedString(ip)).append("\n"); sb.append(" labels: ").append(toIndentedString(labels)).append("\n"); sb.append(" networkInterface: ").append(toIndentedString(networkInterface)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); @@ -246,7 +283,14 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = - new HashSet(Arrays.asList("id", "ip", "labels", "networkInterface")); + new HashSet( + Arrays.asList( + "createdAt", + "id", + "ip", + "labels", + "networkInterface", + "updatedAt")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(0); diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/JSON.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/JSON.java index 6edbb0c8..80134299 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/JSON.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/JSON.java @@ -80,6 +80,10 @@ public static GsonBuilder createGson() { "cidrv6", cloud.stackit.sdk.iaas.v2beta1api.model .DestinationCIDRv6.class); + classByDiscriminatorValue.put( + "prefixlist", + cloud.stackit.sdk.iaas.v2beta1api.model + .DestinationPrefixList.class); classByDiscriminatorValue.put( "Route_destination", cloud.stackit.sdk.iaas.v2beta1api.model @@ -288,6 +292,9 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new cloud.stackit.sdk.iaas.v2beta1api.model.DestinationCIDRv6 .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new cloud.stackit.sdk.iaas.v2beta1api.model.DestinationPrefixList + .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new cloud.stackit.sdk.iaas.v2beta1api.model.Error.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/CreateNicPayload.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/CreateNicPayload.java index 510d3693..373dcb3a 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/CreateNicPayload.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/CreateNicPayload.java @@ -24,6 +24,7 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; @@ -41,6 +42,11 @@ public class CreateNicPayload { @SerializedName(SERIALIZED_NAME_ALLOWED_ADDRESSES) @javax.annotation.Nullable private List allowedAddresses = new ArrayList<>(); + public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; + + @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nullable private OffsetDateTime createdAt; + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) @@ -106,17 +112,31 @@ public class CreateNicPayload { @SerializedName(SERIALIZED_NAME_TYPE) @javax.annotation.Nullable private String type; + public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; + + @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @javax.annotation.Nullable private OffsetDateTime updatedAt; + public CreateNicPayload() {} public CreateNicPayload( - UUID device, UUID id, String mac, UUID networkId, String status, String type) { + OffsetDateTime createdAt, + UUID device, + UUID id, + String mac, + UUID networkId, + String status, + String type, + OffsetDateTime updatedAt) { this(); + this.createdAt = createdAt; this.device = device; this.id = id; this.mac = mac; this.networkId = networkId; this.status = status; this.type = type; + this.updatedAt = updatedAt; } public CreateNicPayload allowedAddresses( @@ -147,6 +167,15 @@ public void setAllowedAddresses( this.allowedAddresses = allowedAddresses; } + /** + * Date-time when resource was created. + * + * @return createdAt + */ + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { + return createdAt; + } + public CreateNicPayload description(@javax.annotation.Nullable String description) { this.description = description; return this; @@ -350,6 +379,15 @@ public void setSecurityGroups(@javax.annotation.Nullable List securityGrou return type; } + /** + * Date-time when resource was last updated. + * + * @return updatedAt + */ + @javax.annotation.Nullable public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -404,6 +442,7 @@ public boolean equals(Object o) { } CreateNicPayload createNicPayload = (CreateNicPayload) o; return Objects.equals(this.allowedAddresses, createNicPayload.allowedAddresses) + && Objects.equals(this.createdAt, createNicPayload.createdAt) && Objects.equals(this.description, createNicPayload.description) && Objects.equals(this.device, createNicPayload.device) && Objects.equals(this.id, createNicPayload.id) @@ -417,6 +456,7 @@ public boolean equals(Object o) { && Objects.equals(this.securityGroups, createNicPayload.securityGroups) && Objects.equals(this.status, createNicPayload.status) && Objects.equals(this.type, createNicPayload.type) + && Objects.equals(this.updatedAt, createNicPayload.updatedAt) && Objects.equals(this.additionalProperties, createNicPayload.additionalProperties); } @@ -424,6 +464,7 @@ public boolean equals(Object o) { public int hashCode() { return Objects.hash( allowedAddresses, + createdAt, description, device, id, @@ -437,6 +478,7 @@ public int hashCode() { securityGroups, status, type, + updatedAt, additionalProperties); } @@ -445,6 +487,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CreateNicPayload {\n"); sb.append(" allowedAddresses: ").append(toIndentedString(allowedAddresses)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" device: ").append(toIndentedString(device)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); @@ -458,6 +501,7 @@ public String toString() { sb.append(" securityGroups: ").append(toIndentedString(securityGroups)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); @@ -485,6 +529,7 @@ private String toIndentedString(Object o) { new HashSet( Arrays.asList( "allowedAddresses", + "createdAt", "description", "device", "id", @@ -497,7 +542,8 @@ private String toIndentedString(Object o) { "nicSecurity", "securityGroups", "status", - "type")); + "type", + "updatedAt")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(0); diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/CreatePublicIPPayload.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/CreatePublicIPPayload.java index 52050a4e..7948433c 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/CreatePublicIPPayload.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/CreatePublicIPPayload.java @@ -23,6 +23,7 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.time.OffsetDateTime; import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; @@ -35,6 +36,11 @@ /** Object that represents a public IP. */ @javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") public class CreatePublicIPPayload { + public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; + + @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nullable private OffsetDateTime createdAt; + public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -55,12 +61,29 @@ public class CreatePublicIPPayload { @SerializedName(SERIALIZED_NAME_NETWORK_INTERFACE) @javax.annotation.Nullable private UUID networkInterface; + public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; + + @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @javax.annotation.Nullable private OffsetDateTime updatedAt; + public CreatePublicIPPayload() {} - public CreatePublicIPPayload(UUID id, String ip) { + public CreatePublicIPPayload( + OffsetDateTime createdAt, UUID id, String ip, OffsetDateTime updatedAt) { this(); + this.createdAt = createdAt; this.id = id; this.ip = ip; + this.updatedAt = updatedAt; + } + + /** + * Date-time when resource was created. + * + * @return createdAt + */ + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { + return createdAt; } /** @@ -132,6 +155,15 @@ public void setNetworkInterface(@javax.annotation.Nullable UUID networkInterface this.networkInterface = networkInterface; } + /** + * Date-time when resource was last updated. + * + * @return updatedAt + */ + @javax.annotation.Nullable public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -185,10 +217,12 @@ public boolean equals(Object o) { return false; } CreatePublicIPPayload createPublicIPPayload = (CreatePublicIPPayload) o; - return Objects.equals(this.id, createPublicIPPayload.id) + return Objects.equals(this.createdAt, createPublicIPPayload.createdAt) + && Objects.equals(this.id, createPublicIPPayload.id) && Objects.equals(this.ip, createPublicIPPayload.ip) && Objects.equals(this.labels, createPublicIPPayload.labels) && Objects.equals(this.networkInterface, createPublicIPPayload.networkInterface) + && Objects.equals(this.updatedAt, createPublicIPPayload.updatedAt) && Objects.equals( this.additionalProperties, createPublicIPPayload.additionalProperties); } @@ -204,7 +238,8 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(id, ip, labels, networkInterface, additionalProperties); + return Objects.hash( + createdAt, id, ip, labels, networkInterface, updatedAt, additionalProperties); } private static int hashCodeNullable(JsonNullable a) { @@ -218,10 +253,12 @@ private static int hashCodeNullable(JsonNullable a) { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CreatePublicIPPayload {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" ip: ").append(toIndentedString(ip)).append("\n"); sb.append(" labels: ").append(toIndentedString(labels)).append("\n"); sb.append(" networkInterface: ").append(toIndentedString(networkInterface)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); @@ -246,7 +283,14 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = - new HashSet(Arrays.asList("id", "ip", "labels", "networkInterface")); + new HashSet( + Arrays.asList( + "createdAt", + "id", + "ip", + "labels", + "networkInterface", + "updatedAt")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(0); diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/DestinationPrefixList.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/DestinationPrefixList.java new file mode 100644 index 00000000..ff441add --- /dev/null +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/DestinationPrefixList.java @@ -0,0 +1,395 @@ +/* + * STACKIT IaaS API + * This API allows you to create and modify IaaS resources. + * + * The version of the OpenAPI document: 2beta1 + * Contact: stackit-iaas@mail.schwarz + * + * 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.iaas.v2beta1api.model; + +import cloud.stackit.sdk.iaas.v2beta1api.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.annotations.JsonAdapter; +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; +import java.util.UUID; + +/** Prefix List destination reference object. */ +@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") +public class DestinationPrefixList { + /** Gets or Sets type */ + @JsonAdapter(TypeEnum.Adapter.class) + public enum TypeEnum { + PREFIXLIST("prefixlist"), + + UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api"); + + private String value; + + TypeEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static TypeEnum fromValue(String value) { + for (TypeEnum b : TypeEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + return UNKNOWN_DEFAULT_OPEN_API; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final TypeEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public TypeEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return TypeEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + TypeEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_TYPE = "type"; + + @SerializedName(SERIALIZED_NAME_TYPE) + @javax.annotation.Nonnull + private TypeEnum type; + + public static final String SERIALIZED_NAME_VALUE = "value"; + + @SerializedName(SERIALIZED_NAME_VALUE) + @javax.annotation.Nonnull + private UUID value; + + public DestinationPrefixList() {} + + public DestinationPrefixList type(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + return this; + } + + /** + * Get type + * + * @return type + */ + @javax.annotation.Nonnull + public TypeEnum getType() { + return type; + } + + public void setType(@javax.annotation.Nonnull TypeEnum type) { + this.type = type; + } + + public DestinationPrefixList value(@javax.annotation.Nonnull UUID value) { + this.value = value; + return this; + } + + /** + * Universally Unique Identifier (UUID). + * + * @return value + */ + @javax.annotation.Nonnull + public UUID getValue() { + return value; + } + + public void setValue(@javax.annotation.Nonnull UUID value) { + this.value = value; + } + + /** + * 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 DestinationPrefixList instance itself + */ + public DestinationPrefixList 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; + } + DestinationPrefixList destinationPrefixList = (DestinationPrefixList) o; + return Objects.equals(this.type, destinationPrefixList.type) + && Objects.equals(this.value, destinationPrefixList.value) + && Objects.equals( + this.additionalProperties, destinationPrefixList.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(type, value, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DestinationPrefixList {\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" value: ").append(toIndentedString(value)).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) { + if (o == null) { + return "null"; + } + return 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("type", "value")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("type", "value")); + } + + /** + * 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 DestinationPrefixList + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!DestinationPrefixList.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 DestinationPrefixList is not found in the empty JSON string", + DestinationPrefixList.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : DestinationPrefixList.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("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())); + } + // validate the required field `type` + TypeEnum.validateJsonElement(jsonObj.get("type")); + if (!jsonObj.get("value").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `value` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("value").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!DestinationPrefixList.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'DestinationPrefixList' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(DestinationPrefixList.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, DestinationPrefixList 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.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public DestinationPrefixList read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + DestinationPrefixList 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 DestinationPrefixList given an JSON string + * + * @param jsonString JSON string + * @return An instance of DestinationPrefixList + * @throws IOException if the JSON string is invalid with respect to DestinationPrefixList + */ + public static DestinationPrefixList fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, DestinationPrefixList.class); + } + + /** + * Convert an instance of DestinationPrefixList to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/NIC.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/NIC.java index 41578843..f4a02874 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/NIC.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/NIC.java @@ -24,6 +24,7 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; @@ -41,6 +42,11 @@ public class NIC { @SerializedName(SERIALIZED_NAME_ALLOWED_ADDRESSES) @javax.annotation.Nullable private List allowedAddresses = new ArrayList<>(); + public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; + + @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nullable private OffsetDateTime createdAt; + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; @SerializedName(SERIALIZED_NAME_DESCRIPTION) @@ -106,16 +112,31 @@ public class NIC { @SerializedName(SERIALIZED_NAME_TYPE) @javax.annotation.Nullable private String type; + public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; + + @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @javax.annotation.Nullable private OffsetDateTime updatedAt; + public NIC() {} - public NIC(UUID device, UUID id, String mac, UUID networkId, String status, String type) { + public NIC( + OffsetDateTime createdAt, + UUID device, + UUID id, + String mac, + UUID networkId, + String status, + String type, + OffsetDateTime updatedAt) { this(); + this.createdAt = createdAt; this.device = device; this.id = id; this.mac = mac; this.networkId = networkId; this.status = status; this.type = type; + this.updatedAt = updatedAt; } public NIC allowedAddresses( @@ -146,6 +167,15 @@ public void setAllowedAddresses( this.allowedAddresses = allowedAddresses; } + /** + * Date-time when resource was created. + * + * @return createdAt + */ + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { + return createdAt; + } + public NIC description(@javax.annotation.Nullable String description) { this.description = description; return this; @@ -349,6 +379,15 @@ public void setSecurityGroups(@javax.annotation.Nullable List securityGrou return type; } + /** + * Date-time when resource was last updated. + * + * @return updatedAt + */ + @javax.annotation.Nullable public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -403,6 +442,7 @@ public boolean equals(Object o) { } NIC NIC = (NIC) o; return Objects.equals(this.allowedAddresses, NIC.allowedAddresses) + && Objects.equals(this.createdAt, NIC.createdAt) && Objects.equals(this.description, NIC.description) && Objects.equals(this.device, NIC.device) && Objects.equals(this.id, NIC.id) @@ -416,6 +456,7 @@ public boolean equals(Object o) { && Objects.equals(this.securityGroups, NIC.securityGroups) && Objects.equals(this.status, NIC.status) && Objects.equals(this.type, NIC.type) + && Objects.equals(this.updatedAt, NIC.updatedAt) && Objects.equals(this.additionalProperties, NIC.additionalProperties); } @@ -423,6 +464,7 @@ public boolean equals(Object o) { public int hashCode() { return Objects.hash( allowedAddresses, + createdAt, description, device, id, @@ -436,6 +478,7 @@ public int hashCode() { securityGroups, status, type, + updatedAt, additionalProperties); } @@ -444,6 +487,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class NIC {\n"); sb.append(" allowedAddresses: ").append(toIndentedString(allowedAddresses)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" device: ").append(toIndentedString(device)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); @@ -457,6 +501,7 @@ public String toString() { sb.append(" securityGroups: ").append(toIndentedString(securityGroups)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); @@ -484,6 +529,7 @@ private String toIndentedString(Object o) { new HashSet( Arrays.asList( "allowedAddresses", + "createdAt", "description", "device", "id", @@ -496,7 +542,8 @@ private String toIndentedString(Object o) { "nicSecurity", "securityGroups", "status", - "type")); + "type", + "updatedAt")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(0); diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/PublicIp.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/PublicIp.java index b0511655..0eb12237 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/PublicIp.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/PublicIp.java @@ -23,6 +23,7 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.time.OffsetDateTime; import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; @@ -35,6 +36,11 @@ /** Object that represents a public IP. */ @javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") public class PublicIp { + public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; + + @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nullable private OffsetDateTime createdAt; + public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -55,12 +61,28 @@ public class PublicIp { @SerializedName(SERIALIZED_NAME_NETWORK_INTERFACE) @javax.annotation.Nullable private UUID networkInterface; + public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; + + @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @javax.annotation.Nullable private OffsetDateTime updatedAt; + public PublicIp() {} - public PublicIp(UUID id, String ip) { + public PublicIp(OffsetDateTime createdAt, UUID id, String ip, OffsetDateTime updatedAt) { this(); + this.createdAt = createdAt; this.id = id; this.ip = ip; + this.updatedAt = updatedAt; + } + + /** + * Date-time when resource was created. + * + * @return createdAt + */ + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { + return createdAt; } /** @@ -131,6 +153,15 @@ public void setNetworkInterface(@javax.annotation.Nullable UUID networkInterface this.networkInterface = networkInterface; } + /** + * Date-time when resource was last updated. + * + * @return updatedAt + */ + @javax.annotation.Nullable public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -184,10 +215,12 @@ public boolean equals(Object o) { return false; } PublicIp publicIp = (PublicIp) o; - return Objects.equals(this.id, publicIp.id) + return Objects.equals(this.createdAt, publicIp.createdAt) + && Objects.equals(this.id, publicIp.id) && Objects.equals(this.ip, publicIp.ip) && Objects.equals(this.labels, publicIp.labels) && Objects.equals(this.networkInterface, publicIp.networkInterface) + && Objects.equals(this.updatedAt, publicIp.updatedAt) && Objects.equals(this.additionalProperties, publicIp.additionalProperties); } @@ -202,7 +235,8 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(id, ip, labels, networkInterface, additionalProperties); + return Objects.hash( + createdAt, id, ip, labels, networkInterface, updatedAt, additionalProperties); } private static int hashCodeNullable(JsonNullable a) { @@ -216,10 +250,12 @@ private static int hashCodeNullable(JsonNullable a) { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class PublicIp {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" ip: ").append(toIndentedString(ip)).append("\n"); sb.append(" labels: ").append(toIndentedString(labels)).append("\n"); sb.append(" networkInterface: ").append(toIndentedString(networkInterface)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); @@ -244,7 +280,14 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = - new HashSet(Arrays.asList("id", "ip", "labels", "networkInterface")); + new HashSet( + Arrays.asList( + "createdAt", + "id", + "ip", + "labels", + "networkInterface", + "updatedAt")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(0); diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/RouteDestination.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/RouteDestination.java index 54fb2f1c..c7fd0062 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/RouteDestination.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/RouteDestination.java @@ -43,6 +43,8 @@ public TypeAdapter create(Gson gson, TypeToken type) { gson.getDelegateAdapter(this, TypeToken.get(DestinationCIDRv4.class)); final TypeAdapter adapterDestinationCIDRv6 = gson.getDelegateAdapter(this, TypeToken.get(DestinationCIDRv6.class)); + final TypeAdapter adapterDestinationPrefixList = + gson.getDelegateAdapter(this, TypeToken.get(DestinationPrefixList.class)); return (TypeAdapter) new TypeAdapter() { @@ -70,8 +72,16 @@ public void write(JsonWriter out, RouteDestination value) elementAdapter.write(out, element); return; } + // check if the actual instance is of the type `DestinationPrefixList` + if (value.getActualInstance() instanceof DestinationPrefixList) { + JsonElement element = + adapterDestinationPrefixList.toJsonTree( + (DestinationPrefixList) value.getActualInstance()); + elementAdapter.write(out, element); + return; + } throw new IOException( - "Failed to serialize as the type doesn't match oneOf schemas: DestinationCIDRv4, DestinationCIDRv6"); + "Failed to serialize as the type doesn't match oneOf schemas: DestinationCIDRv4, DestinationCIDRv6, DestinationPrefixList"); } @Override @@ -125,6 +135,27 @@ public RouteDestination read(JsonReader in) throws IOException { "Input data does not match schema 'DestinationCIDRv6'", e); } + // deserialize DestinationPrefixList + try { + // validate the JSON object to see if any exception is thrown + DestinationPrefixList.validateJsonElement(jsonElement); + actualAdapter = adapterDestinationPrefixList; + match++; + log.log( + Level.FINER, + "Input data matches schema 'DestinationPrefixList'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + java.util.Locale.ROOT, + "Deserialization for DestinationPrefixList failed with `%s`.", + e.getMessage())); + log.log( + Level.FINER, + "Input data does not match schema 'DestinationPrefixList'", + e); + } if (match == 1) { RouteDestination ret = new RouteDestination(); @@ -159,6 +190,7 @@ public RouteDestination(Object o) { static { schemas.put("DestinationCIDRv4", DestinationCIDRv4.class); schemas.put("DestinationCIDRv6", DestinationCIDRv6.class); + schemas.put("DestinationPrefixList", DestinationPrefixList.class); } @Override @@ -168,7 +200,7 @@ public Map> getSchemas() { /** * Set the instance that matches the oneOf child schema, check the instance parameter is valid - * against the oneOf child schemas: DestinationCIDRv4, DestinationCIDRv6 + * against the oneOf child schemas: DestinationCIDRv4, DestinationCIDRv6, DestinationPrefixList * *

It could be an instance of the 'oneOf' schemas. */ @@ -184,14 +216,20 @@ public void setActualInstance(Object instance) { return; } + if (instance instanceof DestinationPrefixList) { + super.setActualInstance(instance); + return; + } + throw new RuntimeException( - "Invalid instance type. Must be DestinationCIDRv4, DestinationCIDRv6"); + "Invalid instance type. Must be DestinationCIDRv4, DestinationCIDRv6, DestinationPrefixList"); } /** - * Get the actual instance, which can be the following: DestinationCIDRv4, DestinationCIDRv6 + * Get the actual instance, which can be the following: DestinationCIDRv4, DestinationCIDRv6, + * DestinationPrefixList * - * @return The actual instance (DestinationCIDRv4, DestinationCIDRv6) + * @return The actual instance (DestinationCIDRv4, DestinationCIDRv6, DestinationPrefixList) */ @SuppressWarnings("unchecked") @Override @@ -221,6 +259,17 @@ public DestinationCIDRv6 getDestinationCIDRv6() throws ClassCastException { return (DestinationCIDRv6) super.getActualInstance(); } + /** + * Get the actual instance of `DestinationPrefixList`. If the actual instance is not + * `DestinationPrefixList`, the ClassCastException will be thrown. + * + * @return The actual instance of `DestinationPrefixList` + * @throws ClassCastException if the instance is not `DestinationPrefixList` + */ + public DestinationPrefixList getDestinationPrefixList() throws ClassCastException { + return (DestinationPrefixList) super.getActualInstance(); + } + /** * Validates the JSON Element and throws an exception if issues found * @@ -255,11 +304,23 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti e.getMessage())); // continue to the next one } + // validate the json string with DestinationPrefixList + try { + DestinationPrefixList.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format( + java.util.Locale.ROOT, + "Deserialization for DestinationPrefixList failed with `%s`.", + e.getMessage())); + // continue to the next one + } if (validCount != 1) { throw new IOException( String.format( java.util.Locale.ROOT, - "The JSON string is invalid for RouteDestination with oneOf schemas: DestinationCIDRv4, DestinationCIDRv6. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", + "The JSON string is invalid for RouteDestination with oneOf schemas: DestinationCIDRv4, DestinationCIDRv6, DestinationPrefixList. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/ServerNetwork.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/ServerNetwork.java index be063539..cacc0bad 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/ServerNetwork.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/ServerNetwork.java @@ -24,6 +24,7 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.time.OffsetDateTime; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; @@ -41,6 +42,11 @@ public class ServerNetwork { @SerializedName(SERIALIZED_NAME_ALLOWED_ADDRESSES) @javax.annotation.Nullable private List allowedAddresses = new ArrayList<>(); + public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; + + @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nullable private OffsetDateTime createdAt; + public static final String SERIALIZED_NAME_IPV4 = "ipv4"; @SerializedName(SERIALIZED_NAME_IPV4) @@ -91,8 +97,19 @@ public class ServerNetwork { @SerializedName(SERIALIZED_NAME_SECURITY_GROUPS) @javax.annotation.Nullable private List securityGroups = new ArrayList<>(); + public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; + + @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @javax.annotation.Nullable private OffsetDateTime updatedAt; + public ServerNetwork() {} + public ServerNetwork(OffsetDateTime createdAt, OffsetDateTime updatedAt) { + this(); + this.createdAt = createdAt; + this.updatedAt = updatedAt; + } + public ServerNetwork allowedAddresses( @javax.annotation.Nullable List allowedAddresses) { this.allowedAddresses = allowedAddresses; @@ -121,6 +138,15 @@ public void setAllowedAddresses( this.allowedAddresses = allowedAddresses; } + /** + * Date-time when resource was created. + * + * @return createdAt + */ + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { + return createdAt; + } + public ServerNetwork ipv4(@javax.annotation.Nullable String ipv4) { this.ipv4 = ipv4; return this; @@ -296,6 +322,15 @@ public void setSecurityGroups(@javax.annotation.Nullable List securityGrou this.securityGroups = securityGroups; } + /** + * Date-time when resource was last updated. + * + * @return updatedAt + */ + @javax.annotation.Nullable public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -350,6 +385,7 @@ public boolean equals(Object o) { } ServerNetwork serverNetwork = (ServerNetwork) o; return Objects.equals(this.allowedAddresses, serverNetwork.allowedAddresses) + && Objects.equals(this.createdAt, serverNetwork.createdAt) && Objects.equals(this.ipv4, serverNetwork.ipv4) && Objects.equals(this.ipv6, serverNetwork.ipv6) && Objects.equals(this.mac, serverNetwork.mac) @@ -359,6 +395,7 @@ public boolean equals(Object o) { && Objects.equals(this.nicSecurity, serverNetwork.nicSecurity) && Objects.equals(this.publicIp, serverNetwork.publicIp) && Objects.equals(this.securityGroups, serverNetwork.securityGroups) + && Objects.equals(this.updatedAt, serverNetwork.updatedAt) && Objects.equals(this.additionalProperties, serverNetwork.additionalProperties); } @@ -366,6 +403,7 @@ public boolean equals(Object o) { public int hashCode() { return Objects.hash( allowedAddresses, + createdAt, ipv4, ipv6, mac, @@ -375,6 +413,7 @@ public int hashCode() { nicSecurity, publicIp, securityGroups, + updatedAt, additionalProperties); } @@ -383,6 +422,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ServerNetwork {\n"); sb.append(" allowedAddresses: ").append(toIndentedString(allowedAddresses)).append("\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" ipv4: ").append(toIndentedString(ipv4)).append("\n"); sb.append(" ipv6: ").append(toIndentedString(ipv6)).append("\n"); sb.append(" mac: ").append(toIndentedString(mac)).append("\n"); @@ -392,6 +432,7 @@ public String toString() { sb.append(" nicSecurity: ").append(toIndentedString(nicSecurity)).append("\n"); sb.append(" publicIp: ").append(toIndentedString(publicIp)).append("\n"); sb.append(" securityGroups: ").append(toIndentedString(securityGroups)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); @@ -419,6 +460,7 @@ private String toIndentedString(Object o) { new HashSet( Arrays.asList( "allowedAddresses", + "createdAt", "ipv4", "ipv6", "mac", @@ -427,7 +469,8 @@ private String toIndentedString(Object o) { "nicId", "nicSecurity", "publicIp", - "securityGroups")); + "securityGroups", + "updatedAt")); // a set of required properties/fields (JSON key names) openapiRequiredFields = diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/Snapshot.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/Snapshot.java index a160c4bc..50748f50 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/Snapshot.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/Snapshot.java @@ -50,6 +50,11 @@ public class Snapshot { @SerializedName(SERIALIZED_NAME_DESCRIPTION) @javax.annotation.Nullable private String description; + public static final String SERIALIZED_NAME_ENCRYPTED = "encrypted"; + + @SerializedName(SERIALIZED_NAME_ENCRYPTED) + @javax.annotation.Nullable private Boolean encrypted; + public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -91,6 +96,7 @@ public Snapshot() {} public Snapshot( String availabilityZone, OffsetDateTime createdAt, + Boolean encrypted, UUID id, Long size, String status, @@ -98,6 +104,7 @@ public Snapshot( this(); this.availabilityZone = availabilityZone; this.createdAt = createdAt; + this.encrypted = encrypted; this.id = id; this.size = size; this.status = status; @@ -140,6 +147,15 @@ public void setDescription(@javax.annotation.Nullable String description) { this.description = description; } + /** + * Indicates if a volume is encrypted. + * + * @return encrypted + */ + @javax.annotation.Nullable public Boolean getEncrypted() { + return encrypted; + } + /** * Universally Unique Identifier (UUID). * @@ -303,6 +319,7 @@ public boolean equals(Object o) { return Objects.equals(this.availabilityZone, snapshot.availabilityZone) && Objects.equals(this.createdAt, snapshot.createdAt) && Objects.equals(this.description, snapshot.description) + && Objects.equals(this.encrypted, snapshot.encrypted) && Objects.equals(this.id, snapshot.id) && Objects.equals(this.labels, snapshot.labels) && Objects.equals(this.name, snapshot.name) @@ -319,6 +336,7 @@ public int hashCode() { availabilityZone, createdAt, description, + encrypted, id, labels, name, @@ -336,6 +354,7 @@ public String toString() { sb.append(" availabilityZone: ").append(toIndentedString(availabilityZone)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" encrypted: ").append(toIndentedString(encrypted)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" labels: ").append(toIndentedString(labels)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); @@ -372,6 +391,7 @@ private String toIndentedString(Object o) { "availabilityZone", "createdAt", "description", + "encrypted", "id", "labels", "name", diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/UpdatePublicIPPayload.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/UpdatePublicIPPayload.java index b4b23169..9dcb547c 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/UpdatePublicIPPayload.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/UpdatePublicIPPayload.java @@ -23,6 +23,7 @@ import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import java.io.IOException; +import java.time.OffsetDateTime; import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; @@ -35,6 +36,11 @@ /** Object that represents a public IP. */ @javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0") public class UpdatePublicIPPayload { + public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; + + @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nullable private OffsetDateTime createdAt; + public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -55,12 +61,29 @@ public class UpdatePublicIPPayload { @SerializedName(SERIALIZED_NAME_NETWORK_INTERFACE) @javax.annotation.Nullable private UUID networkInterface; + public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; + + @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @javax.annotation.Nullable private OffsetDateTime updatedAt; + public UpdatePublicIPPayload() {} - public UpdatePublicIPPayload(UUID id, String ip) { + public UpdatePublicIPPayload( + OffsetDateTime createdAt, UUID id, String ip, OffsetDateTime updatedAt) { this(); + this.createdAt = createdAt; this.id = id; this.ip = ip; + this.updatedAt = updatedAt; + } + + /** + * Date-time when resource was created. + * + * @return createdAt + */ + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { + return createdAt; } /** @@ -132,6 +155,15 @@ public void setNetworkInterface(@javax.annotation.Nullable UUID networkInterface this.networkInterface = networkInterface; } + /** + * Date-time when resource was last updated. + * + * @return updatedAt + */ + @javax.annotation.Nullable public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -185,10 +217,12 @@ public boolean equals(Object o) { return false; } UpdatePublicIPPayload updatePublicIPPayload = (UpdatePublicIPPayload) o; - return Objects.equals(this.id, updatePublicIPPayload.id) + return Objects.equals(this.createdAt, updatePublicIPPayload.createdAt) + && Objects.equals(this.id, updatePublicIPPayload.id) && Objects.equals(this.ip, updatePublicIPPayload.ip) && Objects.equals(this.labels, updatePublicIPPayload.labels) && Objects.equals(this.networkInterface, updatePublicIPPayload.networkInterface) + && Objects.equals(this.updatedAt, updatePublicIPPayload.updatedAt) && Objects.equals( this.additionalProperties, updatePublicIPPayload.additionalProperties); } @@ -204,7 +238,8 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(id, ip, labels, networkInterface, additionalProperties); + return Objects.hash( + createdAt, id, ip, labels, networkInterface, updatedAt, additionalProperties); } private static int hashCodeNullable(JsonNullable a) { @@ -218,10 +253,12 @@ private static int hashCodeNullable(JsonNullable a) { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class UpdatePublicIPPayload {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" ip: ").append(toIndentedString(ip)).append("\n"); sb.append(" labels: ").append(toIndentedString(labels)).append("\n"); sb.append(" networkInterface: ").append(toIndentedString(networkInterface)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); @@ -246,7 +283,14 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) openapiFields = - new HashSet(Arrays.asList("id", "ip", "labels", "networkInterface")); + new HashSet( + Arrays.asList( + "createdAt", + "id", + "ip", + "labels", + "networkInterface", + "updatedAt")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(0); diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/V2beta1CreateSnapshotPayload.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/V2beta1CreateSnapshotPayload.java index 553e3de1..442e6e47 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/V2beta1CreateSnapshotPayload.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/V2beta1CreateSnapshotPayload.java @@ -50,6 +50,11 @@ public class V2beta1CreateSnapshotPayload { @SerializedName(SERIALIZED_NAME_DESCRIPTION) @javax.annotation.Nullable private String description; + public static final String SERIALIZED_NAME_ENCRYPTED = "encrypted"; + + @SerializedName(SERIALIZED_NAME_ENCRYPTED) + @javax.annotation.Nullable private Boolean encrypted; + public static final String SERIALIZED_NAME_ID = "id"; @SerializedName(SERIALIZED_NAME_ID) @@ -91,6 +96,7 @@ public V2beta1CreateSnapshotPayload() {} public V2beta1CreateSnapshotPayload( String availabilityZone, OffsetDateTime createdAt, + Boolean encrypted, UUID id, Long size, String status, @@ -98,6 +104,7 @@ public V2beta1CreateSnapshotPayload( this(); this.availabilityZone = availabilityZone; this.createdAt = createdAt; + this.encrypted = encrypted; this.id = id; this.size = size; this.status = status; @@ -140,6 +147,15 @@ public void setDescription(@javax.annotation.Nullable String description) { this.description = description; } + /** + * Indicates if a volume is encrypted. + * + * @return encrypted + */ + @javax.annotation.Nullable public Boolean getEncrypted() { + return encrypted; + } + /** * Universally Unique Identifier (UUID). * @@ -304,6 +320,7 @@ public boolean equals(Object o) { return Objects.equals(this.availabilityZone, v2beta1CreateSnapshotPayload.availabilityZone) && Objects.equals(this.createdAt, v2beta1CreateSnapshotPayload.createdAt) && Objects.equals(this.description, v2beta1CreateSnapshotPayload.description) + && Objects.equals(this.encrypted, v2beta1CreateSnapshotPayload.encrypted) && Objects.equals(this.id, v2beta1CreateSnapshotPayload.id) && Objects.equals(this.labels, v2beta1CreateSnapshotPayload.labels) && Objects.equals(this.name, v2beta1CreateSnapshotPayload.name) @@ -322,6 +339,7 @@ public int hashCode() { availabilityZone, createdAt, description, + encrypted, id, labels, name, @@ -339,6 +357,7 @@ public String toString() { sb.append(" availabilityZone: ").append(toIndentedString(availabilityZone)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" encrypted: ").append(toIndentedString(encrypted)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" labels: ").append(toIndentedString(labels)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); @@ -375,6 +394,7 @@ private String toIndentedString(Object o) { "availabilityZone", "createdAt", "description", + "encrypted", "id", "labels", "name",