diff --git a/services/iaas/oas_commit b/services/iaas/oas_commit index 27537628..a70f65d1 100644 --- a/services/iaas/oas_commit +++ b/services/iaas/oas_commit @@ -1 +1 @@ -1c36f3781c31a0e21c4588c7c4ec835d477d2f21 +efae0a126dee165f0b9c67f12dc73b658af6306c 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 7becdec3..b134c01c 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 @@ -37,6 +37,11 @@ value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.19.0") public class CreateSnapshotPayload { + public static final String SERIALIZED_NAME_AVAILABILITY_ZONE = "availabilityZone"; + + @SerializedName(SERIALIZED_NAME_AVAILABILITY_ZONE) + @javax.annotation.Nullable private String availabilityZone; + public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; @SerializedName(SERIALIZED_NAME_CREATED_AT) @@ -86,8 +91,14 @@ public class CreateSnapshotPayload { public CreateSnapshotPayload() {} public CreateSnapshotPayload( - OffsetDateTime createdAt, UUID id, Long size, String status, OffsetDateTime updatedAt) { + String availabilityZone, + OffsetDateTime createdAt, + UUID id, + Long size, + String status, + OffsetDateTime updatedAt) { this(); + this.availabilityZone = availabilityZone; this.createdAt = createdAt; this.id = id; this.size = size; @@ -95,6 +106,15 @@ public CreateSnapshotPayload( this.updatedAt = updatedAt; } + /** + * Object that represents an availability zone. + * + * @return availabilityZone + */ + @javax.annotation.Nullable public String getAvailabilityZone() { + return availabilityZone; + } + /** * Date-time when resource was created. * @@ -272,7 +292,8 @@ public boolean equals(Object o) { return false; } CreateSnapshotPayload createSnapshotPayload = (CreateSnapshotPayload) o; - return Objects.equals(this.createdAt, createSnapshotPayload.createdAt) + return Objects.equals(this.availabilityZone, createSnapshotPayload.availabilityZone) + && Objects.equals(this.createdAt, createSnapshotPayload.createdAt) && Objects.equals(this.description, createSnapshotPayload.description) && Objects.equals(this.id, createSnapshotPayload.id) && Objects.equals(this.labels, createSnapshotPayload.labels) @@ -288,6 +309,7 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( + availabilityZone, createdAt, description, id, @@ -304,6 +326,7 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CreateSnapshotPayload {\n"); + 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(" id: ").append(toIndentedString(id)).append("\n"); @@ -339,6 +362,7 @@ private String toIndentedString(Object o) { openapiFields = new HashSet( Arrays.asList( + "availabilityZone", "createdAt", "description", "id", @@ -383,6 +407,15 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("availabilityZone") != null + && !jsonObj.get("availabilityZone").isJsonNull()) + && !jsonObj.get("availabilityZone").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `availabilityZone` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("availabilityZone").toString())); + } if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { throw new IllegalArgumentException( 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 fe70f530..d2160ea2 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 @@ -37,6 +37,11 @@ value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.19.0") public class Snapshot { + public static final String SERIALIZED_NAME_AVAILABILITY_ZONE = "availabilityZone"; + + @SerializedName(SERIALIZED_NAME_AVAILABILITY_ZONE) + @javax.annotation.Nullable private String availabilityZone; + public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; @SerializedName(SERIALIZED_NAME_CREATED_AT) @@ -86,8 +91,14 @@ public class Snapshot { public Snapshot() {} public Snapshot( - OffsetDateTime createdAt, UUID id, Long size, String status, OffsetDateTime updatedAt) { + String availabilityZone, + OffsetDateTime createdAt, + UUID id, + Long size, + String status, + OffsetDateTime updatedAt) { this(); + this.availabilityZone = availabilityZone; this.createdAt = createdAt; this.id = id; this.size = size; @@ -95,6 +106,15 @@ public Snapshot( this.updatedAt = updatedAt; } + /** + * Object that represents an availability zone. + * + * @return availabilityZone + */ + @javax.annotation.Nullable public String getAvailabilityZone() { + return availabilityZone; + } + /** * Date-time when resource was created. * @@ -272,7 +292,8 @@ public boolean equals(Object o) { return false; } Snapshot snapshot = (Snapshot) o; - return Objects.equals(this.createdAt, snapshot.createdAt) + return Objects.equals(this.availabilityZone, snapshot.availabilityZone) + && Objects.equals(this.createdAt, snapshot.createdAt) && Objects.equals(this.description, snapshot.description) && Objects.equals(this.id, snapshot.id) && Objects.equals(this.labels, snapshot.labels) @@ -287,6 +308,7 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( + availabilityZone, createdAt, description, id, @@ -303,6 +325,7 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Snapshot {\n"); + 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(" id: ").append(toIndentedString(id)).append("\n"); @@ -338,6 +361,7 @@ private String toIndentedString(Object o) { openapiFields = new HashSet( Arrays.asList( + "availabilityZone", "createdAt", "description", "id", @@ -382,6 +406,15 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("availabilityZone") != null + && !jsonObj.get("availabilityZone").isJsonNull()) + && !jsonObj.get("availabilityZone").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `availabilityZone` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("availabilityZone").toString())); + } if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { throw new IllegalArgumentException( diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/JSON.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/JSON.java index cf8b027e..6b1bfa7e 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/JSON.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/JSON.java @@ -59,6 +59,76 @@ public class JSON { public static GsonBuilder createGson() { GsonFireBuilder fireBuilder = new GsonFireBuilder() + .registerTypeSelector( + cloud.stackit.sdk.iaas.v2alpha1api.model + .AddVPCStaticRoutePayloadDestination.class, + new TypeSelector< + cloud.stackit.sdk.iaas.v2alpha1api.model + .AddVPCStaticRoutePayloadDestination>() { + @Override + public Class< + ? extends + cloud.stackit.sdk.iaas.v2alpha1api.model + .AddVPCStaticRoutePayloadDestination> + getClassForElement(JsonElement readElement) { + Map classByDiscriminatorValue = + new HashMap(); + classByDiscriminatorValue.put( + "cidrv4", + cloud.stackit.sdk.iaas.v2alpha1api.model + .DestinationCIDRv4.class); + classByDiscriminatorValue.put( + "cidrv6", + cloud.stackit.sdk.iaas.v2alpha1api.model + .DestinationCIDRv6.class); + classByDiscriminatorValue.put( + "AddVPCStaticRoutePayload_destination", + cloud.stackit.sdk.iaas.v2alpha1api.model + .AddVPCStaticRoutePayloadDestination.class); + return getClassByDiscriminator( + classByDiscriminatorValue, + getDiscriminatorValue(readElement, "type")); + } + }) + .registerTypeSelector( + cloud.stackit.sdk.iaas.v2alpha1api.model + .AddVPCStaticRoutePayloadNexthop.class, + new TypeSelector< + cloud.stackit.sdk.iaas.v2alpha1api.model + .AddVPCStaticRoutePayloadNexthop>() { + @Override + public Class< + ? extends + cloud.stackit.sdk.iaas.v2alpha1api.model + .AddVPCStaticRoutePayloadNexthop> + getClassForElement(JsonElement readElement) { + Map classByDiscriminatorValue = + new HashMap(); + classByDiscriminatorValue.put( + "blackhole", + cloud.stackit.sdk.iaas.v2alpha1api.model + .NexthopBlackhole.class); + classByDiscriminatorValue.put( + "internet", + cloud.stackit.sdk.iaas.v2alpha1api.model + .NexthopInternet.class); + classByDiscriminatorValue.put( + "ipv4", + cloud.stackit.sdk.iaas.v2alpha1api.model.NexthopIPv4 + .class); + classByDiscriminatorValue.put( + "ipv6", + cloud.stackit.sdk.iaas.v2alpha1api.model.NexthopIPv6 + .class); + classByDiscriminatorValue.put( + "AddVPCStaticRoutePayload_nexthop", + cloud.stackit.sdk.iaas.v2alpha1api.model + .AddVPCStaticRoutePayloadNexthop.class); + return getClassByDiscriminator( + classByDiscriminatorValue, + getDiscriminatorValue(readElement, "type")); + } + }) .registerTypeSelector( cloud.stackit.sdk.iaas.v2alpha1api.model.RouteDestination.class, new TypeSelector< @@ -125,6 +195,36 @@ public static GsonBuilder createGson() { classByDiscriminatorValue, getDiscriminatorValue(readElement, "type")); } + }) + .registerTypeSelector( + cloud.stackit.sdk.iaas.v2alpha1api.model.VPCNetworkRange.class, + new TypeSelector< + cloud.stackit.sdk.iaas.v2alpha1api.model + .VPCNetworkRange>() { + @Override + public Class< + ? extends + cloud.stackit.sdk.iaas.v2alpha1api.model + .VPCNetworkRange> + getClassForElement(JsonElement readElement) { + Map classByDiscriminatorValue = + new HashMap(); + classByDiscriminatorValue.put( + "ipv4", + cloud.stackit.sdk.iaas.v2alpha1api.model + .VPCNetworkRangeIPv4.class); + classByDiscriminatorValue.put( + "ipv6", + cloud.stackit.sdk.iaas.v2alpha1api.model + .VPCNetworkRangeIPv6.class); + classByDiscriminatorValue.put( + "VPCNetworkRange", + cloud.stackit.sdk.iaas.v2alpha1api.model + .VPCNetworkRange.class); + return getClassByDiscriminator( + classByDiscriminatorValue, + getDiscriminatorValue(readElement, "ipVersion")); + } }); GsonBuilder builder = fireBuilder.createGsonBuilder(); return builder; @@ -171,6 +271,18 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new cloud.stackit.sdk.iaas.v2alpha1api.model.AddRoutingTableToAreaPayload .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new cloud.stackit.sdk.iaas.v2alpha1api.model.AddVPCRoutingTablePayload + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new cloud.stackit.sdk.iaas.v2alpha1api.model.AddVPCStaticRoutePayload + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new cloud.stackit.sdk.iaas.v2alpha1api.model.AddVPCStaticRoutePayloadDestination + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new cloud.stackit.sdk.iaas.v2alpha1api.model.AddVPCStaticRoutePayloadNexthop + .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new cloud.stackit.sdk.iaas.v2alpha1api.model.CreateNetworkIPv4 .CustomTypeAdapterFactory()); @@ -192,6 +304,12 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new cloud.stackit.sdk.iaas.v2alpha1api.model.CreateNetworkPayload .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new cloud.stackit.sdk.iaas.v2alpha1api.model.CreateVPCPayload + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new cloud.stackit.sdk.iaas.v2alpha1api.model.CreateVPCRegionPayload + .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new cloud.stackit.sdk.iaas.v2alpha1api.model.DestinationCIDRv4 .CustomTypeAdapterFactory()); @@ -211,6 +329,9 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new cloud.stackit.sdk.iaas.v2alpha1api.model.NetworkListResponse .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new cloud.stackit.sdk.iaas.v2alpha1api.model.NetworkRangeIPv4Request + .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new cloud.stackit.sdk.iaas.v2alpha1api.model.NexthopBlackhole .CustomTypeAdapterFactory()); @@ -226,6 +347,18 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new cloud.stackit.sdk.iaas.v2alpha1api.model.PartialUpdateNetworkPayload .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new cloud.stackit.sdk.iaas.v2alpha1api.model.PartialUpdateVPCPayload + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new cloud.stackit.sdk.iaas.v2alpha1api.model.RegionalVPC + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new cloud.stackit.sdk.iaas.v2alpha1api.model.RegionalVPCIPv4 + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new cloud.stackit.sdk.iaas.v2alpha1api.model.RegionalVPCList + .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new cloud.stackit.sdk.iaas.v2alpha1api.model.Route.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( @@ -255,6 +388,43 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new cloud.stackit.sdk.iaas.v2alpha1api.model.UpdateRoutingTableOfAreaPayload .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new cloud.stackit.sdk.iaas.v2alpha1api.model.UpdateVPCRegionPayload + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new cloud.stackit.sdk.iaas.v2alpha1api.model.UpdateVPCRoutingTablePayload + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new cloud.stackit.sdk.iaas.v2alpha1api.model.UpdateVPCStaticRoutePayload + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new cloud.stackit.sdk.iaas.v2alpha1api.model.V1UpdateVPCNetworkRangeIPv4 + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new cloud.stackit.sdk.iaas.v2alpha1api.model.VPC.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new cloud.stackit.sdk.iaas.v2alpha1api.model.VPCBaseNetworkRange + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new cloud.stackit.sdk.iaas.v2alpha1api.model.VPCList.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new cloud.stackit.sdk.iaas.v2alpha1api.model.VPCNetworkRange + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new cloud.stackit.sdk.iaas.v2alpha1api.model.VPCNetworkRangeIPv4 + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new cloud.stackit.sdk.iaas.v2alpha1api.model.VPCNetworkRangeIPv6 + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new cloud.stackit.sdk.iaas.v2alpha1api.model.VPCNetworkRangeList + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new cloud.stackit.sdk.iaas.v2alpha1api.model.VPCRoutingTable + .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new cloud.stackit.sdk.iaas.v2alpha1api.model.VPCRoutingTableList + .CustomTypeAdapterFactory()); gson = gsonBuilder.create(); } diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/api/DefaultApi.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/api/DefaultApi.java index 31d30b90..f4ab33b0 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/api/DefaultApi.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/api/DefaultApi.java @@ -20,16 +20,34 @@ import cloud.stackit.sdk.iaas.v2alpha1api.Pair; import cloud.stackit.sdk.iaas.v2alpha1api.model.AddRoutesToRoutingTablePayload; import cloud.stackit.sdk.iaas.v2alpha1api.model.AddRoutingTableToAreaPayload; +import cloud.stackit.sdk.iaas.v2alpha1api.model.AddVPCRoutingTablePayload; +import cloud.stackit.sdk.iaas.v2alpha1api.model.AddVPCStaticRoutePayload; import cloud.stackit.sdk.iaas.v2alpha1api.model.CreateNetworkPayload; +import cloud.stackit.sdk.iaas.v2alpha1api.model.CreateVPCPayload; +import cloud.stackit.sdk.iaas.v2alpha1api.model.CreateVPCRegionPayload; import cloud.stackit.sdk.iaas.v2alpha1api.model.Network; import cloud.stackit.sdk.iaas.v2alpha1api.model.NetworkListResponse; +import cloud.stackit.sdk.iaas.v2alpha1api.model.NetworkRangeIPv4Request; import cloud.stackit.sdk.iaas.v2alpha1api.model.PartialUpdateNetworkPayload; +import cloud.stackit.sdk.iaas.v2alpha1api.model.PartialUpdateVPCPayload; +import cloud.stackit.sdk.iaas.v2alpha1api.model.RegionalVPC; +import cloud.stackit.sdk.iaas.v2alpha1api.model.RegionalVPCList; import cloud.stackit.sdk.iaas.v2alpha1api.model.Route; import cloud.stackit.sdk.iaas.v2alpha1api.model.RouteListResponse; import cloud.stackit.sdk.iaas.v2alpha1api.model.RoutingTable; import cloud.stackit.sdk.iaas.v2alpha1api.model.RoutingTableListResponse; import cloud.stackit.sdk.iaas.v2alpha1api.model.UpdateRouteOfRoutingTablePayload; import cloud.stackit.sdk.iaas.v2alpha1api.model.UpdateRoutingTableOfAreaPayload; +import cloud.stackit.sdk.iaas.v2alpha1api.model.UpdateVPCRegionPayload; +import cloud.stackit.sdk.iaas.v2alpha1api.model.UpdateVPCRoutingTablePayload; +import cloud.stackit.sdk.iaas.v2alpha1api.model.UpdateVPCStaticRoutePayload; +import cloud.stackit.sdk.iaas.v2alpha1api.model.V1UpdateVPCNetworkRangeIPv4; +import cloud.stackit.sdk.iaas.v2alpha1api.model.VPC; +import cloud.stackit.sdk.iaas.v2alpha1api.model.VPCList; +import cloud.stackit.sdk.iaas.v2alpha1api.model.VPCNetworkRange; +import cloud.stackit.sdk.iaas.v2alpha1api.model.VPCNetworkRangeList; +import cloud.stackit.sdk.iaas.v2alpha1api.model.VPCRoutingTable; +import cloud.stackit.sdk.iaas.v2alpha1api.model.VPCRoutingTableList; import com.google.gson.reflect.TypeToken; import java.io.IOException; import java.lang.reflect.Type; @@ -264,7 +282,8 @@ private okhttp3.Call addRoutesToRoutingTableValidateBeforeCall( } /** - * Create new routes in a routing table. Create new routes in an existing routing table. + * Create new routes in a routing table. Create new routes in an existing routing table of a + * network area. * * @param organizationId The identifier (ID) of a STACKIT Organization. (required) * @param areaId The identifier (ID) of a STACKIT Network Area. (required) @@ -306,7 +325,8 @@ public RouteListResponse addRoutesToRoutingTable( } /** - * Create new routes in a routing table. Create new routes in an existing routing table. + * Create new routes in a routing table. Create new routes in an existing routing table of a + * network area. * * @param organizationId The identifier (ID) of a STACKIT Organization. (required) * @param areaId The identifier (ID) of a STACKIT Network Area. (required) @@ -351,7 +371,7 @@ public ApiResponse addRoutesToRoutingTableWithHttpInfo( /** * Create new routes in a routing table. (asynchronously) Create new routes in an existing - * routing table. + * routing table of a network area. * * @param organizationId The identifier (ID) of a STACKIT Organization. (required) * @param areaId The identifier (ID) of a STACKIT Network Area. (required) @@ -645,11 +665,13 @@ public okhttp3.Call addRoutingTableToAreaAsync( } /** - * Build call for createNetwork + * Build call for addVPCRoutingTable * * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) * @param region The STACKIT Region of the resources. (required) - * @param createNetworkPayload Request a network creation. (required) + * @param addVPCRoutingTablePayload Request an addition of a routing table to a VPC. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -657,19 +679,21 @@ public okhttp3.Call addRoutingTableToAreaAsync( * * * - * + * * * * * * + * * *
Response Details
Status Code Description Response Headers
202 Network create has been accepted. -
201 Adding routing table was successful. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
409 A conflict has occurred. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
*/ - public okhttp3.Call createNetworkCall( + public okhttp3.Call addVPCRoutingTableCall( @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, @javax.annotation.Nonnull String region, - @javax.annotation.Nonnull CreateNetworkPayload createNetworkPayload, + @javax.annotation.Nonnull AddVPCRoutingTablePayload addVPCRoutingTablePayload, final ApiCallback _callback) throws ApiException { String basePath = null; @@ -685,14 +709,17 @@ public okhttp3.Call createNetworkCall( basePath = null; } - Object localVarPostBody = createNetworkPayload; + Object localVarPostBody = addVPCRoutingTablePayload; // create path and map variables String localVarPath = - "/v2alpha1/projects/{projectId}/regions/{region}/networks" + "/v2alpha1/projects/{projectId}/vpcs/{vpcId}/regions/{region}/routing-tables" .replace( "{" + "projectId" + "}", localVarApiClient.escapeString(projectId.toString())) + .replace( + "{" + "vpcId" + "}", + localVarApiClient.escapeString(vpcId.toString())) .replace( "{" + "region" + "}", localVarApiClient.escapeString(region.toString())); @@ -732,113 +759,126 @@ public okhttp3.Call createNetworkCall( } @SuppressWarnings("rawtypes") - private okhttp3.Call createNetworkValidateBeforeCall( + private okhttp3.Call addVPCRoutingTableValidateBeforeCall( @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, @javax.annotation.Nonnull String region, - @javax.annotation.Nonnull CreateNetworkPayload createNetworkPayload, + @javax.annotation.Nonnull AddVPCRoutingTablePayload addVPCRoutingTablePayload, final ApiCallback _callback) throws ApiException { // verify the required parameter 'projectId' is set if (projectId == null) { throw new ApiException( - "Missing the required parameter 'projectId' when calling createNetwork(Async)"); + "Missing the required parameter 'projectId' when calling addVPCRoutingTable(Async)"); + } + + // verify the required parameter 'vpcId' is set + if (vpcId == null) { + throw new ApiException( + "Missing the required parameter 'vpcId' when calling addVPCRoutingTable(Async)"); } // verify the required parameter 'region' is set if (region == null) { throw new ApiException( - "Missing the required parameter 'region' when calling createNetwork(Async)"); + "Missing the required parameter 'region' when calling addVPCRoutingTable(Async)"); } - // verify the required parameter 'createNetworkPayload' is set - if (createNetworkPayload == null) { + // verify the required parameter 'addVPCRoutingTablePayload' is set + if (addVPCRoutingTablePayload == null) { throw new ApiException( - "Missing the required parameter 'createNetworkPayload' when calling createNetwork(Async)"); + "Missing the required parameter 'addVPCRoutingTablePayload' when calling addVPCRoutingTable(Async)"); } - return createNetworkCall(projectId, region, createNetworkPayload, _callback); + return addVPCRoutingTableCall( + projectId, vpcId, region, addVPCRoutingTablePayload, _callback); } /** - * Create new network. Create a new network in a project. `nameservers` will be filled - * from `defaultNameservers` of the respective area if not specified. If the project - * has `internetAccess` enabled and this is the first network in the project this - * might incur cost. + * Create a new regional routing table in a VPC. Create a new routing table in an existing VPC + * for this region. * * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) * @param region The STACKIT Region of the resources. (required) - * @param createNetworkPayload Request a network creation. (required) - * @return Network + * @param addVPCRoutingTablePayload Request an addition of a routing table to a VPC. (required) + * @return VPCRoutingTable * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details * * * - * + * * * * * * + * * *
Response Details
Status Code Description Response Headers
202 Network create has been accepted. -
201 Adding routing table was successful. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
409 A conflict has occurred. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
*/ - public Network createNetwork( + public VPCRoutingTable addVPCRoutingTable( @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, @javax.annotation.Nonnull String region, - @javax.annotation.Nonnull CreateNetworkPayload createNetworkPayload) + @javax.annotation.Nonnull AddVPCRoutingTablePayload addVPCRoutingTablePayload) throws ApiException { - ApiResponse localVarResp = - createNetworkWithHttpInfo(projectId, region, createNetworkPayload); + ApiResponse localVarResp = + addVPCRoutingTableWithHttpInfo(projectId, vpcId, region, addVPCRoutingTablePayload); return localVarResp.getData(); } /** - * Create new network. Create a new network in a project. `nameservers` will be filled - * from `defaultNameservers` of the respective area if not specified. If the project - * has `internetAccess` enabled and this is the first network in the project this - * might incur cost. + * Create a new regional routing table in a VPC. Create a new routing table in an existing VPC + * for this region. * * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) * @param region The STACKIT Region of the resources. (required) - * @param createNetworkPayload Request a network creation. (required) - * @return ApiResponse<Network> + * @param addVPCRoutingTablePayload Request an addition of a routing table to a VPC. (required) + * @return ApiResponse<VPCRoutingTable> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details * * * - * + * * * * * * + * * *
Response Details
Status Code Description Response Headers
202 Network create has been accepted. -
201 Adding routing table was successful. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
409 A conflict has occurred. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
*/ - public ApiResponse createNetworkWithHttpInfo( + public ApiResponse addVPCRoutingTableWithHttpInfo( @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, @javax.annotation.Nonnull String region, - @javax.annotation.Nonnull CreateNetworkPayload createNetworkPayload) + @javax.annotation.Nonnull AddVPCRoutingTablePayload addVPCRoutingTablePayload) throws ApiException { okhttp3.Call localVarCall = - createNetworkValidateBeforeCall(projectId, region, createNetworkPayload, null); - Type localVarReturnType = new TypeToken() {}.getType(); + addVPCRoutingTableValidateBeforeCall( + projectId, vpcId, region, addVPCRoutingTablePayload, null); + Type localVarReturnType = new TypeToken() {}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * Create new network. (asynchronously) Create a new network in a project. - * `nameservers` will be filled from `defaultNameservers` of the respective - * area if not specified. If the project has `internetAccess` enabled and this is the - * first network in the project this might incur cost. + * Create a new regional routing table in a VPC. (asynchronously) Create a new routing table in + * an existing VPC for this region. * * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) * @param region The STACKIT Region of the resources. (required) - * @param createNetworkPayload Request a network creation. (required) + * @param addVPCRoutingTablePayload Request an addition of a routing table to a VPC. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body @@ -847,35 +887,41 @@ public ApiResponse createNetworkWithHttpInfo( * * * - * + * * * * * * + * * *
Response Details
Status Code Description Response Headers
202 Network create has been accepted. -
201 Adding routing table was successful. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
409 A conflict has occurred. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
*/ - public okhttp3.Call createNetworkAsync( + public okhttp3.Call addVPCRoutingTableAsync( @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, @javax.annotation.Nonnull String region, - @javax.annotation.Nonnull CreateNetworkPayload createNetworkPayload, - final ApiCallback _callback) + @javax.annotation.Nonnull AddVPCRoutingTablePayload addVPCRoutingTablePayload, + final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = - createNetworkValidateBeforeCall(projectId, region, createNetworkPayload, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + addVPCRoutingTableValidateBeforeCall( + projectId, vpcId, region, addVPCRoutingTablePayload, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for deleteNetwork + * Build call for addVPCStaticRoute * * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) * @param region The STACKIT Region of the resources. (required) - * @param networkId The identifier (ID) of a STACKIT Network. (required) + * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) + * @param addVPCStaticRoutePayload Request to add a static route to a VPC. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -883,19 +929,22 @@ public okhttp3.Call createNetworkAsync( * * * - * + * * * * * * + * * *
Response Details
Status Code Description Response Headers
202 Delete request for network has been accepted. -
201 Adding static route was successful. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
409 A conflict has occurred. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
*/ - public okhttp3.Call deleteNetworkCall( + public okhttp3.Call addVPCStaticRouteCall( @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, @javax.annotation.Nonnull String region, - @javax.annotation.Nonnull UUID networkId, + @javax.annotation.Nonnull UUID routingTableId, + @javax.annotation.Nonnull AddVPCStaticRoutePayload addVPCStaticRoutePayload, final ApiCallback _callback) throws ApiException { String basePath = null; @@ -911,20 +960,23 @@ public okhttp3.Call deleteNetworkCall( basePath = null; } - Object localVarPostBody = null; + Object localVarPostBody = addVPCStaticRoutePayload; // create path and map variables String localVarPath = - "/v2alpha1/projects/{projectId}/regions/{region}/networks/{networkId}" + "/v2alpha1/projects/{projectId}/vpcs/{vpcId}/regions/{region}/routing-tables/{routingTableId}/static-routes" .replace( "{" + "projectId" + "}", localVarApiClient.escapeString(projectId.toString())) + .replace( + "{" + "vpcId" + "}", + localVarApiClient.escapeString(vpcId.toString())) .replace( "{" + "region" + "}", localVarApiClient.escapeString(region.toString())) .replace( - "{" + "networkId" + "}", - localVarApiClient.escapeString(networkId.toString())); + "{" + "routingTableId" + "}", + localVarApiClient.escapeString(routingTableId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -938,7 +990,7 @@ public okhttp3.Call deleteNetworkCall( localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {}; + final String[] localVarContentTypes = {"application/json"}; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -949,7 +1001,7 @@ public okhttp3.Call deleteNetworkCall( return localVarApiClient.buildCall( basePath, localVarPath, - "DELETE", + "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, @@ -961,101 +1013,137 @@ public okhttp3.Call deleteNetworkCall( } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteNetworkValidateBeforeCall( + private okhttp3.Call addVPCStaticRouteValidateBeforeCall( @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, @javax.annotation.Nonnull String region, - @javax.annotation.Nonnull UUID networkId, + @javax.annotation.Nonnull UUID routingTableId, + @javax.annotation.Nonnull AddVPCStaticRoutePayload addVPCStaticRoutePayload, final ApiCallback _callback) throws ApiException { // verify the required parameter 'projectId' is set if (projectId == null) { throw new ApiException( - "Missing the required parameter 'projectId' when calling deleteNetwork(Async)"); + "Missing the required parameter 'projectId' when calling addVPCStaticRoute(Async)"); + } + + // verify the required parameter 'vpcId' is set + if (vpcId == null) { + throw new ApiException( + "Missing the required parameter 'vpcId' when calling addVPCStaticRoute(Async)"); } // verify the required parameter 'region' is set if (region == null) { throw new ApiException( - "Missing the required parameter 'region' when calling deleteNetwork(Async)"); + "Missing the required parameter 'region' when calling addVPCStaticRoute(Async)"); } - // verify the required parameter 'networkId' is set - if (networkId == null) { + // verify the required parameter 'routingTableId' is set + if (routingTableId == null) { throw new ApiException( - "Missing the required parameter 'networkId' when calling deleteNetwork(Async)"); + "Missing the required parameter 'routingTableId' when calling addVPCStaticRoute(Async)"); } - return deleteNetworkCall(projectId, region, networkId, _callback); + // verify the required parameter 'addVPCStaticRoutePayload' is set + if (addVPCStaticRoutePayload == null) { + throw new ApiException( + "Missing the required parameter 'addVPCStaticRoutePayload' when calling addVPCStaticRoute(Async)"); + } + + return addVPCStaticRouteCall( + projectId, vpcId, region, routingTableId, addVPCStaticRoutePayload, _callback); } /** - * Delete network. Delete a network. If the network is still in use, the deletion will fail. + * Create new regional static route. Create a new static route in the VPC for this region. * * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) * @param region The STACKIT Region of the resources. (required) - * @param networkId The identifier (ID) of a STACKIT Network. (required) + * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) + * @param addVPCStaticRoutePayload Request to add a static route to a VPC. (required) + * @return Route * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details * * * - * + * * * * * * + * * *
Response Details
Status Code Description Response Headers
202 Delete request for network has been accepted. -
201 Adding static route was successful. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
409 A conflict has occurred. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
*/ - public void deleteNetwork( + public Route addVPCStaticRoute( @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, @javax.annotation.Nonnull String region, - @javax.annotation.Nonnull UUID networkId) + @javax.annotation.Nonnull UUID routingTableId, + @javax.annotation.Nonnull AddVPCStaticRoutePayload addVPCStaticRoutePayload) throws ApiException { - deleteNetworkWithHttpInfo(projectId, region, networkId); + ApiResponse localVarResp = + addVPCStaticRouteWithHttpInfo( + projectId, vpcId, region, routingTableId, addVPCStaticRoutePayload); + return localVarResp.getData(); } /** - * Delete network. Delete a network. If the network is still in use, the deletion will fail. + * Create new regional static route. Create a new static route in the VPC for this region. * * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) * @param region The STACKIT Region of the resources. (required) - * @param networkId The identifier (ID) of a STACKIT Network. (required) - * @return ApiResponse<Void> + * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) + * @param addVPCStaticRoutePayload Request to add a static route to a VPC. (required) + * @return ApiResponse<Route> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details * * * - * + * * * * * * + * * *
Response Details
Status Code Description Response Headers
202 Delete request for network has been accepted. -
201 Adding static route was successful. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
409 A conflict has occurred. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
*/ - public ApiResponse deleteNetworkWithHttpInfo( + public ApiResponse addVPCStaticRouteWithHttpInfo( @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, @javax.annotation.Nonnull String region, - @javax.annotation.Nonnull UUID networkId) + @javax.annotation.Nonnull UUID routingTableId, + @javax.annotation.Nonnull AddVPCStaticRoutePayload addVPCStaticRoutePayload) throws ApiException { okhttp3.Call localVarCall = - deleteNetworkValidateBeforeCall(projectId, region, networkId, null); - return localVarApiClient.execute(localVarCall); + addVPCStaticRouteValidateBeforeCall( + projectId, vpcId, region, routingTableId, addVPCStaticRoutePayload, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * Delete network. (asynchronously) Delete a network. If the network is still in use, the - * deletion will fail. + * Create new regional static route. (asynchronously) Create a new static route in the VPC for + * this region. * * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) * @param region The STACKIT Region of the resources. (required) - * @param networkId The identifier (ID) of a STACKIT Network. (required) + * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) + * @param addVPCStaticRoutePayload Request to add a static route to a VPC. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body @@ -1064,36 +1152,44 @@ public ApiResponse deleteNetworkWithHttpInfo( * * * - * + * * * * * * + * * *
Response Details
Status Code Description Response Headers
202 Delete request for network has been accepted. -
201 Adding static route was successful. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
409 A conflict has occurred. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
*/ - public okhttp3.Call deleteNetworkAsync( + public okhttp3.Call addVPCStaticRouteAsync( @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, @javax.annotation.Nonnull String region, - @javax.annotation.Nonnull UUID networkId, - final ApiCallback _callback) + @javax.annotation.Nonnull UUID routingTableId, + @javax.annotation.Nonnull AddVPCStaticRoutePayload addVPCStaticRoutePayload, + final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = - deleteNetworkValidateBeforeCall(projectId, region, networkId, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); + addVPCStaticRouteValidateBeforeCall( + projectId, + vpcId, + region, + routingTableId, + addVPCStaticRoutePayload, + _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for deleteRouteFromRoutingTable + * Build call for createNetwork * - * @param organizationId The identifier (ID) of a STACKIT Organization. (required) - * @param areaId The identifier (ID) of a STACKIT Network Area. (required) + * @param projectId The identifier (ID) of a STACKIT Project. (required) * @param region The STACKIT Region of the resources. (required) - * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) - * @param routeId The identifier (ID) of a STACKIT Route. (required) + * @param createNetworkPayload Request a network creation. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -1101,20 +1197,19 @@ public okhttp3.Call deleteNetworkAsync( * * * - * + * * * * * + * * *
Response Details
Status Code Description Response Headers
204 Delete request for the route has been accepted. -
202 Network create has been accepted. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
409 A conflict has occurred. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
*/ - public okhttp3.Call deleteRouteFromRoutingTableCall( - @javax.annotation.Nonnull UUID organizationId, - @javax.annotation.Nonnull UUID areaId, + public okhttp3.Call createNetworkCall( + @javax.annotation.Nonnull UUID projectId, @javax.annotation.Nonnull String region, - @javax.annotation.Nonnull UUID routingTableId, - @javax.annotation.Nonnull UUID routeId, + @javax.annotation.Nonnull CreateNetworkPayload createNetworkPayload, final ApiCallback _callback) throws ApiException { String basePath = null; @@ -1130,26 +1225,17 @@ public okhttp3.Call deleteRouteFromRoutingTableCall( basePath = null; } - Object localVarPostBody = null; + Object localVarPostBody = createNetworkPayload; // create path and map variables String localVarPath = - "/v2alpha1/organizations/{organizationId}/network-areas/{areaId}/regions/{region}/routing-tables/{routingTableId}/routes/{routeId}" - .replace( - "{" + "organizationId" + "}", - localVarApiClient.escapeString(organizationId.toString())) + "/v2alpha1/projects/{projectId}/regions/{region}/networks" .replace( - "{" + "areaId" + "}", - localVarApiClient.escapeString(areaId.toString())) + "{" + "projectId" + "}", + localVarApiClient.escapeString(projectId.toString())) .replace( "{" + "region" + "}", - localVarApiClient.escapeString(region.toString())) - .replace( - "{" + "routingTableId" + "}", - localVarApiClient.escapeString(routingTableId.toString())) - .replace( - "{" + "routeId" + "}", - localVarApiClient.escapeString(routeId.toString())); + localVarApiClient.escapeString(region.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1163,7 +1249,7 @@ public okhttp3.Call deleteRouteFromRoutingTableCall( localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {}; + final String[] localVarContentTypes = {"application/json"}; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -1174,7 +1260,7 @@ public okhttp3.Call deleteRouteFromRoutingTableCall( return localVarApiClient.buildCall( basePath, localVarPath, - "DELETE", + "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, @@ -1186,126 +1272,113 @@ public okhttp3.Call deleteRouteFromRoutingTableCall( } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteRouteFromRoutingTableValidateBeforeCall( - @javax.annotation.Nonnull UUID organizationId, - @javax.annotation.Nonnull UUID areaId, + private okhttp3.Call createNetworkValidateBeforeCall( + @javax.annotation.Nonnull UUID projectId, @javax.annotation.Nonnull String region, - @javax.annotation.Nonnull UUID routingTableId, - @javax.annotation.Nonnull UUID routeId, + @javax.annotation.Nonnull CreateNetworkPayload createNetworkPayload, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'organizationId' is set - if (organizationId == null) { - throw new ApiException( - "Missing the required parameter 'organizationId' when calling deleteRouteFromRoutingTable(Async)"); - } - - // verify the required parameter 'areaId' is set - if (areaId == null) { + // verify the required parameter 'projectId' is set + if (projectId == null) { throw new ApiException( - "Missing the required parameter 'areaId' when calling deleteRouteFromRoutingTable(Async)"); + "Missing the required parameter 'projectId' when calling createNetwork(Async)"); } // verify the required parameter 'region' is set if (region == null) { throw new ApiException( - "Missing the required parameter 'region' when calling deleteRouteFromRoutingTable(Async)"); - } - - // verify the required parameter 'routingTableId' is set - if (routingTableId == null) { - throw new ApiException( - "Missing the required parameter 'routingTableId' when calling deleteRouteFromRoutingTable(Async)"); + "Missing the required parameter 'region' when calling createNetwork(Async)"); } - // verify the required parameter 'routeId' is set - if (routeId == null) { + // verify the required parameter 'createNetworkPayload' is set + if (createNetworkPayload == null) { throw new ApiException( - "Missing the required parameter 'routeId' when calling deleteRouteFromRoutingTable(Async)"); + "Missing the required parameter 'createNetworkPayload' when calling createNetwork(Async)"); } - return deleteRouteFromRoutingTableCall( - organizationId, areaId, region, routingTableId, routeId, _callback); + return createNetworkCall(projectId, region, createNetworkPayload, _callback); } /** - * Delete a route in a routing table. Delete a route in an existing routing table. + * Create new network. Create a new network in a project. `nameservers` will be filled + * from `defaultNameservers` of the respective area if not specified. If the project + * has `internetAccess` enabled and this is the first network in the project this + * might incur cost. * - * @param organizationId The identifier (ID) of a STACKIT Organization. (required) - * @param areaId The identifier (ID) of a STACKIT Network Area. (required) + * @param projectId The identifier (ID) of a STACKIT Project. (required) * @param region The STACKIT Region of the resources. (required) - * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) - * @param routeId The identifier (ID) of a STACKIT Route. (required) + * @param createNetworkPayload Request a network creation. (required) + * @return Network * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details * * * - * + * * * * * + * * *
Response Details
Status Code Description Response Headers
204 Delete request for the route has been accepted. -
202 Network create has been accepted. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
409 A conflict has occurred. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
*/ - public void deleteRouteFromRoutingTable( - @javax.annotation.Nonnull UUID organizationId, - @javax.annotation.Nonnull UUID areaId, + public Network createNetwork( + @javax.annotation.Nonnull UUID projectId, @javax.annotation.Nonnull String region, - @javax.annotation.Nonnull UUID routingTableId, - @javax.annotation.Nonnull UUID routeId) + @javax.annotation.Nonnull CreateNetworkPayload createNetworkPayload) throws ApiException { - deleteRouteFromRoutingTableWithHttpInfo( - organizationId, areaId, region, routingTableId, routeId); + ApiResponse localVarResp = + createNetworkWithHttpInfo(projectId, region, createNetworkPayload); + return localVarResp.getData(); } /** - * Delete a route in a routing table. Delete a route in an existing routing table. + * Create new network. Create a new network in a project. `nameservers` will be filled + * from `defaultNameservers` of the respective area if not specified. If the project + * has `internetAccess` enabled and this is the first network in the project this + * might incur cost. * - * @param organizationId The identifier (ID) of a STACKIT Organization. (required) - * @param areaId The identifier (ID) of a STACKIT Network Area. (required) + * @param projectId The identifier (ID) of a STACKIT Project. (required) * @param region The STACKIT Region of the resources. (required) - * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) - * @param routeId The identifier (ID) of a STACKIT Route. (required) - * @return ApiResponse<Void> + * @param createNetworkPayload Request a network creation. (required) + * @return ApiResponse<Network> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details * * * - * + * * * * * + * * *
Response Details
Status Code Description Response Headers
204 Delete request for the route has been accepted. -
202 Network create has been accepted. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
409 A conflict has occurred. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
*/ - public ApiResponse deleteRouteFromRoutingTableWithHttpInfo( - @javax.annotation.Nonnull UUID organizationId, - @javax.annotation.Nonnull UUID areaId, + public ApiResponse createNetworkWithHttpInfo( + @javax.annotation.Nonnull UUID projectId, @javax.annotation.Nonnull String region, - @javax.annotation.Nonnull UUID routingTableId, - @javax.annotation.Nonnull UUID routeId) + @javax.annotation.Nonnull CreateNetworkPayload createNetworkPayload) throws ApiException { okhttp3.Call localVarCall = - deleteRouteFromRoutingTableValidateBeforeCall( - organizationId, areaId, region, routingTableId, routeId, null); - return localVarApiClient.execute(localVarCall); + createNetworkValidateBeforeCall(projectId, region, createNetworkPayload, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * Delete a route in a routing table. (asynchronously) Delete a route in an existing routing - * table. + * Create new network. (asynchronously) Create a new network in a project. + * `nameservers` will be filled from `defaultNameservers` of the respective + * area if not specified. If the project has `internetAccess` enabled and this is the + * first network in the project this might incur cost. * - * @param organizationId The identifier (ID) of a STACKIT Organization. (required) - * @param areaId The identifier (ID) of a STACKIT Network Area. (required) + * @param projectId The identifier (ID) of a STACKIT Project. (required) * @param region The STACKIT Region of the resources. (required) - * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) - * @param routeId The identifier (ID) of a STACKIT Route. (required) + * @param createNetworkPayload Request a network creation. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body @@ -1314,37 +1387,34 @@ public ApiResponse deleteRouteFromRoutingTableWithHttpInfo( * * * - * + * * * * * + * * *
Response Details
Status Code Description Response Headers
204 Delete request for the route has been accepted. -
202 Network create has been accepted. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
409 A conflict has occurred. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
*/ - public okhttp3.Call deleteRouteFromRoutingTableAsync( - @javax.annotation.Nonnull UUID organizationId, - @javax.annotation.Nonnull UUID areaId, + public okhttp3.Call createNetworkAsync( + @javax.annotation.Nonnull UUID projectId, @javax.annotation.Nonnull String region, - @javax.annotation.Nonnull UUID routingTableId, - @javax.annotation.Nonnull UUID routeId, - final ApiCallback _callback) + @javax.annotation.Nonnull CreateNetworkPayload createNetworkPayload, + final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = - deleteRouteFromRoutingTableValidateBeforeCall( - organizationId, areaId, region, routingTableId, routeId, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); + createNetworkValidateBeforeCall(projectId, region, createNetworkPayload, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for deleteRoutingTableFromArea + * Build call for createVPC * - * @param organizationId The identifier (ID) of a STACKIT Organization. (required) - * @param areaId The identifier (ID) of a STACKIT Network Area. (required) - * @param region The STACKIT Region of the resources. (required) - * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param createVPCPayload Request a VPC creation. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -1352,7 +1422,7 @@ public okhttp3.Call deleteRouteFromRoutingTableAsync( * * * - * + * * * * @@ -1360,11 +1430,9 @@ public okhttp3.Call deleteRouteFromRoutingTableAsync( * *
Response Details
Status Code Description Response Headers
204 Delete request for the routing table has been accepted. -
201 VPC has been successfully created. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
*/ - public okhttp3.Call deleteRoutingTableFromAreaCall( - @javax.annotation.Nonnull UUID organizationId, - @javax.annotation.Nonnull UUID areaId, - @javax.annotation.Nonnull String region, - @javax.annotation.Nonnull UUID routingTableId, + public okhttp3.Call createVPCCall( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull CreateVPCPayload createVPCPayload, final ApiCallback _callback) throws ApiException { String basePath = null; @@ -1380,23 +1448,14 @@ public okhttp3.Call deleteRoutingTableFromAreaCall( basePath = null; } - Object localVarPostBody = null; + Object localVarPostBody = createVPCPayload; // create path and map variables String localVarPath = - "/v2alpha1/organizations/{organizationId}/network-areas/{areaId}/regions/{region}/routing-tables/{routingTableId}" + "/v2alpha1/projects/{projectId}/vpcs" .replace( - "{" + "organizationId" + "}", - localVarApiClient.escapeString(organizationId.toString())) - .replace( - "{" + "areaId" + "}", - localVarApiClient.escapeString(areaId.toString())) - .replace( - "{" + "region" + "}", - localVarApiClient.escapeString(region.toString())) - .replace( - "{" + "routingTableId" + "}", - localVarApiClient.escapeString(routingTableId.toString())); + "{" + "projectId" + "}", + localVarApiClient.escapeString(projectId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1410,7 +1469,7 @@ public okhttp3.Call deleteRoutingTableFromAreaCall( localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {}; + final String[] localVarContentTypes = {"application/json"}; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -1421,7 +1480,7 @@ public okhttp3.Call deleteRoutingTableFromAreaCall( return localVarApiClient.buildCall( basePath, localVarPath, - "DELETE", + "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, @@ -1433,55 +1492,39 @@ public okhttp3.Call deleteRoutingTableFromAreaCall( } @SuppressWarnings("rawtypes") - private okhttp3.Call deleteRoutingTableFromAreaValidateBeforeCall( - @javax.annotation.Nonnull UUID organizationId, - @javax.annotation.Nonnull UUID areaId, - @javax.annotation.Nonnull String region, - @javax.annotation.Nonnull UUID routingTableId, + private okhttp3.Call createVPCValidateBeforeCall( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull CreateVPCPayload createVPCPayload, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'organizationId' is set - if (organizationId == null) { - throw new ApiException( - "Missing the required parameter 'organizationId' when calling deleteRoutingTableFromArea(Async)"); - } - - // verify the required parameter 'areaId' is set - if (areaId == null) { - throw new ApiException( - "Missing the required parameter 'areaId' when calling deleteRoutingTableFromArea(Async)"); - } - - // verify the required parameter 'region' is set - if (region == null) { + // verify the required parameter 'projectId' is set + if (projectId == null) { throw new ApiException( - "Missing the required parameter 'region' when calling deleteRoutingTableFromArea(Async)"); + "Missing the required parameter 'projectId' when calling createVPC(Async)"); } - // verify the required parameter 'routingTableId' is set - if (routingTableId == null) { + // verify the required parameter 'createVPCPayload' is set + if (createVPCPayload == null) { throw new ApiException( - "Missing the required parameter 'routingTableId' when calling deleteRoutingTableFromArea(Async)"); + "Missing the required parameter 'createVPCPayload' when calling createVPC(Async)"); } - return deleteRoutingTableFromAreaCall( - organizationId, areaId, region, routingTableId, _callback); + return createVPCCall(projectId, createVPCPayload, _callback); } /** - * Delete a routing table. Delete a routing table of a network area. + * Create a new VPC. Create a new VPC in a project. * - * @param organizationId The identifier (ID) of a STACKIT Organization. (required) - * @param areaId The identifier (ID) of a STACKIT Network Area. (required) - * @param region The STACKIT Region of the resources. (required) - * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param createVPCPayload Request a VPC creation. (required) + * @return VPC * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details * * * - * + * * * * @@ -1489,30 +1532,27 @@ private okhttp3.Call deleteRoutingTableFromAreaValidateBeforeCall( * *
Response Details
Status Code Description Response Headers
204 Delete request for the routing table has been accepted. -
201 VPC has been successfully created. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
*/ - public void deleteRoutingTableFromArea( - @javax.annotation.Nonnull UUID organizationId, - @javax.annotation.Nonnull UUID areaId, - @javax.annotation.Nonnull String region, - @javax.annotation.Nonnull UUID routingTableId) + public VPC createVPC( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull CreateVPCPayload createVPCPayload) throws ApiException { - deleteRoutingTableFromAreaWithHttpInfo(organizationId, areaId, region, routingTableId); + ApiResponse localVarResp = createVPCWithHttpInfo(projectId, createVPCPayload); + return localVarResp.getData(); } /** - * Delete a routing table. Delete a routing table of a network area. + * Create a new VPC. Create a new VPC in a project. * - * @param organizationId The identifier (ID) of a STACKIT Organization. (required) - * @param areaId The identifier (ID) of a STACKIT Network Area. (required) - * @param region The STACKIT Region of the resources. (required) - * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) - * @return ApiResponse<Void> + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param createVPCPayload Request a VPC creation. (required) + * @return ApiResponse<VPC> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details * * * - * + * * * * @@ -1520,25 +1560,20 @@ public void deleteRoutingTableFromArea( * *
Response Details
Status Code Description Response Headers
204 Delete request for the routing table has been accepted. -
201 VPC has been successfully created. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
*/ - public ApiResponse deleteRoutingTableFromAreaWithHttpInfo( - @javax.annotation.Nonnull UUID organizationId, - @javax.annotation.Nonnull UUID areaId, - @javax.annotation.Nonnull String region, - @javax.annotation.Nonnull UUID routingTableId) + public ApiResponse createVPCWithHttpInfo( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull CreateVPCPayload createVPCPayload) throws ApiException { - okhttp3.Call localVarCall = - deleteRoutingTableFromAreaValidateBeforeCall( - organizationId, areaId, region, routingTableId, null); - return localVarApiClient.execute(localVarCall); + okhttp3.Call localVarCall = createVPCValidateBeforeCall(projectId, createVPCPayload, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * Delete a routing table. (asynchronously) Delete a routing table of a network area. + * Create a new VPC. (asynchronously) Create a new VPC in a project. * - * @param organizationId The identifier (ID) of a STACKIT Organization. (required) - * @param areaId The identifier (ID) of a STACKIT Network Area. (required) - * @param region The STACKIT Region of the resources. (required) - * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param createVPCPayload Request a VPC creation. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body @@ -1547,7 +1582,7 @@ public ApiResponse deleteRoutingTableFromAreaWithHttpInfo( * * * - * + * * * * @@ -1555,27 +1590,27 @@ public ApiResponse deleteRoutingTableFromAreaWithHttpInfo( * *
Response Details
Status Code Description Response Headers
204 Delete request for the routing table has been accepted. -
201 VPC has been successfully created. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
*/ - public okhttp3.Call deleteRoutingTableFromAreaAsync( - @javax.annotation.Nonnull UUID organizationId, - @javax.annotation.Nonnull UUID areaId, - @javax.annotation.Nonnull String region, - @javax.annotation.Nonnull UUID routingTableId, - final ApiCallback _callback) + public okhttp3.Call createVPCAsync( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull CreateVPCPayload createVPCPayload, + final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = - deleteRoutingTableFromAreaValidateBeforeCall( - organizationId, areaId, region, routingTableId, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); + createVPCValidateBeforeCall(projectId, createVPCPayload, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for getNetwork + * Build call for createVPCNetworkRange * * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) * @param region The STACKIT Region of the resources. (required) - * @param networkId The identifier (ID) of a STACKIT Network. (required) + * @param body Request to add an additional network range to a VPC. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -1583,18 +1618,21 @@ public okhttp3.Call deleteRoutingTableFromAreaAsync( * * * - * + * * * * * + * + * * *
Response Details
Status Code Description Response Headers
200 Show network details. -
202 Create request for a network range has been accepted. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
409 A conflict has occurred. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
*/ - public okhttp3.Call getNetworkCall( + public okhttp3.Call createVPCNetworkRangeCall( @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, @javax.annotation.Nonnull String region, - @javax.annotation.Nonnull UUID networkId, + @javax.annotation.Nonnull NetworkRangeIPv4Request body, final ApiCallback _callback) throws ApiException { String basePath = null; @@ -1610,20 +1648,20 @@ public okhttp3.Call getNetworkCall( basePath = null; } - Object localVarPostBody = null; + Object localVarPostBody = body; // create path and map variables String localVarPath = - "/v2alpha1/projects/{projectId}/regions/{region}/networks/{networkId}" + "/v2alpha1/projects/{projectId}/vpcs/{vpcId}/regions/{region}/network-ranges" .replace( "{" + "projectId" + "}", localVarApiClient.escapeString(projectId.toString())) .replace( - "{" + "region" + "}", - localVarApiClient.escapeString(region.toString())) + "{" + "vpcId" + "}", + localVarApiClient.escapeString(vpcId.toString())) .replace( - "{" + "networkId" + "}", - localVarApiClient.escapeString(networkId.toString())); + "{" + "region" + "}", + localVarApiClient.escapeString(region.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1637,7 +1675,7 @@ public okhttp3.Call getNetworkCall( localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {}; + final String[] localVarContentTypes = {"application/json"}; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -1648,7 +1686,7 @@ public okhttp3.Call getNetworkCall( return localVarApiClient.buildCall( basePath, localVarPath, - "GET", + "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, @@ -1660,101 +1698,124 @@ public okhttp3.Call getNetworkCall( } @SuppressWarnings("rawtypes") - private okhttp3.Call getNetworkValidateBeforeCall( + private okhttp3.Call createVPCNetworkRangeValidateBeforeCall( @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, @javax.annotation.Nonnull String region, - @javax.annotation.Nonnull UUID networkId, + @javax.annotation.Nonnull NetworkRangeIPv4Request body, final ApiCallback _callback) throws ApiException { // verify the required parameter 'projectId' is set if (projectId == null) { throw new ApiException( - "Missing the required parameter 'projectId' when calling getNetwork(Async)"); + "Missing the required parameter 'projectId' when calling createVPCNetworkRange(Async)"); + } + + // verify the required parameter 'vpcId' is set + if (vpcId == null) { + throw new ApiException( + "Missing the required parameter 'vpcId' when calling createVPCNetworkRange(Async)"); } // verify the required parameter 'region' is set if (region == null) { throw new ApiException( - "Missing the required parameter 'region' when calling getNetwork(Async)"); + "Missing the required parameter 'region' when calling createVPCNetworkRange(Async)"); } - // verify the required parameter 'networkId' is set - if (networkId == null) { + // verify the required parameter 'body' is set + if (body == null) { throw new ApiException( - "Missing the required parameter 'networkId' when calling getNetwork(Async)"); + "Missing the required parameter 'body' when calling createVPCNetworkRange(Async)"); } - return getNetworkCall(projectId, region, networkId, _callback); + return createVPCNetworkRangeCall(projectId, vpcId, region, body, _callback); } /** - * Get network details. Get details about a network of a project. + * Create new regional network ranges in a VPC. Create a new network range in an existing VPC + * for this region. * * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) * @param region The STACKIT Region of the resources. (required) - * @param networkId The identifier (ID) of a STACKIT Network. (required) - * @return Network + * @param body Request to add an additional network range to a VPC. (required) + * @return VPCNetworkRange * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details * * * - * + * * * * * + * + * * *
Response Details
Status Code Description Response Headers
200 Show network details. -
202 Create request for a network range has been accepted. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
409 A conflict has occurred. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
*/ - public Network getNetwork( + public VPCNetworkRange createVPCNetworkRange( @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, @javax.annotation.Nonnull String region, - @javax.annotation.Nonnull UUID networkId) + @javax.annotation.Nonnull NetworkRangeIPv4Request body) throws ApiException { - ApiResponse localVarResp = getNetworkWithHttpInfo(projectId, region, networkId); + ApiResponse localVarResp = + createVPCNetworkRangeWithHttpInfo(projectId, vpcId, region, body); return localVarResp.getData(); } /** - * Get network details. Get details about a network of a project. + * Create new regional network ranges in a VPC. Create a new network range in an existing VPC + * for this region. * * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) * @param region The STACKIT Region of the resources. (required) - * @param networkId The identifier (ID) of a STACKIT Network. (required) - * @return ApiResponse<Network> + * @param body Request to add an additional network range to a VPC. (required) + * @return ApiResponse<VPCNetworkRange> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details * * * - * + * * * * * + * + * * *
Response Details
Status Code Description Response Headers
200 Show network details. -
202 Create request for a network range has been accepted. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
409 A conflict has occurred. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
*/ - public ApiResponse getNetworkWithHttpInfo( + public ApiResponse createVPCNetworkRangeWithHttpInfo( @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, @javax.annotation.Nonnull String region, - @javax.annotation.Nonnull UUID networkId) + @javax.annotation.Nonnull NetworkRangeIPv4Request body) throws ApiException { okhttp3.Call localVarCall = - getNetworkValidateBeforeCall(projectId, region, networkId, null); - Type localVarReturnType = new TypeToken() {}.getType(); + createVPCNetworkRangeValidateBeforeCall(projectId, vpcId, region, body, null); + Type localVarReturnType = new TypeToken() {}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * Get network details. (asynchronously) Get details about a network of a project. + * Create new regional network ranges in a VPC. (asynchronously) Create a new network range in + * an existing VPC for this region. * * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) * @param region The STACKIT Region of the resources. (required) - * @param networkId The identifier (ID) of a STACKIT Network. (required) + * @param body Request to add an additional network range to a VPC. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body @@ -1763,36 +1824,39 @@ public ApiResponse getNetworkWithHttpInfo( * * * - * + * * * * * + * + * * *
Response Details
Status Code Description Response Headers
200 Show network details. -
202 Create request for a network range has been accepted. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
409 A conflict has occurred. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
*/ - public okhttp3.Call getNetworkAsync( + public okhttp3.Call createVPCNetworkRangeAsync( @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, @javax.annotation.Nonnull String region, - @javax.annotation.Nonnull UUID networkId, - final ApiCallback _callback) + @javax.annotation.Nonnull NetworkRangeIPv4Request body, + final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = - getNetworkValidateBeforeCall(projectId, region, networkId, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + createVPCNetworkRangeValidateBeforeCall(projectId, vpcId, region, body, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for getRouteOfRoutingTable + * Build call for createVPCRegion * - * @param organizationId The identifier (ID) of a STACKIT Organization. (required) - * @param areaId The identifier (ID) of a STACKIT Network Area. (required) + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) * @param region The STACKIT Region of the resources. (required) - * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) - * @param routeId The identifier (ID) of a STACKIT Route. (required) + * @param createVPCRegionPayload Request to add a new regional VPC configuration. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -1800,20 +1864,21 @@ public okhttp3.Call getNetworkAsync( * * * - * + * * * * * + * + * * *
Response Details
Status Code Description Response Headers
200 Show the details of a route in a routing table. -
202 Configure VPC in a new region was accepted. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
409 A conflict has occurred. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
*/ - public okhttp3.Call getRouteOfRoutingTableCall( - @javax.annotation.Nonnull UUID organizationId, - @javax.annotation.Nonnull UUID areaId, + public okhttp3.Call createVPCRegionCall( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, @javax.annotation.Nonnull String region, - @javax.annotation.Nonnull UUID routingTableId, - @javax.annotation.Nonnull UUID routeId, + @javax.annotation.Nonnull CreateVPCRegionPayload createVPCRegionPayload, final ApiCallback _callback) throws ApiException { String basePath = null; @@ -1829,26 +1894,20 @@ public okhttp3.Call getRouteOfRoutingTableCall( basePath = null; } - Object localVarPostBody = null; + Object localVarPostBody = createVPCRegionPayload; // create path and map variables String localVarPath = - "/v2alpha1/organizations/{organizationId}/network-areas/{areaId}/regions/{region}/routing-tables/{routingTableId}/routes/{routeId}" + "/v2alpha1/projects/{projectId}/vpcs/{vpcId}/regions/{region}" .replace( - "{" + "organizationId" + "}", - localVarApiClient.escapeString(organizationId.toString())) + "{" + "projectId" + "}", + localVarApiClient.escapeString(projectId.toString())) .replace( - "{" + "areaId" + "}", - localVarApiClient.escapeString(areaId.toString())) + "{" + "vpcId" + "}", + localVarApiClient.escapeString(vpcId.toString())) .replace( "{" + "region" + "}", - localVarApiClient.escapeString(region.toString())) - .replace( - "{" + "routingTableId" + "}", - localVarApiClient.escapeString(routingTableId.toString())) - .replace( - "{" + "routeId" + "}", - localVarApiClient.escapeString(routeId.toString())); + localVarApiClient.escapeString(region.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1862,7 +1921,7 @@ public okhttp3.Call getRouteOfRoutingTableCall( localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {}; + final String[] localVarContentTypes = {"application/json"}; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -1873,7 +1932,7 @@ public okhttp3.Call getRouteOfRoutingTableCall( return localVarApiClient.buildCall( basePath, localVarPath, - "GET", + "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, @@ -1885,132 +1944,123 @@ public okhttp3.Call getRouteOfRoutingTableCall( } @SuppressWarnings("rawtypes") - private okhttp3.Call getRouteOfRoutingTableValidateBeforeCall( - @javax.annotation.Nonnull UUID organizationId, - @javax.annotation.Nonnull UUID areaId, + private okhttp3.Call createVPCRegionValidateBeforeCall( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, @javax.annotation.Nonnull String region, - @javax.annotation.Nonnull UUID routingTableId, - @javax.annotation.Nonnull UUID routeId, + @javax.annotation.Nonnull CreateVPCRegionPayload createVPCRegionPayload, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'organizationId' is set - if (organizationId == null) { + // verify the required parameter 'projectId' is set + if (projectId == null) { throw new ApiException( - "Missing the required parameter 'organizationId' when calling getRouteOfRoutingTable(Async)"); + "Missing the required parameter 'projectId' when calling createVPCRegion(Async)"); } - // verify the required parameter 'areaId' is set - if (areaId == null) { + // verify the required parameter 'vpcId' is set + if (vpcId == null) { throw new ApiException( - "Missing the required parameter 'areaId' when calling getRouteOfRoutingTable(Async)"); + "Missing the required parameter 'vpcId' when calling createVPCRegion(Async)"); } // verify the required parameter 'region' is set if (region == null) { throw new ApiException( - "Missing the required parameter 'region' when calling getRouteOfRoutingTable(Async)"); - } - - // verify the required parameter 'routingTableId' is set - if (routingTableId == null) { - throw new ApiException( - "Missing the required parameter 'routingTableId' when calling getRouteOfRoutingTable(Async)"); + "Missing the required parameter 'region' when calling createVPCRegion(Async)"); } - // verify the required parameter 'routeId' is set - if (routeId == null) { + // verify the required parameter 'createVPCRegionPayload' is set + if (createVPCRegionPayload == null) { throw new ApiException( - "Missing the required parameter 'routeId' when calling getRouteOfRoutingTable(Async)"); + "Missing the required parameter 'createVPCRegionPayload' when calling createVPCRegion(Async)"); } - return getRouteOfRoutingTableCall( - organizationId, areaId, region, routingTableId, routeId, _callback); + return createVPCRegionCall(projectId, vpcId, region, createVPCRegionPayload, _callback); } /** - * Get details about a route of a routing table. Get details about a route defined in a routing - * table. + * Create the regional configuration of a VPC. Create the configuration of a region for a VPC. * - * @param organizationId The identifier (ID) of a STACKIT Organization. (required) - * @param areaId The identifier (ID) of a STACKIT Network Area. (required) + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) * @param region The STACKIT Region of the resources. (required) - * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) - * @param routeId The identifier (ID) of a STACKIT Route. (required) - * @return Route + * @param createVPCRegionPayload Request to add a new regional VPC configuration. (required) + * @return RegionalVPC * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details * * * - * + * * * * * + * + * * *
Response Details
Status Code Description Response Headers
200 Show the details of a route in a routing table. -
202 Configure VPC in a new region was accepted. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
409 A conflict has occurred. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
*/ - public Route getRouteOfRoutingTable( - @javax.annotation.Nonnull UUID organizationId, - @javax.annotation.Nonnull UUID areaId, + public RegionalVPC createVPCRegion( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, @javax.annotation.Nonnull String region, - @javax.annotation.Nonnull UUID routingTableId, - @javax.annotation.Nonnull UUID routeId) + @javax.annotation.Nonnull CreateVPCRegionPayload createVPCRegionPayload) throws ApiException { - ApiResponse localVarResp = - getRouteOfRoutingTableWithHttpInfo( - organizationId, areaId, region, routingTableId, routeId); + ApiResponse localVarResp = + createVPCRegionWithHttpInfo(projectId, vpcId, region, createVPCRegionPayload); return localVarResp.getData(); } /** - * Get details about a route of a routing table. Get details about a route defined in a routing - * table. + * Create the regional configuration of a VPC. Create the configuration of a region for a VPC. * - * @param organizationId The identifier (ID) of a STACKIT Organization. (required) - * @param areaId The identifier (ID) of a STACKIT Network Area. (required) + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) * @param region The STACKIT Region of the resources. (required) - * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) - * @param routeId The identifier (ID) of a STACKIT Route. (required) - * @return ApiResponse<Route> + * @param createVPCRegionPayload Request to add a new regional VPC configuration. (required) + * @return ApiResponse<RegionalVPC> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details * * * - * + * * * * * + * + * * *
Response Details
Status Code Description Response Headers
200 Show the details of a route in a routing table. -
202 Configure VPC in a new region was accepted. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
409 A conflict has occurred. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
*/ - public ApiResponse getRouteOfRoutingTableWithHttpInfo( - @javax.annotation.Nonnull UUID organizationId, - @javax.annotation.Nonnull UUID areaId, + public ApiResponse createVPCRegionWithHttpInfo( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, @javax.annotation.Nonnull String region, - @javax.annotation.Nonnull UUID routingTableId, - @javax.annotation.Nonnull UUID routeId) + @javax.annotation.Nonnull CreateVPCRegionPayload createVPCRegionPayload) throws ApiException { okhttp3.Call localVarCall = - getRouteOfRoutingTableValidateBeforeCall( - organizationId, areaId, region, routingTableId, routeId, null); - Type localVarReturnType = new TypeToken() {}.getType(); + createVPCRegionValidateBeforeCall( + projectId, vpcId, region, createVPCRegionPayload, null); + Type localVarReturnType = new TypeToken() {}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * Get details about a route of a routing table. (asynchronously) Get details about a route - * defined in a routing table. + * Create the regional configuration of a VPC. (asynchronously) Create the configuration of a + * region for a VPC. * - * @param organizationId The identifier (ID) of a STACKIT Organization. (required) - * @param areaId The identifier (ID) of a STACKIT Network Area. (required) + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) * @param region The STACKIT Region of the resources. (required) - * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) - * @param routeId The identifier (ID) of a STACKIT Route. (required) + * @param createVPCRegionPayload Request to add a new regional VPC configuration. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body @@ -2019,38 +2069,38 @@ public ApiResponse getRouteOfRoutingTableWithHttpInfo( * * * - * + * * * * * + * + * * *
Response Details
Status Code Description Response Headers
200 Show the details of a route in a routing table. -
202 Configure VPC in a new region was accepted. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
409 A conflict has occurred. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
*/ - public okhttp3.Call getRouteOfRoutingTableAsync( - @javax.annotation.Nonnull UUID organizationId, - @javax.annotation.Nonnull UUID areaId, + public okhttp3.Call createVPCRegionAsync( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, @javax.annotation.Nonnull String region, - @javax.annotation.Nonnull UUID routingTableId, - @javax.annotation.Nonnull UUID routeId, - final ApiCallback _callback) + @javax.annotation.Nonnull CreateVPCRegionPayload createVPCRegionPayload, + final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = - getRouteOfRoutingTableValidateBeforeCall( - organizationId, areaId, region, routingTableId, routeId, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + createVPCRegionValidateBeforeCall( + projectId, vpcId, region, createVPCRegionPayload, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for getRoutingTableOfArea + * Build call for deleteNetwork * - * @param organizationId The identifier (ID) of a STACKIT Organization. (required) - * @param areaId The identifier (ID) of a STACKIT Network Area. (required) + * @param projectId The identifier (ID) of a STACKIT Project. (required) * @param region The STACKIT Region of the resources. (required) - * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) + * @param networkId The identifier (ID) of a STACKIT Network. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -2058,19 +2108,19 @@ public okhttp3.Call getRouteOfRoutingTableAsync( * * * - * + * * * * * + * * *
Response Details
Status Code Description Response Headers
200 Show routing table details. -
202 Delete request for network has been accepted. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
409 A conflict has occurred. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
*/ - public okhttp3.Call getRoutingTableOfAreaCall( - @javax.annotation.Nonnull UUID organizationId, - @javax.annotation.Nonnull UUID areaId, + public okhttp3.Call deleteNetworkCall( + @javax.annotation.Nonnull UUID projectId, @javax.annotation.Nonnull String region, - @javax.annotation.Nonnull UUID routingTableId, + @javax.annotation.Nonnull UUID networkId, final ApiCallback _callback) throws ApiException { String basePath = null; @@ -2090,19 +2140,16 @@ public okhttp3.Call getRoutingTableOfAreaCall( // create path and map variables String localVarPath = - "/v2alpha1/organizations/{organizationId}/network-areas/{areaId}/regions/{region}/routing-tables/{routingTableId}" - .replace( - "{" + "organizationId" + "}", - localVarApiClient.escapeString(organizationId.toString())) + "/v2alpha1/projects/{projectId}/regions/{region}/networks/{networkId}" .replace( - "{" + "areaId" + "}", - localVarApiClient.escapeString(areaId.toString())) + "{" + "projectId" + "}", + localVarApiClient.escapeString(projectId.toString())) .replace( "{" + "region" + "}", localVarApiClient.escapeString(region.toString())) .replace( - "{" + "routingTableId" + "}", - localVarApiClient.escapeString(routingTableId.toString())); + "{" + "networkId" + "}", + localVarApiClient.escapeString(networkId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -2127,7 +2174,7 @@ public okhttp3.Call getRoutingTableOfAreaCall( return localVarApiClient.buildCall( basePath, localVarPath, - "GET", + "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, @@ -2139,118 +2186,101 @@ public okhttp3.Call getRoutingTableOfAreaCall( } @SuppressWarnings("rawtypes") - private okhttp3.Call getRoutingTableOfAreaValidateBeforeCall( - @javax.annotation.Nonnull UUID organizationId, - @javax.annotation.Nonnull UUID areaId, + private okhttp3.Call deleteNetworkValidateBeforeCall( + @javax.annotation.Nonnull UUID projectId, @javax.annotation.Nonnull String region, - @javax.annotation.Nonnull UUID routingTableId, + @javax.annotation.Nonnull UUID networkId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'organizationId' is set - if (organizationId == null) { - throw new ApiException( - "Missing the required parameter 'organizationId' when calling getRoutingTableOfArea(Async)"); - } - - // verify the required parameter 'areaId' is set - if (areaId == null) { + // verify the required parameter 'projectId' is set + if (projectId == null) { throw new ApiException( - "Missing the required parameter 'areaId' when calling getRoutingTableOfArea(Async)"); + "Missing the required parameter 'projectId' when calling deleteNetwork(Async)"); } // verify the required parameter 'region' is set if (region == null) { throw new ApiException( - "Missing the required parameter 'region' when calling getRoutingTableOfArea(Async)"); + "Missing the required parameter 'region' when calling deleteNetwork(Async)"); } - // verify the required parameter 'routingTableId' is set - if (routingTableId == null) { + // verify the required parameter 'networkId' is set + if (networkId == null) { throw new ApiException( - "Missing the required parameter 'routingTableId' when calling getRoutingTableOfArea(Async)"); + "Missing the required parameter 'networkId' when calling deleteNetwork(Async)"); } - return getRoutingTableOfAreaCall(organizationId, areaId, region, routingTableId, _callback); + return deleteNetworkCall(projectId, region, networkId, _callback); } /** - * Get details about a routing table. Get details about a routing table defined in a network - * area. + * Delete network. Delete a network. If the network is still in use, the deletion will fail. * - * @param organizationId The identifier (ID) of a STACKIT Organization. (required) - * @param areaId The identifier (ID) of a STACKIT Network Area. (required) + * @param projectId The identifier (ID) of a STACKIT Project. (required) * @param region The STACKIT Region of the resources. (required) - * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) - * @return RoutingTable + * @param networkId The identifier (ID) of a STACKIT Network. (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details * * * - * + * * * * * + * * *
Response Details
Status Code Description Response Headers
200 Show routing table details. -
202 Delete request for network has been accepted. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
409 A conflict has occurred. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
*/ - public RoutingTable getRoutingTableOfArea( - @javax.annotation.Nonnull UUID organizationId, - @javax.annotation.Nonnull UUID areaId, + public void deleteNetwork( + @javax.annotation.Nonnull UUID projectId, @javax.annotation.Nonnull String region, - @javax.annotation.Nonnull UUID routingTableId) + @javax.annotation.Nonnull UUID networkId) throws ApiException { - ApiResponse localVarResp = - getRoutingTableOfAreaWithHttpInfo(organizationId, areaId, region, routingTableId); - return localVarResp.getData(); + deleteNetworkWithHttpInfo(projectId, region, networkId); } /** - * Get details about a routing table. Get details about a routing table defined in a network - * area. + * Delete network. Delete a network. If the network is still in use, the deletion will fail. * - * @param organizationId The identifier (ID) of a STACKIT Organization. (required) - * @param areaId The identifier (ID) of a STACKIT Network Area. (required) + * @param projectId The identifier (ID) of a STACKIT Project. (required) * @param region The STACKIT Region of the resources. (required) - * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) - * @return ApiResponse<RoutingTable> + * @param networkId The identifier (ID) of a STACKIT Network. (required) + * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details * * * - * + * * * * * + * * *
Response Details
Status Code Description Response Headers
200 Show routing table details. -
202 Delete request for network has been accepted. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
409 A conflict has occurred. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
*/ - public ApiResponse getRoutingTableOfAreaWithHttpInfo( - @javax.annotation.Nonnull UUID organizationId, - @javax.annotation.Nonnull UUID areaId, + public ApiResponse deleteNetworkWithHttpInfo( + @javax.annotation.Nonnull UUID projectId, @javax.annotation.Nonnull String region, - @javax.annotation.Nonnull UUID routingTableId) + @javax.annotation.Nonnull UUID networkId) throws ApiException { okhttp3.Call localVarCall = - getRoutingTableOfAreaValidateBeforeCall( - organizationId, areaId, region, routingTableId, null); - Type localVarReturnType = new TypeToken() {}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); + deleteNetworkValidateBeforeCall(projectId, region, networkId, null); + return localVarApiClient.execute(localVarCall); } /** - * Get details about a routing table. (asynchronously) Get details about a routing table defined - * in a network area. + * Delete network. (asynchronously) Delete a network. If the network is still in use, the + * deletion will fail. * - * @param organizationId The identifier (ID) of a STACKIT Organization. (required) - * @param areaId The identifier (ID) of a STACKIT Network Area. (required) + * @param projectId The identifier (ID) of a STACKIT Project. (required) * @param region The STACKIT Region of the resources. (required) - * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) + * @param networkId The identifier (ID) of a STACKIT Network. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body @@ -2259,36 +2289,5958 @@ public ApiResponse getRoutingTableOfAreaWithHttpInfo( * * * - * + * * * * * + * * *
Response Details
Status Code Description Response Headers
200 Show routing table details. -
202 Delete request for network has been accepted. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
409 A conflict has occurred. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
*/ - public okhttp3.Call getRoutingTableOfAreaAsync( - @javax.annotation.Nonnull UUID organizationId, - @javax.annotation.Nonnull UUID areaId, + public okhttp3.Call deleteNetworkAsync( + @javax.annotation.Nonnull UUID projectId, @javax.annotation.Nonnull String region, - @javax.annotation.Nonnull UUID routingTableId, - final ApiCallback _callback) + @javax.annotation.Nonnull UUID networkId, + final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = - getRoutingTableOfAreaValidateBeforeCall( - organizationId, areaId, region, routingTableId, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + deleteNetworkValidateBeforeCall(projectId, region, networkId, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** - * Build call for listNetworks + * Build call for deleteRouteFromRoutingTable * - * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param organizationId The identifier (ID) of a STACKIT Organization. (required) + * @param areaId The identifier (ID) of a STACKIT Network Area. (required) * @param region The STACKIT Region of the resources. (required) - * @param labelSelector Filter resources by labels. (optional) + * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) + * @param routeId The identifier (ID) of a STACKIT Route. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Delete request for the route has been accepted. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public okhttp3.Call deleteRouteFromRoutingTableCall( + @javax.annotation.Nonnull UUID organizationId, + @javax.annotation.Nonnull UUID areaId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID routingTableId, + @javax.annotation.Nonnull UUID routeId, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = + "/v2alpha1/organizations/{organizationId}/network-areas/{areaId}/regions/{region}/routing-tables/{routingTableId}/routes/{routeId}" + .replace( + "{" + "organizationId" + "}", + localVarApiClient.escapeString(organizationId.toString())) + .replace( + "{" + "areaId" + "}", + localVarApiClient.escapeString(areaId.toString())) + .replace( + "{" + "region" + "}", + localVarApiClient.escapeString(region.toString())) + .replace( + "{" + "routingTableId" + "}", + localVarApiClient.escapeString(routingTableId.toString())) + .replace( + "{" + "routeId" + "}", + localVarApiClient.escapeString(routeId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "DELETE", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteRouteFromRoutingTableValidateBeforeCall( + @javax.annotation.Nonnull UUID organizationId, + @javax.annotation.Nonnull UUID areaId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID routingTableId, + @javax.annotation.Nonnull UUID routeId, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'organizationId' is set + if (organizationId == null) { + throw new ApiException( + "Missing the required parameter 'organizationId' when calling deleteRouteFromRoutingTable(Async)"); + } + + // verify the required parameter 'areaId' is set + if (areaId == null) { + throw new ApiException( + "Missing the required parameter 'areaId' when calling deleteRouteFromRoutingTable(Async)"); + } + + // verify the required parameter 'region' is set + if (region == null) { + throw new ApiException( + "Missing the required parameter 'region' when calling deleteRouteFromRoutingTable(Async)"); + } + + // verify the required parameter 'routingTableId' is set + if (routingTableId == null) { + throw new ApiException( + "Missing the required parameter 'routingTableId' when calling deleteRouteFromRoutingTable(Async)"); + } + + // verify the required parameter 'routeId' is set + if (routeId == null) { + throw new ApiException( + "Missing the required parameter 'routeId' when calling deleteRouteFromRoutingTable(Async)"); + } + + return deleteRouteFromRoutingTableCall( + organizationId, areaId, region, routingTableId, routeId, _callback); + } + + /** + * Delete a route in a routing table. Delete a route in an existing routing table of a network + * area. + * + * @param organizationId The identifier (ID) of a STACKIT Organization. (required) + * @param areaId The identifier (ID) of a STACKIT Network Area. (required) + * @param region The STACKIT Region of the resources. (required) + * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) + * @param routeId The identifier (ID) of a STACKIT Route. (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Delete request for the route has been accepted. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public void deleteRouteFromRoutingTable( + @javax.annotation.Nonnull UUID organizationId, + @javax.annotation.Nonnull UUID areaId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID routingTableId, + @javax.annotation.Nonnull UUID routeId) + throws ApiException { + deleteRouteFromRoutingTableWithHttpInfo( + organizationId, areaId, region, routingTableId, routeId); + } + + /** + * Delete a route in a routing table. Delete a route in an existing routing table of a network + * area. + * + * @param organizationId The identifier (ID) of a STACKIT Organization. (required) + * @param areaId The identifier (ID) of a STACKIT Network Area. (required) + * @param region The STACKIT Region of the resources. (required) + * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) + * @param routeId The identifier (ID) of a STACKIT Route. (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Delete request for the route has been accepted. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public ApiResponse deleteRouteFromRoutingTableWithHttpInfo( + @javax.annotation.Nonnull UUID organizationId, + @javax.annotation.Nonnull UUID areaId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID routingTableId, + @javax.annotation.Nonnull UUID routeId) + throws ApiException { + okhttp3.Call localVarCall = + deleteRouteFromRoutingTableValidateBeforeCall( + organizationId, areaId, region, routingTableId, routeId, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Delete a route in a routing table. (asynchronously) Delete a route in an existing routing + * table of a network area. + * + * @param organizationId The identifier (ID) of a STACKIT Organization. (required) + * @param areaId The identifier (ID) of a STACKIT Network Area. (required) + * @param region The STACKIT Region of the resources. (required) + * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) + * @param routeId The identifier (ID) of a STACKIT Route. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Delete request for the route has been accepted. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public okhttp3.Call deleteRouteFromRoutingTableAsync( + @javax.annotation.Nonnull UUID organizationId, + @javax.annotation.Nonnull UUID areaId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID routingTableId, + @javax.annotation.Nonnull UUID routeId, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + deleteRouteFromRoutingTableValidateBeforeCall( + organizationId, areaId, region, routingTableId, routeId, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + + /** + * Build call for deleteRoutingTableFromArea + * + * @param organizationId The identifier (ID) of a STACKIT Organization. (required) + * @param areaId The identifier (ID) of a STACKIT Network Area. (required) + * @param region The STACKIT Region of the resources. (required) + * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Delete request for the routing table has been accepted. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public okhttp3.Call deleteRoutingTableFromAreaCall( + @javax.annotation.Nonnull UUID organizationId, + @javax.annotation.Nonnull UUID areaId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID routingTableId, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = + "/v2alpha1/organizations/{organizationId}/network-areas/{areaId}/regions/{region}/routing-tables/{routingTableId}" + .replace( + "{" + "organizationId" + "}", + localVarApiClient.escapeString(organizationId.toString())) + .replace( + "{" + "areaId" + "}", + localVarApiClient.escapeString(areaId.toString())) + .replace( + "{" + "region" + "}", + localVarApiClient.escapeString(region.toString())) + .replace( + "{" + "routingTableId" + "}", + localVarApiClient.escapeString(routingTableId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "DELETE", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteRoutingTableFromAreaValidateBeforeCall( + @javax.annotation.Nonnull UUID organizationId, + @javax.annotation.Nonnull UUID areaId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID routingTableId, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'organizationId' is set + if (organizationId == null) { + throw new ApiException( + "Missing the required parameter 'organizationId' when calling deleteRoutingTableFromArea(Async)"); + } + + // verify the required parameter 'areaId' is set + if (areaId == null) { + throw new ApiException( + "Missing the required parameter 'areaId' when calling deleteRoutingTableFromArea(Async)"); + } + + // verify the required parameter 'region' is set + if (region == null) { + throw new ApiException( + "Missing the required parameter 'region' when calling deleteRoutingTableFromArea(Async)"); + } + + // verify the required parameter 'routingTableId' is set + if (routingTableId == null) { + throw new ApiException( + "Missing the required parameter 'routingTableId' when calling deleteRoutingTableFromArea(Async)"); + } + + return deleteRoutingTableFromAreaCall( + organizationId, areaId, region, routingTableId, _callback); + } + + /** + * Delete a routing table. Delete a routing table of a network area. + * + * @param organizationId The identifier (ID) of a STACKIT Organization. (required) + * @param areaId The identifier (ID) of a STACKIT Network Area. (required) + * @param region The STACKIT Region of the resources. (required) + * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Delete request for the routing table has been accepted. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public void deleteRoutingTableFromArea( + @javax.annotation.Nonnull UUID organizationId, + @javax.annotation.Nonnull UUID areaId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID routingTableId) + throws ApiException { + deleteRoutingTableFromAreaWithHttpInfo(organizationId, areaId, region, routingTableId); + } + + /** + * Delete a routing table. Delete a routing table of a network area. + * + * @param organizationId The identifier (ID) of a STACKIT Organization. (required) + * @param areaId The identifier (ID) of a STACKIT Network Area. (required) + * @param region The STACKIT Region of the resources. (required) + * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Delete request for the routing table has been accepted. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public ApiResponse deleteRoutingTableFromAreaWithHttpInfo( + @javax.annotation.Nonnull UUID organizationId, + @javax.annotation.Nonnull UUID areaId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID routingTableId) + throws ApiException { + okhttp3.Call localVarCall = + deleteRoutingTableFromAreaValidateBeforeCall( + organizationId, areaId, region, routingTableId, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Delete a routing table. (asynchronously) Delete a routing table of a network area. + * + * @param organizationId The identifier (ID) of a STACKIT Organization. (required) + * @param areaId The identifier (ID) of a STACKIT Network Area. (required) + * @param region The STACKIT Region of the resources. (required) + * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Delete request for the routing table has been accepted. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public okhttp3.Call deleteRoutingTableFromAreaAsync( + @javax.annotation.Nonnull UUID organizationId, + @javax.annotation.Nonnull UUID areaId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID routingTableId, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + deleteRoutingTableFromAreaValidateBeforeCall( + organizationId, areaId, region, routingTableId, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + + /** + * Build call for deleteVPC + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 VPC has been deleted. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
409 A conflict has occurred. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public okhttp3.Call deleteVPCCall( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = + "/v2alpha1/projects/{projectId}/vpcs/{vpcId}" + .replace( + "{" + "projectId" + "}", + localVarApiClient.escapeString(projectId.toString())) + .replace( + "{" + "vpcId" + "}", + localVarApiClient.escapeString(vpcId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "DELETE", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteVPCValidateBeforeCall( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'projectId' is set + if (projectId == null) { + throw new ApiException( + "Missing the required parameter 'projectId' when calling deleteVPC(Async)"); + } + + // verify the required parameter 'vpcId' is set + if (vpcId == null) { + throw new ApiException( + "Missing the required parameter 'vpcId' when calling deleteVPC(Async)"); + } + + return deleteVPCCall(projectId, vpcId, _callback); + } + + /** + * Delete a VPC. Delete an existing VPC in a project. + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 VPC has been deleted. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
409 A conflict has occurred. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public void deleteVPC( + @javax.annotation.Nonnull UUID projectId, @javax.annotation.Nonnull UUID vpcId) + throws ApiException { + deleteVPCWithHttpInfo(projectId, vpcId); + } + + /** + * Delete a VPC. Delete an existing VPC in a project. + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 VPC has been deleted. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
409 A conflict has occurred. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public ApiResponse deleteVPCWithHttpInfo( + @javax.annotation.Nonnull UUID projectId, @javax.annotation.Nonnull UUID vpcId) + throws ApiException { + okhttp3.Call localVarCall = deleteVPCValidateBeforeCall(projectId, vpcId, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Delete a VPC. (asynchronously) Delete an existing VPC in a project. + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 VPC has been deleted. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
409 A conflict has occurred. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public okhttp3.Call deleteVPCAsync( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = deleteVPCValidateBeforeCall(projectId, vpcId, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + + /** + * Build call for deleteVPCNetworkRange + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) + * @param region The STACKIT Region of the resources. (required) + * @param networkRangeId The identifier (ID) of a STACKIT Network Range. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
202 Delete request for network range has been accepted. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
409 A conflict has occurred. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public okhttp3.Call deleteVPCNetworkRangeCall( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID networkRangeId, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = + "/v2alpha1/projects/{projectId}/vpcs/{vpcId}/regions/{region}/network-ranges/{networkRangeId}" + .replace( + "{" + "projectId" + "}", + localVarApiClient.escapeString(projectId.toString())) + .replace( + "{" + "vpcId" + "}", + localVarApiClient.escapeString(vpcId.toString())) + .replace( + "{" + "region" + "}", + localVarApiClient.escapeString(region.toString())) + .replace( + "{" + "networkRangeId" + "}", + localVarApiClient.escapeString(networkRangeId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "DELETE", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteVPCNetworkRangeValidateBeforeCall( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID networkRangeId, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'projectId' is set + if (projectId == null) { + throw new ApiException( + "Missing the required parameter 'projectId' when calling deleteVPCNetworkRange(Async)"); + } + + // verify the required parameter 'vpcId' is set + if (vpcId == null) { + throw new ApiException( + "Missing the required parameter 'vpcId' when calling deleteVPCNetworkRange(Async)"); + } + + // verify the required parameter 'region' is set + if (region == null) { + throw new ApiException( + "Missing the required parameter 'region' when calling deleteVPCNetworkRange(Async)"); + } + + // verify the required parameter 'networkRangeId' is set + if (networkRangeId == null) { + throw new ApiException( + "Missing the required parameter 'networkRangeId' when calling deleteVPCNetworkRange(Async)"); + } + + return deleteVPCNetworkRangeCall(projectId, vpcId, region, networkRangeId, _callback); + } + + /** + * Delete a regional network range. Delete a network range of a VPC for this region, if the + * network range is not used anymore. + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) + * @param region The STACKIT Region of the resources. (required) + * @param networkRangeId The identifier (ID) of a STACKIT Network Range. (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
202 Delete request for network range has been accepted. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
409 A conflict has occurred. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public void deleteVPCNetworkRange( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID networkRangeId) + throws ApiException { + deleteVPCNetworkRangeWithHttpInfo(projectId, vpcId, region, networkRangeId); + } + + /** + * Delete a regional network range. Delete a network range of a VPC for this region, if the + * network range is not used anymore. + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) + * @param region The STACKIT Region of the resources. (required) + * @param networkRangeId The identifier (ID) of a STACKIT Network Range. (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
202 Delete request for network range has been accepted. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
409 A conflict has occurred. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public ApiResponse deleteVPCNetworkRangeWithHttpInfo( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID networkRangeId) + throws ApiException { + okhttp3.Call localVarCall = + deleteVPCNetworkRangeValidateBeforeCall( + projectId, vpcId, region, networkRangeId, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Delete a regional network range. (asynchronously) Delete a network range of a VPC for this + * region, if the network range is not used anymore. + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) + * @param region The STACKIT Region of the resources. (required) + * @param networkRangeId The identifier (ID) of a STACKIT Network Range. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
202 Delete request for network range has been accepted. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
409 A conflict has occurred. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public okhttp3.Call deleteVPCNetworkRangeAsync( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID networkRangeId, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + deleteVPCNetworkRangeValidateBeforeCall( + projectId, vpcId, region, networkRangeId, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + + /** + * Build call for deleteVPCRegion + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) + * @param region The STACKIT Region of the resources. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
202 Delete request for the regional VPC has been accepted. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
409 A conflict has occurred. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public okhttp3.Call deleteVPCRegionCall( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + @javax.annotation.Nonnull String region, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = + "/v2alpha1/projects/{projectId}/vpcs/{vpcId}/regions/{region}" + .replace( + "{" + "projectId" + "}", + localVarApiClient.escapeString(projectId.toString())) + .replace( + "{" + "vpcId" + "}", + localVarApiClient.escapeString(vpcId.toString())) + .replace( + "{" + "region" + "}", + localVarApiClient.escapeString(region.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "DELETE", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteVPCRegionValidateBeforeCall( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + @javax.annotation.Nonnull String region, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'projectId' is set + if (projectId == null) { + throw new ApiException( + "Missing the required parameter 'projectId' when calling deleteVPCRegion(Async)"); + } + + // verify the required parameter 'vpcId' is set + if (vpcId == null) { + throw new ApiException( + "Missing the required parameter 'vpcId' when calling deleteVPCRegion(Async)"); + } + + // verify the required parameter 'region' is set + if (region == null) { + throw new ApiException( + "Missing the required parameter 'region' when calling deleteVPCRegion(Async)"); + } + + return deleteVPCRegionCall(projectId, vpcId, region, _callback); + } + + /** + * Delete the regional configuration of a VPC. Delete the current configuration of a region for + * a VPC. + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) + * @param region The STACKIT Region of the resources. (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
202 Delete request for the regional VPC has been accepted. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
409 A conflict has occurred. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public void deleteVPCRegion( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + @javax.annotation.Nonnull String region) + throws ApiException { + deleteVPCRegionWithHttpInfo(projectId, vpcId, region); + } + + /** + * Delete the regional configuration of a VPC. Delete the current configuration of a region for + * a VPC. + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) + * @param region The STACKIT Region of the resources. (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
202 Delete request for the regional VPC has been accepted. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
409 A conflict has occurred. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public ApiResponse deleteVPCRegionWithHttpInfo( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + @javax.annotation.Nonnull String region) + throws ApiException { + okhttp3.Call localVarCall = + deleteVPCRegionValidateBeforeCall(projectId, vpcId, region, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Delete the regional configuration of a VPC. (asynchronously) Delete the current configuration + * of a region for a VPC. + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) + * @param region The STACKIT Region of the resources. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
202 Delete request for the regional VPC has been accepted. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
409 A conflict has occurred. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public okhttp3.Call deleteVPCRegionAsync( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + @javax.annotation.Nonnull String region, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + deleteVPCRegionValidateBeforeCall(projectId, vpcId, region, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + + /** + * Build call for deleteVPCRoutingTable + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) + * @param region The STACKIT Region of the resources. (required) + * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Routingtable has been deleted. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public okhttp3.Call deleteVPCRoutingTableCall( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID routingTableId, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = + "/v2alpha1/projects/{projectId}/vpcs/{vpcId}/regions/{region}/routing-tables/{routingTableId}" + .replace( + "{" + "projectId" + "}", + localVarApiClient.escapeString(projectId.toString())) + .replace( + "{" + "vpcId" + "}", + localVarApiClient.escapeString(vpcId.toString())) + .replace( + "{" + "region" + "}", + localVarApiClient.escapeString(region.toString())) + .replace( + "{" + "routingTableId" + "}", + localVarApiClient.escapeString(routingTableId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "DELETE", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteVPCRoutingTableValidateBeforeCall( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID routingTableId, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'projectId' is set + if (projectId == null) { + throw new ApiException( + "Missing the required parameter 'projectId' when calling deleteVPCRoutingTable(Async)"); + } + + // verify the required parameter 'vpcId' is set + if (vpcId == null) { + throw new ApiException( + "Missing the required parameter 'vpcId' when calling deleteVPCRoutingTable(Async)"); + } + + // verify the required parameter 'region' is set + if (region == null) { + throw new ApiException( + "Missing the required parameter 'region' when calling deleteVPCRoutingTable(Async)"); + } + + // verify the required parameter 'routingTableId' is set + if (routingTableId == null) { + throw new ApiException( + "Missing the required parameter 'routingTableId' when calling deleteVPCRoutingTable(Async)"); + } + + return deleteVPCRoutingTableCall(projectId, vpcId, region, routingTableId, _callback); + } + + /** + * Delete a regional routing table. Delete a routing table of a VPC for this region. + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) + * @param region The STACKIT Region of the resources. (required) + * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Routingtable has been deleted. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public void deleteVPCRoutingTable( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID routingTableId) + throws ApiException { + deleteVPCRoutingTableWithHttpInfo(projectId, vpcId, region, routingTableId); + } + + /** + * Delete a regional routing table. Delete a routing table of a VPC for this region. + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) + * @param region The STACKIT Region of the resources. (required) + * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Routingtable has been deleted. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public ApiResponse deleteVPCRoutingTableWithHttpInfo( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID routingTableId) + throws ApiException { + okhttp3.Call localVarCall = + deleteVPCRoutingTableValidateBeforeCall( + projectId, vpcId, region, routingTableId, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Delete a regional routing table. (asynchronously) Delete a routing table of a VPC for this + * region. + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) + * @param region The STACKIT Region of the resources. (required) + * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Routingtable has been deleted. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public okhttp3.Call deleteVPCRoutingTableAsync( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID routingTableId, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + deleteVPCRoutingTableValidateBeforeCall( + projectId, vpcId, region, routingTableId, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + + /** + * Build call for deleteVPCStaticRoute + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) + * @param region The STACKIT Region of the resources. (required) + * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) + * @param routeId The identifier (ID) of a STACKIT Route. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Delete request for the static route has been accepted. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public okhttp3.Call deleteVPCStaticRouteCall( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID routingTableId, + @javax.annotation.Nonnull UUID routeId, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = + "/v2alpha1/projects/{projectId}/vpcs/{vpcId}/regions/{region}/routing-tables/{routingTableId}/static-routes/{routeId}" + .replace( + "{" + "projectId" + "}", + localVarApiClient.escapeString(projectId.toString())) + .replace( + "{" + "vpcId" + "}", + localVarApiClient.escapeString(vpcId.toString())) + .replace( + "{" + "region" + "}", + localVarApiClient.escapeString(region.toString())) + .replace( + "{" + "routingTableId" + "}", + localVarApiClient.escapeString(routingTableId.toString())) + .replace( + "{" + "routeId" + "}", + localVarApiClient.escapeString(routeId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "DELETE", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteVPCStaticRouteValidateBeforeCall( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID routingTableId, + @javax.annotation.Nonnull UUID routeId, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'projectId' is set + if (projectId == null) { + throw new ApiException( + "Missing the required parameter 'projectId' when calling deleteVPCStaticRoute(Async)"); + } + + // verify the required parameter 'vpcId' is set + if (vpcId == null) { + throw new ApiException( + "Missing the required parameter 'vpcId' when calling deleteVPCStaticRoute(Async)"); + } + + // verify the required parameter 'region' is set + if (region == null) { + throw new ApiException( + "Missing the required parameter 'region' when calling deleteVPCStaticRoute(Async)"); + } + + // verify the required parameter 'routingTableId' is set + if (routingTableId == null) { + throw new ApiException( + "Missing the required parameter 'routingTableId' when calling deleteVPCStaticRoute(Async)"); + } + + // verify the required parameter 'routeId' is set + if (routeId == null) { + throw new ApiException( + "Missing the required parameter 'routeId' when calling deleteVPCStaticRoute(Async)"); + } + + return deleteVPCStaticRouteCall( + projectId, vpcId, region, routingTableId, routeId, _callback); + } + + /** + * Delete a regional static route. Delete a static route of a VPC for this region. + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) + * @param region The STACKIT Region of the resources. (required) + * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) + * @param routeId The identifier (ID) of a STACKIT Route. (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Delete request for the static route has been accepted. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public void deleteVPCStaticRoute( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID routingTableId, + @javax.annotation.Nonnull UUID routeId) + throws ApiException { + deleteVPCStaticRouteWithHttpInfo(projectId, vpcId, region, routingTableId, routeId); + } + + /** + * Delete a regional static route. Delete a static route of a VPC for this region. + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) + * @param region The STACKIT Region of the resources. (required) + * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) + * @param routeId The identifier (ID) of a STACKIT Route. (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Delete request for the static route has been accepted. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public ApiResponse deleteVPCStaticRouteWithHttpInfo( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID routingTableId, + @javax.annotation.Nonnull UUID routeId) + throws ApiException { + okhttp3.Call localVarCall = + deleteVPCStaticRouteValidateBeforeCall( + projectId, vpcId, region, routingTableId, routeId, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Delete a regional static route. (asynchronously) Delete a static route of a VPC for this + * region. + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) + * @param region The STACKIT Region of the resources. (required) + * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) + * @param routeId The identifier (ID) of a STACKIT Route. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
204 Delete request for the static route has been accepted. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public okhttp3.Call deleteVPCStaticRouteAsync( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID routingTableId, + @javax.annotation.Nonnull UUID routeId, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + deleteVPCStaticRouteValidateBeforeCall( + projectId, vpcId, region, routingTableId, routeId, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + + /** + * Build call for getNetwork + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param region The STACKIT Region of the resources. (required) + * @param networkId The identifier (ID) of a STACKIT Network. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Show network details. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public okhttp3.Call getNetworkCall( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID networkId, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = + "/v2alpha1/projects/{projectId}/regions/{region}/networks/{networkId}" + .replace( + "{" + "projectId" + "}", + localVarApiClient.escapeString(projectId.toString())) + .replace( + "{" + "region" + "}", + localVarApiClient.escapeString(region.toString())) + .replace( + "{" + "networkId" + "}", + localVarApiClient.escapeString(networkId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getNetworkValidateBeforeCall( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID networkId, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'projectId' is set + if (projectId == null) { + throw new ApiException( + "Missing the required parameter 'projectId' when calling getNetwork(Async)"); + } + + // verify the required parameter 'region' is set + if (region == null) { + throw new ApiException( + "Missing the required parameter 'region' when calling getNetwork(Async)"); + } + + // verify the required parameter 'networkId' is set + if (networkId == null) { + throw new ApiException( + "Missing the required parameter 'networkId' when calling getNetwork(Async)"); + } + + return getNetworkCall(projectId, region, networkId, _callback); + } + + /** + * Get network details. Get details about a network of a project. + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param region The STACKIT Region of the resources. (required) + * @param networkId The identifier (ID) of a STACKIT Network. (required) + * @return Network + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Show network details. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public Network getNetwork( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID networkId) + throws ApiException { + ApiResponse localVarResp = getNetworkWithHttpInfo(projectId, region, networkId); + return localVarResp.getData(); + } + + /** + * Get network details. Get details about a network of a project. + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param region The STACKIT Region of the resources. (required) + * @param networkId The identifier (ID) of a STACKIT Network. (required) + * @return ApiResponse<Network> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Show network details. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public ApiResponse getNetworkWithHttpInfo( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID networkId) + throws ApiException { + okhttp3.Call localVarCall = + getNetworkValidateBeforeCall(projectId, region, networkId, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get network details. (asynchronously) Get details about a network of a project. + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param region The STACKIT Region of the resources. (required) + * @param networkId The identifier (ID) of a STACKIT Network. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Show network details. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public okhttp3.Call getNetworkAsync( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID networkId, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + getNetworkValidateBeforeCall(projectId, region, networkId, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + /** + * Build call for getRouteOfRoutingTable + * + * @param organizationId The identifier (ID) of a STACKIT Organization. (required) + * @param areaId The identifier (ID) of a STACKIT Network Area. (required) + * @param region The STACKIT Region of the resources. (required) + * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) + * @param routeId The identifier (ID) of a STACKIT Route. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Show the details of a route in a routing table. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public okhttp3.Call getRouteOfRoutingTableCall( + @javax.annotation.Nonnull UUID organizationId, + @javax.annotation.Nonnull UUID areaId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID routingTableId, + @javax.annotation.Nonnull UUID routeId, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = + "/v2alpha1/organizations/{organizationId}/network-areas/{areaId}/regions/{region}/routing-tables/{routingTableId}/routes/{routeId}" + .replace( + "{" + "organizationId" + "}", + localVarApiClient.escapeString(organizationId.toString())) + .replace( + "{" + "areaId" + "}", + localVarApiClient.escapeString(areaId.toString())) + .replace( + "{" + "region" + "}", + localVarApiClient.escapeString(region.toString())) + .replace( + "{" + "routingTableId" + "}", + localVarApiClient.escapeString(routingTableId.toString())) + .replace( + "{" + "routeId" + "}", + localVarApiClient.escapeString(routeId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getRouteOfRoutingTableValidateBeforeCall( + @javax.annotation.Nonnull UUID organizationId, + @javax.annotation.Nonnull UUID areaId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID routingTableId, + @javax.annotation.Nonnull UUID routeId, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'organizationId' is set + if (organizationId == null) { + throw new ApiException( + "Missing the required parameter 'organizationId' when calling getRouteOfRoutingTable(Async)"); + } + + // verify the required parameter 'areaId' is set + if (areaId == null) { + throw new ApiException( + "Missing the required parameter 'areaId' when calling getRouteOfRoutingTable(Async)"); + } + + // verify the required parameter 'region' is set + if (region == null) { + throw new ApiException( + "Missing the required parameter 'region' when calling getRouteOfRoutingTable(Async)"); + } + + // verify the required parameter 'routingTableId' is set + if (routingTableId == null) { + throw new ApiException( + "Missing the required parameter 'routingTableId' when calling getRouteOfRoutingTable(Async)"); + } + + // verify the required parameter 'routeId' is set + if (routeId == null) { + throw new ApiException( + "Missing the required parameter 'routeId' when calling getRouteOfRoutingTable(Async)"); + } + + return getRouteOfRoutingTableCall( + organizationId, areaId, region, routingTableId, routeId, _callback); + } + + /** + * Get details about a route of a routing table. Get details about a route defined in a routing + * table of a network area. + * + * @param organizationId The identifier (ID) of a STACKIT Organization. (required) + * @param areaId The identifier (ID) of a STACKIT Network Area. (required) + * @param region The STACKIT Region of the resources. (required) + * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) + * @param routeId The identifier (ID) of a STACKIT Route. (required) + * @return Route + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Show the details of a route in a routing table. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public Route getRouteOfRoutingTable( + @javax.annotation.Nonnull UUID organizationId, + @javax.annotation.Nonnull UUID areaId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID routingTableId, + @javax.annotation.Nonnull UUID routeId) + throws ApiException { + ApiResponse localVarResp = + getRouteOfRoutingTableWithHttpInfo( + organizationId, areaId, region, routingTableId, routeId); + return localVarResp.getData(); + } + + /** + * Get details about a route of a routing table. Get details about a route defined in a routing + * table of a network area. + * + * @param organizationId The identifier (ID) of a STACKIT Organization. (required) + * @param areaId The identifier (ID) of a STACKIT Network Area. (required) + * @param region The STACKIT Region of the resources. (required) + * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) + * @param routeId The identifier (ID) of a STACKIT Route. (required) + * @return ApiResponse<Route> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Show the details of a route in a routing table. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public ApiResponse getRouteOfRoutingTableWithHttpInfo( + @javax.annotation.Nonnull UUID organizationId, + @javax.annotation.Nonnull UUID areaId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID routingTableId, + @javax.annotation.Nonnull UUID routeId) + throws ApiException { + okhttp3.Call localVarCall = + getRouteOfRoutingTableValidateBeforeCall( + organizationId, areaId, region, routingTableId, routeId, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get details about a route of a routing table. (asynchronously) Get details about a route + * defined in a routing table of a network area. + * + * @param organizationId The identifier (ID) of a STACKIT Organization. (required) + * @param areaId The identifier (ID) of a STACKIT Network Area. (required) + * @param region The STACKIT Region of the resources. (required) + * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) + * @param routeId The identifier (ID) of a STACKIT Route. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Show the details of a route in a routing table. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public okhttp3.Call getRouteOfRoutingTableAsync( + @javax.annotation.Nonnull UUID organizationId, + @javax.annotation.Nonnull UUID areaId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID routingTableId, + @javax.annotation.Nonnull UUID routeId, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + getRouteOfRoutingTableValidateBeforeCall( + organizationId, areaId, region, routingTableId, routeId, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + /** + * Build call for getRoutingTableOfArea + * + * @param organizationId The identifier (ID) of a STACKIT Organization. (required) + * @param areaId The identifier (ID) of a STACKIT Network Area. (required) + * @param region The STACKIT Region of the resources. (required) + * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Show routing table details. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public okhttp3.Call getRoutingTableOfAreaCall( + @javax.annotation.Nonnull UUID organizationId, + @javax.annotation.Nonnull UUID areaId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID routingTableId, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = + "/v2alpha1/organizations/{organizationId}/network-areas/{areaId}/regions/{region}/routing-tables/{routingTableId}" + .replace( + "{" + "organizationId" + "}", + localVarApiClient.escapeString(organizationId.toString())) + .replace( + "{" + "areaId" + "}", + localVarApiClient.escapeString(areaId.toString())) + .replace( + "{" + "region" + "}", + localVarApiClient.escapeString(region.toString())) + .replace( + "{" + "routingTableId" + "}", + localVarApiClient.escapeString(routingTableId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getRoutingTableOfAreaValidateBeforeCall( + @javax.annotation.Nonnull UUID organizationId, + @javax.annotation.Nonnull UUID areaId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID routingTableId, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'organizationId' is set + if (organizationId == null) { + throw new ApiException( + "Missing the required parameter 'organizationId' when calling getRoutingTableOfArea(Async)"); + } + + // verify the required parameter 'areaId' is set + if (areaId == null) { + throw new ApiException( + "Missing the required parameter 'areaId' when calling getRoutingTableOfArea(Async)"); + } + + // verify the required parameter 'region' is set + if (region == null) { + throw new ApiException( + "Missing the required parameter 'region' when calling getRoutingTableOfArea(Async)"); + } + + // verify the required parameter 'routingTableId' is set + if (routingTableId == null) { + throw new ApiException( + "Missing the required parameter 'routingTableId' when calling getRoutingTableOfArea(Async)"); + } + + return getRoutingTableOfAreaCall(organizationId, areaId, region, routingTableId, _callback); + } + + /** + * Get details about a routing table. Get details about a routing table defined in a network + * area. + * + * @param organizationId The identifier (ID) of a STACKIT Organization. (required) + * @param areaId The identifier (ID) of a STACKIT Network Area. (required) + * @param region The STACKIT Region of the resources. (required) + * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) + * @return RoutingTable + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Show routing table details. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public RoutingTable getRoutingTableOfArea( + @javax.annotation.Nonnull UUID organizationId, + @javax.annotation.Nonnull UUID areaId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID routingTableId) + throws ApiException { + ApiResponse localVarResp = + getRoutingTableOfAreaWithHttpInfo(organizationId, areaId, region, routingTableId); + return localVarResp.getData(); + } + + /** + * Get details about a routing table. Get details about a routing table defined in a network + * area. + * + * @param organizationId The identifier (ID) of a STACKIT Organization. (required) + * @param areaId The identifier (ID) of a STACKIT Network Area. (required) + * @param region The STACKIT Region of the resources. (required) + * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) + * @return ApiResponse<RoutingTable> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Show routing table details. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public ApiResponse getRoutingTableOfAreaWithHttpInfo( + @javax.annotation.Nonnull UUID organizationId, + @javax.annotation.Nonnull UUID areaId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID routingTableId) + throws ApiException { + okhttp3.Call localVarCall = + getRoutingTableOfAreaValidateBeforeCall( + organizationId, areaId, region, routingTableId, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get details about a routing table. (asynchronously) Get details about a routing table defined + * in a network area. + * + * @param organizationId The identifier (ID) of a STACKIT Organization. (required) + * @param areaId The identifier (ID) of a STACKIT Network Area. (required) + * @param region The STACKIT Region of the resources. (required) + * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Show routing table details. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public okhttp3.Call getRoutingTableOfAreaAsync( + @javax.annotation.Nonnull UUID organizationId, + @javax.annotation.Nonnull UUID areaId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID routingTableId, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + getRoutingTableOfAreaValidateBeforeCall( + organizationId, areaId, region, routingTableId, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + /** + * Build call for getVPC + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Show VPC details. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public okhttp3.Call getVPCCall( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = + "/v2alpha1/projects/{projectId}/vpcs/{vpcId}" + .replace( + "{" + "projectId" + "}", + localVarApiClient.escapeString(projectId.toString())) + .replace( + "{" + "vpcId" + "}", + localVarApiClient.escapeString(vpcId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getVPCValidateBeforeCall( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'projectId' is set + if (projectId == null) { + throw new ApiException( + "Missing the required parameter 'projectId' when calling getVPC(Async)"); + } + + // verify the required parameter 'vpcId' is set + if (vpcId == null) { + throw new ApiException( + "Missing the required parameter 'vpcId' when calling getVPC(Async)"); + } + + return getVPCCall(projectId, vpcId, _callback); + } + + /** + * Get details about a VPC. Get details about a VPC in a project. + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) + * @return VPC + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Show VPC details. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public VPC getVPC( + @javax.annotation.Nonnull UUID projectId, @javax.annotation.Nonnull UUID vpcId) + throws ApiException { + ApiResponse localVarResp = getVPCWithHttpInfo(projectId, vpcId); + return localVarResp.getData(); + } + + /** + * Get details about a VPC. Get details about a VPC in a project. + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) + * @return ApiResponse<VPC> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Show VPC details. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public ApiResponse getVPCWithHttpInfo( + @javax.annotation.Nonnull UUID projectId, @javax.annotation.Nonnull UUID vpcId) + throws ApiException { + okhttp3.Call localVarCall = getVPCValidateBeforeCall(projectId, vpcId, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get details about a VPC. (asynchronously) Get details about a VPC in a project. + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Show VPC details. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public okhttp3.Call getVPCAsync( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = getVPCValidateBeforeCall(projectId, vpcId, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + /** + * Build call for getVPCNetworkRange + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) + * @param region The STACKIT Region of the resources. (required) + * @param networkRangeId The identifier (ID) of a STACKIT Network Range. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Show network range details. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public okhttp3.Call getVPCNetworkRangeCall( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID networkRangeId, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = + "/v2alpha1/projects/{projectId}/vpcs/{vpcId}/regions/{region}/network-ranges/{networkRangeId}" + .replace( + "{" + "projectId" + "}", + localVarApiClient.escapeString(projectId.toString())) + .replace( + "{" + "vpcId" + "}", + localVarApiClient.escapeString(vpcId.toString())) + .replace( + "{" + "region" + "}", + localVarApiClient.escapeString(region.toString())) + .replace( + "{" + "networkRangeId" + "}", + localVarApiClient.escapeString(networkRangeId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getVPCNetworkRangeValidateBeforeCall( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID networkRangeId, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'projectId' is set + if (projectId == null) { + throw new ApiException( + "Missing the required parameter 'projectId' when calling getVPCNetworkRange(Async)"); + } + + // verify the required parameter 'vpcId' is set + if (vpcId == null) { + throw new ApiException( + "Missing the required parameter 'vpcId' when calling getVPCNetworkRange(Async)"); + } + + // verify the required parameter 'region' is set + if (region == null) { + throw new ApiException( + "Missing the required parameter 'region' when calling getVPCNetworkRange(Async)"); + } + + // verify the required parameter 'networkRangeId' is set + if (networkRangeId == null) { + throw new ApiException( + "Missing the required parameter 'networkRangeId' when calling getVPCNetworkRange(Async)"); + } + + return getVPCNetworkRangeCall(projectId, vpcId, region, networkRangeId, _callback); + } + + /** + * Get details about a regional network range. Get details about a network range in a VPC for + * this region. + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) + * @param region The STACKIT Region of the resources. (required) + * @param networkRangeId The identifier (ID) of a STACKIT Network Range. (required) + * @return VPCNetworkRange + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Show network range details. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public VPCNetworkRange getVPCNetworkRange( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID networkRangeId) + throws ApiException { + ApiResponse localVarResp = + getVPCNetworkRangeWithHttpInfo(projectId, vpcId, region, networkRangeId); + return localVarResp.getData(); + } + + /** + * Get details about a regional network range. Get details about a network range in a VPC for + * this region. + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) + * @param region The STACKIT Region of the resources. (required) + * @param networkRangeId The identifier (ID) of a STACKIT Network Range. (required) + * @return ApiResponse<VPCNetworkRange> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Show network range details. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public ApiResponse getVPCNetworkRangeWithHttpInfo( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID networkRangeId) + throws ApiException { + okhttp3.Call localVarCall = + getVPCNetworkRangeValidateBeforeCall( + projectId, vpcId, region, networkRangeId, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get details about a regional network range. (asynchronously) Get details about a network + * range in a VPC for this region. + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) + * @param region The STACKIT Region of the resources. (required) + * @param networkRangeId The identifier (ID) of a STACKIT Network Range. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Show network range details. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public okhttp3.Call getVPCNetworkRangeAsync( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID networkRangeId, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + getVPCNetworkRangeValidateBeforeCall( + projectId, vpcId, region, networkRangeId, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + /** + * Build call for getVPCRegion + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) + * @param region The STACKIT Region of the resources. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Show the regional VPC configuration. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public okhttp3.Call getVPCRegionCall( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + @javax.annotation.Nonnull String region, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = + "/v2alpha1/projects/{projectId}/vpcs/{vpcId}/regions/{region}" + .replace( + "{" + "projectId" + "}", + localVarApiClient.escapeString(projectId.toString())) + .replace( + "{" + "vpcId" + "}", + localVarApiClient.escapeString(vpcId.toString())) + .replace( + "{" + "region" + "}", + localVarApiClient.escapeString(region.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getVPCRegionValidateBeforeCall( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + @javax.annotation.Nonnull String region, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'projectId' is set + if (projectId == null) { + throw new ApiException( + "Missing the required parameter 'projectId' when calling getVPCRegion(Async)"); + } + + // verify the required parameter 'vpcId' is set + if (vpcId == null) { + throw new ApiException( + "Missing the required parameter 'vpcId' when calling getVPCRegion(Async)"); + } + + // verify the required parameter 'region' is set + if (region == null) { + throw new ApiException( + "Missing the required parameter 'region' when calling getVPCRegion(Async)"); + } + + return getVPCRegionCall(projectId, vpcId, region, _callback); + } + + /** + * Get the regional configuration of a VPC. Get the current configuration of a region for a VPC. + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) + * @param region The STACKIT Region of the resources. (required) + * @return RegionalVPC + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Show the regional VPC configuration. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public RegionalVPC getVPCRegion( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + @javax.annotation.Nonnull String region) + throws ApiException { + ApiResponse localVarResp = getVPCRegionWithHttpInfo(projectId, vpcId, region); + return localVarResp.getData(); + } + + /** + * Get the regional configuration of a VPC. Get the current configuration of a region for a VPC. + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) + * @param region The STACKIT Region of the resources. (required) + * @return ApiResponse<RegionalVPC> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Show the regional VPC configuration. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public ApiResponse getVPCRegionWithHttpInfo( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + @javax.annotation.Nonnull String region) + throws ApiException { + okhttp3.Call localVarCall = getVPCRegionValidateBeforeCall(projectId, vpcId, region, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get the regional configuration of a VPC. (asynchronously) Get the current configuration of a + * region for a VPC. + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) + * @param region The STACKIT Region of the resources. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Show the regional VPC configuration. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public okhttp3.Call getVPCRegionAsync( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + @javax.annotation.Nonnull String region, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + getVPCRegionValidateBeforeCall(projectId, vpcId, region, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + /** + * Build call for getVPCRoutingTable + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) + * @param region The STACKIT Region of the resources. (required) + * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Show routing table details. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public okhttp3.Call getVPCRoutingTableCall( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID routingTableId, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = + "/v2alpha1/projects/{projectId}/vpcs/{vpcId}/regions/{region}/routing-tables/{routingTableId}" + .replace( + "{" + "projectId" + "}", + localVarApiClient.escapeString(projectId.toString())) + .replace( + "{" + "vpcId" + "}", + localVarApiClient.escapeString(vpcId.toString())) + .replace( + "{" + "region" + "}", + localVarApiClient.escapeString(region.toString())) + .replace( + "{" + "routingTableId" + "}", + localVarApiClient.escapeString(routingTableId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getVPCRoutingTableValidateBeforeCall( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID routingTableId, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'projectId' is set + if (projectId == null) { + throw new ApiException( + "Missing the required parameter 'projectId' when calling getVPCRoutingTable(Async)"); + } + + // verify the required parameter 'vpcId' is set + if (vpcId == null) { + throw new ApiException( + "Missing the required parameter 'vpcId' when calling getVPCRoutingTable(Async)"); + } + + // verify the required parameter 'region' is set + if (region == null) { + throw new ApiException( + "Missing the required parameter 'region' when calling getVPCRoutingTable(Async)"); + } + + // verify the required parameter 'routingTableId' is set + if (routingTableId == null) { + throw new ApiException( + "Missing the required parameter 'routingTableId' when calling getVPCRoutingTable(Async)"); + } + + return getVPCRoutingTableCall(projectId, vpcId, region, routingTableId, _callback); + } + + /** + * Get details about a regional routing table. Get details about a routing table of a VPC for + * this region. + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) + * @param region The STACKIT Region of the resources. (required) + * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) + * @return VPCRoutingTable + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Show routing table details. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public VPCRoutingTable getVPCRoutingTable( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID routingTableId) + throws ApiException { + ApiResponse localVarResp = + getVPCRoutingTableWithHttpInfo(projectId, vpcId, region, routingTableId); + return localVarResp.getData(); + } + + /** + * Get details about a regional routing table. Get details about a routing table of a VPC for + * this region. + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) + * @param region The STACKIT Region of the resources. (required) + * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) + * @return ApiResponse<VPCRoutingTable> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Show routing table details. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public ApiResponse getVPCRoutingTableWithHttpInfo( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID routingTableId) + throws ApiException { + okhttp3.Call localVarCall = + getVPCRoutingTableValidateBeforeCall( + projectId, vpcId, region, routingTableId, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get details about a regional routing table. (asynchronously) Get details about a routing + * table of a VPC for this region. + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) + * @param region The STACKIT Region of the resources. (required) + * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Show routing table details. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public okhttp3.Call getVPCRoutingTableAsync( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID routingTableId, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + getVPCRoutingTableValidateBeforeCall( + projectId, vpcId, region, routingTableId, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + /** + * Build call for getVPCStaticRoute + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) + * @param region The STACKIT Region of the resources. (required) + * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) + * @param routeId The identifier (ID) of a STACKIT Route. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Show static route details. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public okhttp3.Call getVPCStaticRouteCall( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID routingTableId, + @javax.annotation.Nonnull UUID routeId, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = + "/v2alpha1/projects/{projectId}/vpcs/{vpcId}/regions/{region}/routing-tables/{routingTableId}/static-routes/{routeId}" + .replace( + "{" + "projectId" + "}", + localVarApiClient.escapeString(projectId.toString())) + .replace( + "{" + "vpcId" + "}", + localVarApiClient.escapeString(vpcId.toString())) + .replace( + "{" + "region" + "}", + localVarApiClient.escapeString(region.toString())) + .replace( + "{" + "routingTableId" + "}", + localVarApiClient.escapeString(routingTableId.toString())) + .replace( + "{" + "routeId" + "}", + localVarApiClient.escapeString(routeId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getVPCStaticRouteValidateBeforeCall( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID routingTableId, + @javax.annotation.Nonnull UUID routeId, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'projectId' is set + if (projectId == null) { + throw new ApiException( + "Missing the required parameter 'projectId' when calling getVPCStaticRoute(Async)"); + } + + // verify the required parameter 'vpcId' is set + if (vpcId == null) { + throw new ApiException( + "Missing the required parameter 'vpcId' when calling getVPCStaticRoute(Async)"); + } + + // verify the required parameter 'region' is set + if (region == null) { + throw new ApiException( + "Missing the required parameter 'region' when calling getVPCStaticRoute(Async)"); + } + + // verify the required parameter 'routingTableId' is set + if (routingTableId == null) { + throw new ApiException( + "Missing the required parameter 'routingTableId' when calling getVPCStaticRoute(Async)"); + } + + // verify the required parameter 'routeId' is set + if (routeId == null) { + throw new ApiException( + "Missing the required parameter 'routeId' when calling getVPCStaticRoute(Async)"); + } + + return getVPCStaticRouteCall(projectId, vpcId, region, routingTableId, routeId, _callback); + } + + /** + * Get details about a regional static route. Get details about a static route of a VPC for this + * region. + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) + * @param region The STACKIT Region of the resources. (required) + * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) + * @param routeId The identifier (ID) of a STACKIT Route. (required) + * @return Route + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Show static route details. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public Route getVPCStaticRoute( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID routingTableId, + @javax.annotation.Nonnull UUID routeId) + throws ApiException { + ApiResponse localVarResp = + getVPCStaticRouteWithHttpInfo(projectId, vpcId, region, routingTableId, routeId); + return localVarResp.getData(); + } + + /** + * Get details about a regional static route. Get details about a static route of a VPC for this + * region. + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) + * @param region The STACKIT Region of the resources. (required) + * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) + * @param routeId The identifier (ID) of a STACKIT Route. (required) + * @return ApiResponse<Route> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Show static route details. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public ApiResponse getVPCStaticRouteWithHttpInfo( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID routingTableId, + @javax.annotation.Nonnull UUID routeId) + throws ApiException { + okhttp3.Call localVarCall = + getVPCStaticRouteValidateBeforeCall( + projectId, vpcId, region, routingTableId, routeId, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Get details about a regional static route. (asynchronously) Get details about a static route + * of a VPC for this region. + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) + * @param region The STACKIT Region of the resources. (required) + * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) + * @param routeId The identifier (ID) of a STACKIT Route. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Show static route details. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public okhttp3.Call getVPCStaticRouteAsync( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID routingTableId, + @javax.annotation.Nonnull UUID routeId, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + getVPCStaticRouteValidateBeforeCall( + projectId, vpcId, region, routingTableId, routeId, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + /** + * Build call for listNetworks + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param region The STACKIT Region of the resources. (required) + * @param labelSelector Filter resources by labels. (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 List all networks of a project. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public okhttp3.Call listNetworksCall( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nullable String labelSelector, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = + "/v2alpha1/projects/{projectId}/regions/{region}/networks" + .replace( + "{" + "projectId" + "}", + localVarApiClient.escapeString(projectId.toString())) + .replace( + "{" + "region" + "}", + localVarApiClient.escapeString(region.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (labelSelector != null) { + localVarQueryParams.addAll( + localVarApiClient.parameterToPair("label_selector", labelSelector)); + } + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call listNetworksValidateBeforeCall( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nullable String labelSelector, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'projectId' is set + if (projectId == null) { + throw new ApiException( + "Missing the required parameter 'projectId' when calling listNetworks(Async)"); + } + + // verify the required parameter 'region' is set + if (region == null) { + throw new ApiException( + "Missing the required parameter 'region' when calling listNetworks(Async)"); + } + + return listNetworksCall(projectId, region, labelSelector, _callback); + } + + /** + * List all networks inside a project. Get a list of all networks inside a project. + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param region The STACKIT Region of the resources. (required) + * @param labelSelector Filter resources by labels. (optional) + * @return NetworkListResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 List all networks of a project. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public NetworkListResponse listNetworks( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nullable String labelSelector) + throws ApiException { + ApiResponse localVarResp = + listNetworksWithHttpInfo(projectId, region, labelSelector); + return localVarResp.getData(); + } + + /** + * List all networks inside a project. Get a list of all networks inside a project. + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param region The STACKIT Region of the resources. (required) + * @param labelSelector Filter resources by labels. (optional) + * @return ApiResponse<NetworkListResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 List all networks of a project. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public ApiResponse listNetworksWithHttpInfo( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nullable String labelSelector) + throws ApiException { + okhttp3.Call localVarCall = + listNetworksValidateBeforeCall(projectId, region, labelSelector, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * List all networks inside a project. (asynchronously) Get a list of all networks inside a + * project. + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param region The STACKIT Region of the resources. (required) + * @param labelSelector Filter resources by labels. (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 List all networks of a project. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public okhttp3.Call listNetworksAsync( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nullable String labelSelector, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + listNetworksValidateBeforeCall(projectId, region, labelSelector, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + /** + * Build call for listNetworksOfRoutingTable + * + * @param organizationId The identifier (ID) of a STACKIT Organization. (required) + * @param areaId The identifier (ID) of a STACKIT Network Area. (required) + * @param region The STACKIT Region of the resources. (required) + * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 List all routing table networks. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public okhttp3.Call listNetworksOfRoutingTableCall( + @javax.annotation.Nonnull UUID organizationId, + @javax.annotation.Nonnull UUID areaId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID routingTableId, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = + "/v2alpha1/organizations/{organizationId}/network-areas/{areaId}/regions/{region}/routing-tables/{routingTableId}/networks" + .replace( + "{" + "organizationId" + "}", + localVarApiClient.escapeString(organizationId.toString())) + .replace( + "{" + "areaId" + "}", + localVarApiClient.escapeString(areaId.toString())) + .replace( + "{" + "region" + "}", + localVarApiClient.escapeString(region.toString())) + .replace( + "{" + "routingTableId" + "}", + localVarApiClient.escapeString(routingTableId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call listNetworksOfRoutingTableValidateBeforeCall( + @javax.annotation.Nonnull UUID organizationId, + @javax.annotation.Nonnull UUID areaId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID routingTableId, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'organizationId' is set + if (organizationId == null) { + throw new ApiException( + "Missing the required parameter 'organizationId' when calling listNetworksOfRoutingTable(Async)"); + } + + // verify the required parameter 'areaId' is set + if (areaId == null) { + throw new ApiException( + "Missing the required parameter 'areaId' when calling listNetworksOfRoutingTable(Async)"); + } + + // verify the required parameter 'region' is set + if (region == null) { + throw new ApiException( + "Missing the required parameter 'region' when calling listNetworksOfRoutingTable(Async)"); + } + + // verify the required parameter 'routingTableId' is set + if (routingTableId == null) { + throw new ApiException( + "Missing the required parameter 'routingTableId' when calling listNetworksOfRoutingTable(Async)"); + } + + return listNetworksOfRoutingTableCall( + organizationId, areaId, region, routingTableId, _callback); + } + + /** + * List all networks in a routing table. Get a list of all networks in a routing table of a + * network area. + * + * @param organizationId The identifier (ID) of a STACKIT Organization. (required) + * @param areaId The identifier (ID) of a STACKIT Network Area. (required) + * @param region The STACKIT Region of the resources. (required) + * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) + * @return NetworkListResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 List all routing table networks. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public NetworkListResponse listNetworksOfRoutingTable( + @javax.annotation.Nonnull UUID organizationId, + @javax.annotation.Nonnull UUID areaId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID routingTableId) + throws ApiException { + ApiResponse localVarResp = + listNetworksOfRoutingTableWithHttpInfo( + organizationId, areaId, region, routingTableId); + return localVarResp.getData(); + } + + /** + * List all networks in a routing table. Get a list of all networks in a routing table of a + * network area. + * + * @param organizationId The identifier (ID) of a STACKIT Organization. (required) + * @param areaId The identifier (ID) of a STACKIT Network Area. (required) + * @param region The STACKIT Region of the resources. (required) + * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) + * @return ApiResponse<NetworkListResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 List all routing table networks. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public ApiResponse listNetworksOfRoutingTableWithHttpInfo( + @javax.annotation.Nonnull UUID organizationId, + @javax.annotation.Nonnull UUID areaId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID routingTableId) + throws ApiException { + okhttp3.Call localVarCall = + listNetworksOfRoutingTableValidateBeforeCall( + organizationId, areaId, region, routingTableId, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * List all networks in a routing table. (asynchronously) Get a list of all networks in a + * routing table of a network area. + * + * @param organizationId The identifier (ID) of a STACKIT Organization. (required) + * @param areaId The identifier (ID) of a STACKIT Network Area. (required) + * @param region The STACKIT Region of the resources. (required) + * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 List all routing table networks. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public okhttp3.Call listNetworksOfRoutingTableAsync( + @javax.annotation.Nonnull UUID organizationId, + @javax.annotation.Nonnull UUID areaId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID routingTableId, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + listNetworksOfRoutingTableValidateBeforeCall( + organizationId, areaId, region, routingTableId, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + /** + * Build call for listRoutesOfRoutingTable + * + * @param organizationId The identifier (ID) of a STACKIT Organization. (required) + * @param areaId The identifier (ID) of a STACKIT Network Area. (required) + * @param region The STACKIT Region of the resources. (required) + * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) + * @param labelSelector Filter resources by labels. (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 List all routing table routes. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public okhttp3.Call listRoutesOfRoutingTableCall( + @javax.annotation.Nonnull UUID organizationId, + @javax.annotation.Nonnull UUID areaId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID routingTableId, + @javax.annotation.Nullable String labelSelector, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = + "/v2alpha1/organizations/{organizationId}/network-areas/{areaId}/regions/{region}/routing-tables/{routingTableId}/routes" + .replace( + "{" + "organizationId" + "}", + localVarApiClient.escapeString(organizationId.toString())) + .replace( + "{" + "areaId" + "}", + localVarApiClient.escapeString(areaId.toString())) + .replace( + "{" + "region" + "}", + localVarApiClient.escapeString(region.toString())) + .replace( + "{" + "routingTableId" + "}", + localVarApiClient.escapeString(routingTableId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (labelSelector != null) { + localVarQueryParams.addAll( + localVarApiClient.parameterToPair("label_selector", labelSelector)); + } + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call listRoutesOfRoutingTableValidateBeforeCall( + @javax.annotation.Nonnull UUID organizationId, + @javax.annotation.Nonnull UUID areaId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID routingTableId, + @javax.annotation.Nullable String labelSelector, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'organizationId' is set + if (organizationId == null) { + throw new ApiException( + "Missing the required parameter 'organizationId' when calling listRoutesOfRoutingTable(Async)"); + } + + // verify the required parameter 'areaId' is set + if (areaId == null) { + throw new ApiException( + "Missing the required parameter 'areaId' when calling listRoutesOfRoutingTable(Async)"); + } + + // verify the required parameter 'region' is set + if (region == null) { + throw new ApiException( + "Missing the required parameter 'region' when calling listRoutesOfRoutingTable(Async)"); + } + + // verify the required parameter 'routingTableId' is set + if (routingTableId == null) { + throw new ApiException( + "Missing the required parameter 'routingTableId' when calling listRoutesOfRoutingTable(Async)"); + } + + return listRoutesOfRoutingTableCall( + organizationId, areaId, region, routingTableId, labelSelector, _callback); + } + + /** + * List all routes in a routing table. Get a list of all routes in a routing table of a network + * area. + * + * @param organizationId The identifier (ID) of a STACKIT Organization. (required) + * @param areaId The identifier (ID) of a STACKIT Network Area. (required) + * @param region The STACKIT Region of the resources. (required) + * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) + * @param labelSelector Filter resources by labels. (optional) + * @return RouteListResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 List all routing table routes. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public RouteListResponse listRoutesOfRoutingTable( + @javax.annotation.Nonnull UUID organizationId, + @javax.annotation.Nonnull UUID areaId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID routingTableId, + @javax.annotation.Nullable String labelSelector) + throws ApiException { + ApiResponse localVarResp = + listRoutesOfRoutingTableWithHttpInfo( + organizationId, areaId, region, routingTableId, labelSelector); + return localVarResp.getData(); + } + + /** + * List all routes in a routing table. Get a list of all routes in a routing table of a network + * area. + * + * @param organizationId The identifier (ID) of a STACKIT Organization. (required) + * @param areaId The identifier (ID) of a STACKIT Network Area. (required) + * @param region The STACKIT Region of the resources. (required) + * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) + * @param labelSelector Filter resources by labels. (optional) + * @return ApiResponse<RouteListResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 List all routing table routes. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public ApiResponse listRoutesOfRoutingTableWithHttpInfo( + @javax.annotation.Nonnull UUID organizationId, + @javax.annotation.Nonnull UUID areaId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID routingTableId, + @javax.annotation.Nullable String labelSelector) + throws ApiException { + okhttp3.Call localVarCall = + listRoutesOfRoutingTableValidateBeforeCall( + organizationId, areaId, region, routingTableId, labelSelector, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * List all routes in a routing table. (asynchronously) Get a list of all routes in a routing + * table of a network area. + * + * @param organizationId The identifier (ID) of a STACKIT Organization. (required) + * @param areaId The identifier (ID) of a STACKIT Network Area. (required) + * @param region The STACKIT Region of the resources. (required) + * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) + * @param labelSelector Filter resources by labels. (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 List all routing table routes. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public okhttp3.Call listRoutesOfRoutingTableAsync( + @javax.annotation.Nonnull UUID organizationId, + @javax.annotation.Nonnull UUID areaId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID routingTableId, + @javax.annotation.Nullable String labelSelector, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + listRoutesOfRoutingTableValidateBeforeCall( + organizationId, areaId, region, routingTableId, labelSelector, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + /** + * Build call for listRoutingTablesOfArea + * + * @param organizationId The identifier (ID) of a STACKIT Organization. (required) + * @param areaId The identifier (ID) of a STACKIT Network Area. (required) + * @param region The STACKIT Region of the resources. (required) + * @param labelSelector Filter resources by labels. (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 List all routing tables. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public okhttp3.Call listRoutingTablesOfAreaCall( + @javax.annotation.Nonnull UUID organizationId, + @javax.annotation.Nonnull UUID areaId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nullable String labelSelector, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = + "/v2alpha1/organizations/{organizationId}/network-areas/{areaId}/regions/{region}/routing-tables" + .replace( + "{" + "organizationId" + "}", + localVarApiClient.escapeString(organizationId.toString())) + .replace( + "{" + "areaId" + "}", + localVarApiClient.escapeString(areaId.toString())) + .replace( + "{" + "region" + "}", + localVarApiClient.escapeString(region.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (labelSelector != null) { + localVarQueryParams.addAll( + localVarApiClient.parameterToPair("label_selector", labelSelector)); + } + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call listRoutingTablesOfAreaValidateBeforeCall( + @javax.annotation.Nonnull UUID organizationId, + @javax.annotation.Nonnull UUID areaId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nullable String labelSelector, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'organizationId' is set + if (organizationId == null) { + throw new ApiException( + "Missing the required parameter 'organizationId' when calling listRoutingTablesOfArea(Async)"); + } + + // verify the required parameter 'areaId' is set + if (areaId == null) { + throw new ApiException( + "Missing the required parameter 'areaId' when calling listRoutingTablesOfArea(Async)"); + } + + // verify the required parameter 'region' is set + if (region == null) { + throw new ApiException( + "Missing the required parameter 'region' when calling listRoutingTablesOfArea(Async)"); + } + + return listRoutingTablesOfAreaCall( + organizationId, areaId, region, labelSelector, _callback); + } + + /** + * List all routing tables in a network area. Get a list of all routing tables in a network + * area. + * + * @param organizationId The identifier (ID) of a STACKIT Organization. (required) + * @param areaId The identifier (ID) of a STACKIT Network Area. (required) + * @param region The STACKIT Region of the resources. (required) + * @param labelSelector Filter resources by labels. (optional) + * @return RoutingTableListResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 List all routing tables. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public RoutingTableListResponse listRoutingTablesOfArea( + @javax.annotation.Nonnull UUID organizationId, + @javax.annotation.Nonnull UUID areaId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nullable String labelSelector) + throws ApiException { + ApiResponse localVarResp = + listRoutingTablesOfAreaWithHttpInfo(organizationId, areaId, region, labelSelector); + return localVarResp.getData(); + } + + /** + * List all routing tables in a network area. Get a list of all routing tables in a network + * area. + * + * @param organizationId The identifier (ID) of a STACKIT Organization. (required) + * @param areaId The identifier (ID) of a STACKIT Network Area. (required) + * @param region The STACKIT Region of the resources. (required) + * @param labelSelector Filter resources by labels. (optional) + * @return ApiResponse<RoutingTableListResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 List all routing tables. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public ApiResponse listRoutingTablesOfAreaWithHttpInfo( + @javax.annotation.Nonnull UUID organizationId, + @javax.annotation.Nonnull UUID areaId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nullable String labelSelector) + throws ApiException { + okhttp3.Call localVarCall = + listRoutingTablesOfAreaValidateBeforeCall( + organizationId, areaId, region, labelSelector, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * List all routing tables in a network area. (asynchronously) Get a list of all routing tables + * in a network area. + * + * @param organizationId The identifier (ID) of a STACKIT Organization. (required) + * @param areaId The identifier (ID) of a STACKIT Network Area. (required) + * @param region The STACKIT Region of the resources. (required) + * @param labelSelector Filter resources by labels. (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 List all routing tables. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public okhttp3.Call listRoutingTablesOfAreaAsync( + @javax.annotation.Nonnull UUID organizationId, + @javax.annotation.Nonnull UUID areaId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nullable String labelSelector, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + listRoutingTablesOfAreaValidateBeforeCall( + organizationId, areaId, region, labelSelector, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + /** + * Build call for listVPCNetworkRanges + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) + * @param region The STACKIT Region of the resources. (required) + * @param labelSelector Filter resources by labels. (optional) + * @param filter Filter resources by fields. A subset of expr-lang is supported. See + * https://expr-lang.org/docs/language-definition for usage details. (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 List all network ranges. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public okhttp3.Call listVPCNetworkRangesCall( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nullable String labelSelector, + @javax.annotation.Nullable String filter, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = + "/v2alpha1/projects/{projectId}/vpcs/{vpcId}/regions/{region}/network-ranges" + .replace( + "{" + "projectId" + "}", + localVarApiClient.escapeString(projectId.toString())) + .replace( + "{" + "vpcId" + "}", + localVarApiClient.escapeString(vpcId.toString())) + .replace( + "{" + "region" + "}", + localVarApiClient.escapeString(region.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (labelSelector != null) { + localVarQueryParams.addAll( + localVarApiClient.parameterToPair("label_selector", labelSelector)); + } + + if (filter != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("filter", filter)); + } + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call listVPCNetworkRangesValidateBeforeCall( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nullable String labelSelector, + @javax.annotation.Nullable String filter, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'projectId' is set + if (projectId == null) { + throw new ApiException( + "Missing the required parameter 'projectId' when calling listVPCNetworkRanges(Async)"); + } + + // verify the required parameter 'vpcId' is set + if (vpcId == null) { + throw new ApiException( + "Missing the required parameter 'vpcId' when calling listVPCNetworkRanges(Async)"); + } + + // verify the required parameter 'region' is set + if (region == null) { + throw new ApiException( + "Missing the required parameter 'region' when calling listVPCNetworkRanges(Async)"); + } + + return listVPCNetworkRangesCall(projectId, vpcId, region, labelSelector, filter, _callback); + } + + /** + * List all regional network ranges in a VPC. Get a list of all network ranges in a VPC for this + * region. + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) + * @param region The STACKIT Region of the resources. (required) + * @param labelSelector Filter resources by labels. (optional) + * @param filter Filter resources by fields. A subset of expr-lang is supported. See + * https://expr-lang.org/docs/language-definition for usage details. (optional) + * @return VPCNetworkRangeList + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 List all network ranges. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public VPCNetworkRangeList listVPCNetworkRanges( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nullable String labelSelector, + @javax.annotation.Nullable String filter) + throws ApiException { + ApiResponse localVarResp = + listVPCNetworkRangesWithHttpInfo(projectId, vpcId, region, labelSelector, filter); + return localVarResp.getData(); + } + + /** + * List all regional network ranges in a VPC. Get a list of all network ranges in a VPC for this + * region. + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) + * @param region The STACKIT Region of the resources. (required) + * @param labelSelector Filter resources by labels. (optional) + * @param filter Filter resources by fields. A subset of expr-lang is supported. See + * https://expr-lang.org/docs/language-definition for usage details. (optional) + * @return ApiResponse<VPCNetworkRangeList> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 List all network ranges. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public ApiResponse listVPCNetworkRangesWithHttpInfo( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nullable String labelSelector, + @javax.annotation.Nullable String filter) + throws ApiException { + okhttp3.Call localVarCall = + listVPCNetworkRangesValidateBeforeCall( + projectId, vpcId, region, labelSelector, filter, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * List all regional network ranges in a VPC. (asynchronously) Get a list of all network ranges + * in a VPC for this region. + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) + * @param region The STACKIT Region of the resources. (required) + * @param labelSelector Filter resources by labels. (optional) + * @param filter Filter resources by fields. A subset of expr-lang is supported. See + * https://expr-lang.org/docs/language-definition for usage details. (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 List all network ranges. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public okhttp3.Call listVPCNetworkRangesAsync( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nullable String labelSelector, + @javax.annotation.Nullable String filter, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + listVPCNetworkRangesValidateBeforeCall( + projectId, vpcId, region, labelSelector, filter, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + /** + * Build call for listVPCRegions + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 List all configured VPC regions. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public okhttp3.Call listVPCRegionsCall( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = + "/v2alpha1/projects/{projectId}/vpcs/{vpcId}/regions" + .replace( + "{" + "projectId" + "}", + localVarApiClient.escapeString(projectId.toString())) + .replace( + "{" + "vpcId" + "}", + localVarApiClient.escapeString(vpcId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call listVPCRegionsValidateBeforeCall( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'projectId' is set + if (projectId == null) { + throw new ApiException( + "Missing the required parameter 'projectId' when calling listVPCRegions(Async)"); + } + + // verify the required parameter 'vpcId' is set + if (vpcId == null) { + throw new ApiException( + "Missing the required parameter 'vpcId' when calling listVPCRegions(Async)"); + } + + return listVPCRegionsCall(projectId, vpcId, _callback); + } + + /** + * List all configured regions in a VPC. Get a list of all configured regions in a VPC. + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) + * @return RegionalVPCList + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 List all configured VPC regions. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public RegionalVPCList listVPCRegions( + @javax.annotation.Nonnull UUID projectId, @javax.annotation.Nonnull UUID vpcId) + throws ApiException { + ApiResponse localVarResp = listVPCRegionsWithHttpInfo(projectId, vpcId); + return localVarResp.getData(); + } + + /** + * List all configured regions in a VPC. Get a list of all configured regions in a VPC. + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) + * @return ApiResponse<RegionalVPCList> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 List all configured VPC regions. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public ApiResponse listVPCRegionsWithHttpInfo( + @javax.annotation.Nonnull UUID projectId, @javax.annotation.Nonnull UUID vpcId) + throws ApiException { + okhttp3.Call localVarCall = listVPCRegionsValidateBeforeCall(projectId, vpcId, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * List all configured regions in a VPC. (asynchronously) Get a list of all configured regions + * in a VPC. + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 List all configured VPC regions. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public okhttp3.Call listVPCRegionsAsync( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = listVPCRegionsValidateBeforeCall(projectId, vpcId, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + /** + * Build call for listVPCRoutingTables + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) + * @param region The STACKIT Region of the resources. (required) + * @param labelSelector Filter resources by labels. (optional) + * @param filter Filter resources by fields. A subset of expr-lang is supported. See + * https://expr-lang.org/docs/language-definition for usage details. (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 List all routing tables. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public okhttp3.Call listVPCRoutingTablesCall( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nullable String labelSelector, + @javax.annotation.Nullable String filter, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = + "/v2alpha1/projects/{projectId}/vpcs/{vpcId}/regions/{region}/routing-tables" + .replace( + "{" + "projectId" + "}", + localVarApiClient.escapeString(projectId.toString())) + .replace( + "{" + "vpcId" + "}", + localVarApiClient.escapeString(vpcId.toString())) + .replace( + "{" + "region" + "}", + localVarApiClient.escapeString(region.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (labelSelector != null) { + localVarQueryParams.addAll( + localVarApiClient.parameterToPair("label_selector", labelSelector)); + } + + if (filter != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("filter", filter)); + } + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call listVPCRoutingTablesValidateBeforeCall( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nullable String labelSelector, + @javax.annotation.Nullable String filter, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'projectId' is set + if (projectId == null) { + throw new ApiException( + "Missing the required parameter 'projectId' when calling listVPCRoutingTables(Async)"); + } + + // verify the required parameter 'vpcId' is set + if (vpcId == null) { + throw new ApiException( + "Missing the required parameter 'vpcId' when calling listVPCRoutingTables(Async)"); + } + + // verify the required parameter 'region' is set + if (region == null) { + throw new ApiException( + "Missing the required parameter 'region' when calling listVPCRoutingTables(Async)"); + } + + return listVPCRoutingTablesCall(projectId, vpcId, region, labelSelector, filter, _callback); + } + + /** + * List all regional routing tables in a VPC. Get a list of all routing tables in a VPC for this + * region. + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) + * @param region The STACKIT Region of the resources. (required) + * @param labelSelector Filter resources by labels. (optional) + * @param filter Filter resources by fields. A subset of expr-lang is supported. See + * https://expr-lang.org/docs/language-definition for usage details. (optional) + * @return VPCRoutingTableList + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 List all routing tables. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public VPCRoutingTableList listVPCRoutingTables( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nullable String labelSelector, + @javax.annotation.Nullable String filter) + throws ApiException { + ApiResponse localVarResp = + listVPCRoutingTablesWithHttpInfo(projectId, vpcId, region, labelSelector, filter); + return localVarResp.getData(); + } + + /** + * List all regional routing tables in a VPC. Get a list of all routing tables in a VPC for this + * region. + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) + * @param region The STACKIT Region of the resources. (required) + * @param labelSelector Filter resources by labels. (optional) + * @param filter Filter resources by fields. A subset of expr-lang is supported. See + * https://expr-lang.org/docs/language-definition for usage details. (optional) + * @return ApiResponse<VPCRoutingTableList> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 List all routing tables. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public ApiResponse listVPCRoutingTablesWithHttpInfo( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nullable String labelSelector, + @javax.annotation.Nullable String filter) + throws ApiException { + okhttp3.Call localVarCall = + listVPCRoutingTablesValidateBeforeCall( + projectId, vpcId, region, labelSelector, filter, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * List all regional routing tables in a VPC. (asynchronously) Get a list of all routing tables + * in a VPC for this region. + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) + * @param region The STACKIT Region of the resources. (required) + * @param labelSelector Filter resources by labels. (optional) + * @param filter Filter resources by fields. A subset of expr-lang is supported. See + * https://expr-lang.org/docs/language-definition for usage details. (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 List all routing tables. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public okhttp3.Call listVPCRoutingTablesAsync( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nullable String labelSelector, + @javax.annotation.Nullable String filter, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + listVPCRoutingTablesValidateBeforeCall( + projectId, vpcId, region, labelSelector, filter, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + /** + * Build call for listVPCStaticRoutes + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) + * @param region The STACKIT Region of the resources. (required) + * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) + * @param labelSelector Filter resources by labels. (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 List all static routes. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public okhttp3.Call listVPCStaticRoutesCall( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID routingTableId, + @javax.annotation.Nullable String labelSelector, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = + "/v2alpha1/projects/{projectId}/vpcs/{vpcId}/regions/{region}/routing-tables/{routingTableId}/static-routes" + .replace( + "{" + "projectId" + "}", + localVarApiClient.escapeString(projectId.toString())) + .replace( + "{" + "vpcId" + "}", + localVarApiClient.escapeString(vpcId.toString())) + .replace( + "{" + "region" + "}", + localVarApiClient.escapeString(region.toString())) + .replace( + "{" + "routingTableId" + "}", + localVarApiClient.escapeString(routingTableId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (labelSelector != null) { + localVarQueryParams.addAll( + localVarApiClient.parameterToPair("label_selector", labelSelector)); + } + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call listVPCStaticRoutesValidateBeforeCall( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID routingTableId, + @javax.annotation.Nullable String labelSelector, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'projectId' is set + if (projectId == null) { + throw new ApiException( + "Missing the required parameter 'projectId' when calling listVPCStaticRoutes(Async)"); + } + + // verify the required parameter 'vpcId' is set + if (vpcId == null) { + throw new ApiException( + "Missing the required parameter 'vpcId' when calling listVPCStaticRoutes(Async)"); + } + + // verify the required parameter 'region' is set + if (region == null) { + throw new ApiException( + "Missing the required parameter 'region' when calling listVPCStaticRoutes(Async)"); + } + + // verify the required parameter 'routingTableId' is set + if (routingTableId == null) { + throw new ApiException( + "Missing the required parameter 'routingTableId' when calling listVPCStaticRoutes(Async)"); + } + + return listVPCStaticRoutesCall( + projectId, vpcId, region, routingTableId, labelSelector, _callback); + } + + /** + * List all regional static routes in a VPC. Get a list of all static routes of a VPC for this + * region. + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) + * @param region The STACKIT Region of the resources. (required) + * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) + * @param labelSelector Filter resources by labels. (optional) + * @return RouteListResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 List all static routes. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public RouteListResponse listVPCStaticRoutes( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID routingTableId, + @javax.annotation.Nullable String labelSelector) + throws ApiException { + ApiResponse localVarResp = + listVPCStaticRoutesWithHttpInfo( + projectId, vpcId, region, routingTableId, labelSelector); + return localVarResp.getData(); + } + + /** + * List all regional static routes in a VPC. Get a list of all static routes of a VPC for this + * region. + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) + * @param region The STACKIT Region of the resources. (required) + * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) + * @param labelSelector Filter resources by labels. (optional) + * @return ApiResponse<RouteListResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 List all static routes. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public ApiResponse listVPCStaticRoutesWithHttpInfo( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID routingTableId, + @javax.annotation.Nullable String labelSelector) + throws ApiException { + okhttp3.Call localVarCall = + listVPCStaticRoutesValidateBeforeCall( + projectId, vpcId, region, routingTableId, labelSelector, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * List all regional static routes in a VPC. (asynchronously) Get a list of all static routes of + * a VPC for this region. + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) + * @param region The STACKIT Region of the resources. (required) + * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) + * @param labelSelector Filter resources by labels. (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 List all static routes. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public okhttp3.Call listVPCStaticRoutesAsync( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID routingTableId, + @javax.annotation.Nullable String labelSelector, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + listVPCStaticRoutesValidateBeforeCall( + projectId, vpcId, region, routingTableId, labelSelector, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + /** + * Build call for listVPCs + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param labelSelector Filter resources by labels. (optional) + * @param filter Filter resources by fields. A subset of expr-lang is supported. See + * https://expr-lang.org/docs/language-definition for usage details. (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Get a list of all VPCs. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public okhttp3.Call listVPCsCall( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nullable String labelSelector, + @javax.annotation.Nullable String filter, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = + "/v2alpha1/projects/{projectId}/vpcs" + .replace( + "{" + "projectId" + "}", + localVarApiClient.escapeString(projectId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (labelSelector != null) { + localVarQueryParams.addAll( + localVarApiClient.parameterToPair("label_selector", labelSelector)); + } + + if (filter != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("filter", filter)); + } + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "GET", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call listVPCsValidateBeforeCall( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nullable String labelSelector, + @javax.annotation.Nullable String filter, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'projectId' is set + if (projectId == null) { + throw new ApiException( + "Missing the required parameter 'projectId' when calling listVPCs(Async)"); + } + + return listVPCsCall(projectId, labelSelector, filter, _callback); + } + + /** + * List project VPCs. List all visible VPCs of this project. To list shared VPCs from other + * projects of the organization use the `List all shared VPCs` endpoint. + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param labelSelector Filter resources by labels. (optional) + * @param filter Filter resources by fields. A subset of expr-lang is supported. See + * https://expr-lang.org/docs/language-definition for usage details. (optional) + * @return VPCList + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Get a list of all VPCs. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public VPCList listVPCs( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nullable String labelSelector, + @javax.annotation.Nullable String filter) + throws ApiException { + ApiResponse localVarResp = listVPCsWithHttpInfo(projectId, labelSelector, filter); + return localVarResp.getData(); + } + + /** + * List project VPCs. List all visible VPCs of this project. To list shared VPCs from other + * projects of the organization use the `List all shared VPCs` endpoint. + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param labelSelector Filter resources by labels. (optional) + * @param filter Filter resources by fields. A subset of expr-lang is supported. See + * https://expr-lang.org/docs/language-definition for usage details. (optional) + * @return ApiResponse<VPCList> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Get a list of all VPCs. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public ApiResponse listVPCsWithHttpInfo( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nullable String labelSelector, + @javax.annotation.Nullable String filter) + throws ApiException { + okhttp3.Call localVarCall = + listVPCsValidateBeforeCall(projectId, labelSelector, filter, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * List project VPCs. (asynchronously) List all visible VPCs of this project. To list shared + * VPCs from other projects of the organization use the `List all shared VPCs` + * endpoint. + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param labelSelector Filter resources by labels. (optional) + * @param filter Filter resources by fields. A subset of expr-lang is supported. See + * https://expr-lang.org/docs/language-definition for usage details. (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
200 Get a list of all VPCs. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public okhttp3.Call listVPCsAsync( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nullable String labelSelector, + @javax.annotation.Nullable String filter, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + listVPCsValidateBeforeCall(projectId, labelSelector, filter, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } + + /** + * Build call for partialUpdateNetwork + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param region The STACKIT Region of the resources. (required) + * @param networkId The identifier (ID) of a STACKIT Network. (required) + * @param partialUpdateNetworkPayload Request an update of a network. (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
202 An update was accepted. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public okhttp3.Call partialUpdateNetworkCall( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID networkId, + @javax.annotation.Nonnull PartialUpdateNetworkPayload partialUpdateNetworkPayload, + final ApiCallback _callback) + throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] {}; + + // Determine Base Path to Use + if (localCustomBaseUrl != null) { + basePath = localCustomBaseUrl; + } else if (localBasePaths.length > 0) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = partialUpdateNetworkPayload; + + // create path and map variables + String localVarPath = + "/v2alpha1/projects/{projectId}/regions/{region}/networks/{networkId}" + .replace( + "{" + "projectId" + "}", + localVarApiClient.escapeString(projectId.toString())) + .replace( + "{" + "region" + "}", + localVarApiClient.escapeString(region.toString())) + .replace( + "{" + "networkId" + "}", + localVarApiClient.escapeString(networkId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = {"application/json"}; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = {"application/json"}; + final String localVarContentType = + localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] {}; + return localVarApiClient.buildCall( + basePath, + localVarPath, + "PATCH", + localVarQueryParams, + localVarCollectionQueryParams, + localVarPostBody, + localVarHeaderParams, + localVarCookieParams, + localVarFormParams, + localVarAuthNames, + _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call partialUpdateNetworkValidateBeforeCall( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID networkId, + @javax.annotation.Nonnull PartialUpdateNetworkPayload partialUpdateNetworkPayload, + final ApiCallback _callback) + throws ApiException { + // verify the required parameter 'projectId' is set + if (projectId == null) { + throw new ApiException( + "Missing the required parameter 'projectId' when calling partialUpdateNetwork(Async)"); + } + + // verify the required parameter 'region' is set + if (region == null) { + throw new ApiException( + "Missing the required parameter 'region' when calling partialUpdateNetwork(Async)"); + } + + // verify the required parameter 'networkId' is set + if (networkId == null) { + throw new ApiException( + "Missing the required parameter 'networkId' when calling partialUpdateNetwork(Async)"); + } + + // verify the required parameter 'partialUpdateNetworkPayload' is set + if (partialUpdateNetworkPayload == null) { + throw new ApiException( + "Missing the required parameter 'partialUpdateNetworkPayload' when calling partialUpdateNetwork(Async)"); + } + + return partialUpdateNetworkCall( + projectId, region, networkId, partialUpdateNetworkPayload, _callback); + } + + /** + * Update network settings. Update the settings of a network inside a project. + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param region The STACKIT Region of the resources. (required) + * @param networkId The identifier (ID) of a STACKIT Network. (required) + * @param partialUpdateNetworkPayload Request an update of a network. (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
202 An update was accepted. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public void partialUpdateNetwork( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID networkId, + @javax.annotation.Nonnull PartialUpdateNetworkPayload partialUpdateNetworkPayload) + throws ApiException { + partialUpdateNetworkWithHttpInfo(projectId, region, networkId, partialUpdateNetworkPayload); + } + + /** + * Update network settings. Update the settings of a network inside a project. + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param region The STACKIT Region of the resources. (required) + * @param networkId The identifier (ID) of a STACKIT Network. (required) + * @param partialUpdateNetworkPayload Request an update of a network. (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the + * response body + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
202 An update was accepted. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public ApiResponse partialUpdateNetworkWithHttpInfo( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID networkId, + @javax.annotation.Nonnull PartialUpdateNetworkPayload partialUpdateNetworkPayload) + throws ApiException { + okhttp3.Call localVarCall = + partialUpdateNetworkValidateBeforeCall( + projectId, region, networkId, partialUpdateNetworkPayload, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Update network settings. (asynchronously) Update the settings of a network inside a project. + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param region The STACKIT Region of the resources. (required) + * @param networkId The identifier (ID) of a STACKIT Network. (required) + * @param partialUpdateNetworkPayload Request an update of a network. (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body + * object + * @http.response.details + * + * + * + * + * + * + * + * + * + *
Response Details
Status Code Description Response Headers
202 An update was accepted. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
+ */ + public okhttp3.Call partialUpdateNetworkAsync( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull String region, + @javax.annotation.Nonnull UUID networkId, + @javax.annotation.Nonnull PartialUpdateNetworkPayload partialUpdateNetworkPayload, + final ApiCallback _callback) + throws ApiException { + + okhttp3.Call localVarCall = + partialUpdateNetworkValidateBeforeCall( + projectId, region, networkId, partialUpdateNetworkPayload, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } + + /** + * Build call for partialUpdateVPC + * + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) + * @param partialUpdateVPCPayload Request to update a VPC. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -2296,18 +8248,19 @@ public okhttp3.Call getRoutingTableOfAreaAsync( * * * - * + * * * * * + * * *
Response Details
Status Code Description Response Headers
200 List all networks of a project. -
200 VPC has been updated. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
*/ - public okhttp3.Call listNetworksCall( + public okhttp3.Call partialUpdateVPCCall( @javax.annotation.Nonnull UUID projectId, - @javax.annotation.Nonnull String region, - @javax.annotation.Nullable String labelSelector, + @javax.annotation.Nonnull UUID vpcId, + @javax.annotation.Nonnull PartialUpdateVPCPayload partialUpdateVPCPayload, final ApiCallback _callback) throws ApiException { String basePath = null; @@ -2323,17 +8276,17 @@ public okhttp3.Call listNetworksCall( basePath = null; } - Object localVarPostBody = null; + Object localVarPostBody = partialUpdateVPCPayload; // create path and map variables String localVarPath = - "/v2alpha1/projects/{projectId}/regions/{region}/networks" + "/v2alpha1/projects/{projectId}/vpcs/{vpcId}" .replace( "{" + "projectId" + "}", localVarApiClient.escapeString(projectId.toString())) .replace( - "{" + "region" + "}", - localVarApiClient.escapeString(region.toString())); + "{" + "vpcId" + "}", + localVarApiClient.escapeString(vpcId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -2341,18 +8294,13 @@ public okhttp3.Call listNetworksCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - if (labelSelector != null) { - localVarQueryParams.addAll( - localVarApiClient.parameterToPair("label_selector", labelSelector)); - } - final String[] localVarAccepts = {"application/json"}; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {}; + final String[] localVarContentTypes = {"application/json"}; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -2363,7 +8311,7 @@ public okhttp3.Call listNetworksCall( return localVarApiClient.buildCall( basePath, localVarPath, - "GET", + "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, @@ -2375,97 +8323,107 @@ public okhttp3.Call listNetworksCall( } @SuppressWarnings("rawtypes") - private okhttp3.Call listNetworksValidateBeforeCall( + private okhttp3.Call partialUpdateVPCValidateBeforeCall( @javax.annotation.Nonnull UUID projectId, - @javax.annotation.Nonnull String region, - @javax.annotation.Nullable String labelSelector, + @javax.annotation.Nonnull UUID vpcId, + @javax.annotation.Nonnull PartialUpdateVPCPayload partialUpdateVPCPayload, final ApiCallback _callback) throws ApiException { // verify the required parameter 'projectId' is set if (projectId == null) { throw new ApiException( - "Missing the required parameter 'projectId' when calling listNetworks(Async)"); + "Missing the required parameter 'projectId' when calling partialUpdateVPC(Async)"); } - // verify the required parameter 'region' is set - if (region == null) { + // verify the required parameter 'vpcId' is set + if (vpcId == null) { throw new ApiException( - "Missing the required parameter 'region' when calling listNetworks(Async)"); + "Missing the required parameter 'vpcId' when calling partialUpdateVPC(Async)"); } - return listNetworksCall(projectId, region, labelSelector, _callback); + // verify the required parameter 'partialUpdateVPCPayload' is set + if (partialUpdateVPCPayload == null) { + throw new ApiException( + "Missing the required parameter 'partialUpdateVPCPayload' when calling partialUpdateVPC(Async)"); + } + + return partialUpdateVPCCall(projectId, vpcId, partialUpdateVPCPayload, _callback); } /** - * List all networks inside a project. Get a list of all networks inside a project. + * Update VPC settings. Update the settings of a VPC. * * @param projectId The identifier (ID) of a STACKIT Project. (required) - * @param region The STACKIT Region of the resources. (required) - * @param labelSelector Filter resources by labels. (optional) - * @return NetworkListResponse + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) + * @param partialUpdateVPCPayload Request to update a VPC. (required) + * @return VPC * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details * * * - * + * * * * * + * * *
Response Details
Status Code Description Response Headers
200 List all networks of a project. -
200 VPC has been updated. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
*/ - public NetworkListResponse listNetworks( + public VPC partialUpdateVPC( @javax.annotation.Nonnull UUID projectId, - @javax.annotation.Nonnull String region, - @javax.annotation.Nullable String labelSelector) + @javax.annotation.Nonnull UUID vpcId, + @javax.annotation.Nonnull PartialUpdateVPCPayload partialUpdateVPCPayload) throws ApiException { - ApiResponse localVarResp = - listNetworksWithHttpInfo(projectId, region, labelSelector); + ApiResponse localVarResp = + partialUpdateVPCWithHttpInfo(projectId, vpcId, partialUpdateVPCPayload); return localVarResp.getData(); } /** - * List all networks inside a project. Get a list of all networks inside a project. + * Update VPC settings. Update the settings of a VPC. * * @param projectId The identifier (ID) of a STACKIT Project. (required) - * @param region The STACKIT Region of the resources. (required) - * @param labelSelector Filter resources by labels. (optional) - * @return ApiResponse<NetworkListResponse> + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) + * @param partialUpdateVPCPayload Request to update a VPC. (required) + * @return ApiResponse<VPC> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details * * * - * + * * * * * + * * *
Response Details
Status Code Description Response Headers
200 List all networks of a project. -
200 VPC has been updated. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
*/ - public ApiResponse listNetworksWithHttpInfo( + public ApiResponse partialUpdateVPCWithHttpInfo( @javax.annotation.Nonnull UUID projectId, - @javax.annotation.Nonnull String region, - @javax.annotation.Nullable String labelSelector) + @javax.annotation.Nonnull UUID vpcId, + @javax.annotation.Nonnull PartialUpdateVPCPayload partialUpdateVPCPayload) throws ApiException { okhttp3.Call localVarCall = - listNetworksValidateBeforeCall(projectId, region, labelSelector, null); - Type localVarReturnType = new TypeToken() {}.getType(); + partialUpdateVPCValidateBeforeCall(projectId, vpcId, partialUpdateVPCPayload, null); + Type localVarReturnType = new TypeToken() {}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * List all networks inside a project. (asynchronously) Get a list of all networks inside a - * project. + * Update VPC settings. (asynchronously) Update the settings of a VPC. * * @param projectId The identifier (ID) of a STACKIT Project. (required) - * @param region The STACKIT Region of the resources. (required) - * @param labelSelector Filter resources by labels. (optional) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) + * @param partialUpdateVPCPayload Request to update a VPC. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body @@ -2474,35 +8432,40 @@ public ApiResponse listNetworksWithHttpInfo( * * * - * + * * * * * + * * *
Response Details
Status Code Description Response Headers
200 List all networks of a project. -
200 VPC has been updated. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
*/ - public okhttp3.Call listNetworksAsync( + public okhttp3.Call partialUpdateVPCAsync( @javax.annotation.Nonnull UUID projectId, - @javax.annotation.Nonnull String region, - @javax.annotation.Nullable String labelSelector, - final ApiCallback _callback) + @javax.annotation.Nonnull UUID vpcId, + @javax.annotation.Nonnull PartialUpdateVPCPayload partialUpdateVPCPayload, + final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = - listNetworksValidateBeforeCall(projectId, region, labelSelector, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + partialUpdateVPCValidateBeforeCall( + projectId, vpcId, partialUpdateVPCPayload, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for listNetworksOfRoutingTable + * Build call for updateRouteOfRoutingTable * * @param organizationId The identifier (ID) of a STACKIT Organization. (required) * @param areaId The identifier (ID) of a STACKIT Network Area. (required) * @param region The STACKIT Region of the resources. (required) * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) + * @param routeId The identifier (ID) of a STACKIT Route. (required) + * @param updateRouteOfRoutingTablePayload Request an update of a route in a routing table. + * (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -2510,7 +8473,7 @@ public okhttp3.Call listNetworksAsync( * * * - * + * * * * @@ -2518,11 +8481,14 @@ public okhttp3.Call listNetworksAsync( * *
Response Details
Status Code Description Response Headers
200 List all routing table networks. -
200 Update request for route successful. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
*/ - public okhttp3.Call listNetworksOfRoutingTableCall( + public okhttp3.Call updateRouteOfRoutingTableCall( @javax.annotation.Nonnull UUID organizationId, @javax.annotation.Nonnull UUID areaId, @javax.annotation.Nonnull String region, @javax.annotation.Nonnull UUID routingTableId, + @javax.annotation.Nonnull UUID routeId, + @javax.annotation.Nonnull + UpdateRouteOfRoutingTablePayload updateRouteOfRoutingTablePayload, final ApiCallback _callback) throws ApiException { String basePath = null; @@ -2538,11 +8504,11 @@ public okhttp3.Call listNetworksOfRoutingTableCall( basePath = null; } - Object localVarPostBody = null; + Object localVarPostBody = updateRouteOfRoutingTablePayload; // create path and map variables String localVarPath = - "/v2alpha1/organizations/{organizationId}/network-areas/{areaId}/regions/{region}/routing-tables/{routingTableId}/networks" + "/v2alpha1/organizations/{organizationId}/network-areas/{areaId}/regions/{region}/routing-tables/{routingTableId}/routes/{routeId}" .replace( "{" + "organizationId" + "}", localVarApiClient.escapeString(organizationId.toString())) @@ -2554,7 +8520,10 @@ public okhttp3.Call listNetworksOfRoutingTableCall( localVarApiClient.escapeString(region.toString())) .replace( "{" + "routingTableId" + "}", - localVarApiClient.escapeString(routingTableId.toString())); + localVarApiClient.escapeString(routingTableId.toString())) + .replace( + "{" + "routeId" + "}", + localVarApiClient.escapeString(routeId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -2568,7 +8537,7 @@ public okhttp3.Call listNetworksOfRoutingTableCall( localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {}; + final String[] localVarContentTypes = {"application/json"}; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -2579,7 +8548,7 @@ public okhttp3.Call listNetworksOfRoutingTableCall( return localVarApiClient.buildCall( basePath, localVarPath, - "GET", + "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, @@ -2591,56 +8560,81 @@ public okhttp3.Call listNetworksOfRoutingTableCall( } @SuppressWarnings("rawtypes") - private okhttp3.Call listNetworksOfRoutingTableValidateBeforeCall( + private okhttp3.Call updateRouteOfRoutingTableValidateBeforeCall( @javax.annotation.Nonnull UUID organizationId, @javax.annotation.Nonnull UUID areaId, @javax.annotation.Nonnull String region, @javax.annotation.Nonnull UUID routingTableId, + @javax.annotation.Nonnull UUID routeId, + @javax.annotation.Nonnull + UpdateRouteOfRoutingTablePayload updateRouteOfRoutingTablePayload, final ApiCallback _callback) throws ApiException { // verify the required parameter 'organizationId' is set if (organizationId == null) { throw new ApiException( - "Missing the required parameter 'organizationId' when calling listNetworksOfRoutingTable(Async)"); + "Missing the required parameter 'organizationId' when calling updateRouteOfRoutingTable(Async)"); } // verify the required parameter 'areaId' is set if (areaId == null) { throw new ApiException( - "Missing the required parameter 'areaId' when calling listNetworksOfRoutingTable(Async)"); + "Missing the required parameter 'areaId' when calling updateRouteOfRoutingTable(Async)"); } // verify the required parameter 'region' is set if (region == null) { throw new ApiException( - "Missing the required parameter 'region' when calling listNetworksOfRoutingTable(Async)"); + "Missing the required parameter 'region' when calling updateRouteOfRoutingTable(Async)"); } // verify the required parameter 'routingTableId' is set if (routingTableId == null) { throw new ApiException( - "Missing the required parameter 'routingTableId' when calling listNetworksOfRoutingTable(Async)"); + "Missing the required parameter 'routingTableId' when calling updateRouteOfRoutingTable(Async)"); } - return listNetworksOfRoutingTableCall( - organizationId, areaId, region, routingTableId, _callback); + // verify the required parameter 'routeId' is set + if (routeId == null) { + throw new ApiException( + "Missing the required parameter 'routeId' when calling updateRouteOfRoutingTable(Async)"); + } + + // verify the required parameter 'updateRouteOfRoutingTablePayload' is set + if (updateRouteOfRoutingTablePayload == null) { + throw new ApiException( + "Missing the required parameter 'updateRouteOfRoutingTablePayload' when calling updateRouteOfRoutingTable(Async)"); + } + + return updateRouteOfRoutingTableCall( + organizationId, + areaId, + region, + routingTableId, + routeId, + updateRouteOfRoutingTablePayload, + _callback); } /** - * List all networks in a routing table. Get a list of all networks in a routing table. + * Update a route of a routing table. Update a route defined in a routing table of a network + * area. * * @param organizationId The identifier (ID) of a STACKIT Organization. (required) * @param areaId The identifier (ID) of a STACKIT Network Area. (required) * @param region The STACKIT Region of the resources. (required) * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) - * @return NetworkListResponse + * @param routeId The identifier (ID) of a STACKIT Route. (required) + * @param updateRouteOfRoutingTablePayload Request an update of a route in a routing table. + * (required) + * @return Route * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details * * * - * + * * * * @@ -2648,33 +8642,45 @@ private okhttp3.Call listNetworksOfRoutingTableValidateBeforeCall( * *
Response Details
Status Code Description Response Headers
200 List all routing table networks. -
200 Update request for route successful. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
*/ - public NetworkListResponse listNetworksOfRoutingTable( + public Route updateRouteOfRoutingTable( @javax.annotation.Nonnull UUID organizationId, @javax.annotation.Nonnull UUID areaId, @javax.annotation.Nonnull String region, - @javax.annotation.Nonnull UUID routingTableId) + @javax.annotation.Nonnull UUID routingTableId, + @javax.annotation.Nonnull UUID routeId, + @javax.annotation.Nonnull + UpdateRouteOfRoutingTablePayload updateRouteOfRoutingTablePayload) throws ApiException { - ApiResponse localVarResp = - listNetworksOfRoutingTableWithHttpInfo( - organizationId, areaId, region, routingTableId); + ApiResponse localVarResp = + updateRouteOfRoutingTableWithHttpInfo( + organizationId, + areaId, + region, + routingTableId, + routeId, + updateRouteOfRoutingTablePayload); return localVarResp.getData(); } /** - * List all networks in a routing table. Get a list of all networks in a routing table. + * Update a route of a routing table. Update a route defined in a routing table of a network + * area. * * @param organizationId The identifier (ID) of a STACKIT Organization. (required) * @param areaId The identifier (ID) of a STACKIT Network Area. (required) * @param region The STACKIT Region of the resources. (required) * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) - * @return ApiResponse<NetworkListResponse> + * @param routeId The identifier (ID) of a STACKIT Route. (required) + * @param updateRouteOfRoutingTablePayload Request an update of a route in a routing table. + * (required) + * @return ApiResponse<Route> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details * * * - * + * * * * @@ -2682,27 +8688,39 @@ public NetworkListResponse listNetworksOfRoutingTable( * *
Response Details
Status Code Description Response Headers
200 List all routing table networks. -
200 Update request for route successful. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
*/ - public ApiResponse listNetworksOfRoutingTableWithHttpInfo( + public ApiResponse updateRouteOfRoutingTableWithHttpInfo( @javax.annotation.Nonnull UUID organizationId, @javax.annotation.Nonnull UUID areaId, @javax.annotation.Nonnull String region, - @javax.annotation.Nonnull UUID routingTableId) + @javax.annotation.Nonnull UUID routingTableId, + @javax.annotation.Nonnull UUID routeId, + @javax.annotation.Nonnull + UpdateRouteOfRoutingTablePayload updateRouteOfRoutingTablePayload) throws ApiException { okhttp3.Call localVarCall = - listNetworksOfRoutingTableValidateBeforeCall( - organizationId, areaId, region, routingTableId, null); - Type localVarReturnType = new TypeToken() {}.getType(); + updateRouteOfRoutingTableValidateBeforeCall( + organizationId, + areaId, + region, + routingTableId, + routeId, + updateRouteOfRoutingTablePayload, + null); + Type localVarReturnType = new TypeToken() {}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * List all networks in a routing table. (asynchronously) Get a list of all networks in a - * routing table. + * Update a route of a routing table. (asynchronously) Update a route defined in a routing table + * of a network area. * * @param organizationId The identifier (ID) of a STACKIT Organization. (required) * @param areaId The identifier (ID) of a STACKIT Network Area. (required) * @param region The STACKIT Region of the resources. (required) * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) + * @param routeId The identifier (ID) of a STACKIT Route. (required) + * @param updateRouteOfRoutingTablePayload Request an update of a route in a routing table. + * (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body @@ -2711,7 +8729,7 @@ public ApiResponse listNetworksOfRoutingTableWithHttpInfo( * * * - * + * * * * @@ -2719,30 +8737,39 @@ public ApiResponse listNetworksOfRoutingTableWithHttpInfo( * *
Response Details
Status Code Description Response Headers
200 List all routing table networks. -
200 Update request for route successful. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
*/ - public okhttp3.Call listNetworksOfRoutingTableAsync( + public okhttp3.Call updateRouteOfRoutingTableAsync( @javax.annotation.Nonnull UUID organizationId, @javax.annotation.Nonnull UUID areaId, @javax.annotation.Nonnull String region, @javax.annotation.Nonnull UUID routingTableId, - final ApiCallback _callback) + @javax.annotation.Nonnull UUID routeId, + @javax.annotation.Nonnull + UpdateRouteOfRoutingTablePayload updateRouteOfRoutingTablePayload, + final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = - listNetworksOfRoutingTableValidateBeforeCall( - organizationId, areaId, region, routingTableId, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + updateRouteOfRoutingTableValidateBeforeCall( + organizationId, + areaId, + region, + routingTableId, + routeId, + updateRouteOfRoutingTablePayload, + _callback); + Type localVarReturnType = new TypeToken() {}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for listRoutesOfRoutingTable + * Build call for updateRoutingTableOfArea * * @param organizationId The identifier (ID) of a STACKIT Organization. (required) * @param areaId The identifier (ID) of a STACKIT Network Area. (required) * @param region The STACKIT Region of the resources. (required) * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) - * @param labelSelector Filter resources by labels. (optional) + * @param updateRoutingTableOfAreaPayload Request an update of a routing table. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -2750,7 +8777,7 @@ public okhttp3.Call listNetworksOfRoutingTableAsync( * * * - * + * * * * @@ -2758,12 +8785,13 @@ public okhttp3.Call listNetworksOfRoutingTableAsync( * *
Response Details
Status Code Description Response Headers
200 List all routing table routes. -
200 Update request for routing table successful. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
*/ - public okhttp3.Call listRoutesOfRoutingTableCall( + public okhttp3.Call updateRoutingTableOfAreaCall( @javax.annotation.Nonnull UUID organizationId, @javax.annotation.Nonnull UUID areaId, @javax.annotation.Nonnull String region, @javax.annotation.Nonnull UUID routingTableId, - @javax.annotation.Nullable String labelSelector, + @javax.annotation.Nonnull + UpdateRoutingTableOfAreaPayload updateRoutingTableOfAreaPayload, final ApiCallback _callback) throws ApiException { String basePath = null; @@ -2779,11 +8807,11 @@ public okhttp3.Call listRoutesOfRoutingTableCall( basePath = null; } - Object localVarPostBody = null; + Object localVarPostBody = updateRoutingTableOfAreaPayload; // create path and map variables String localVarPath = - "/v2alpha1/organizations/{organizationId}/network-areas/{areaId}/regions/{region}/routing-tables/{routingTableId}/routes" + "/v2alpha1/organizations/{organizationId}/network-areas/{areaId}/regions/{region}/routing-tables/{routingTableId}" .replace( "{" + "organizationId" + "}", localVarApiClient.escapeString(organizationId.toString())) @@ -2803,18 +8831,13 @@ public okhttp3.Call listRoutesOfRoutingTableCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - if (labelSelector != null) { - localVarQueryParams.addAll( - localVarApiClient.parameterToPair("label_selector", labelSelector)); - } - final String[] localVarAccepts = {"application/json"}; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {}; + final String[] localVarContentTypes = {"application/json"}; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -2825,7 +8848,7 @@ public okhttp3.Call listRoutesOfRoutingTableCall( return localVarApiClient.buildCall( basePath, localVarPath, - "GET", + "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, @@ -2837,58 +8860,70 @@ public okhttp3.Call listRoutesOfRoutingTableCall( } @SuppressWarnings("rawtypes") - private okhttp3.Call listRoutesOfRoutingTableValidateBeforeCall( + private okhttp3.Call updateRoutingTableOfAreaValidateBeforeCall( @javax.annotation.Nonnull UUID organizationId, @javax.annotation.Nonnull UUID areaId, @javax.annotation.Nonnull String region, @javax.annotation.Nonnull UUID routingTableId, - @javax.annotation.Nullable String labelSelector, + @javax.annotation.Nonnull + UpdateRoutingTableOfAreaPayload updateRoutingTableOfAreaPayload, final ApiCallback _callback) throws ApiException { // verify the required parameter 'organizationId' is set if (organizationId == null) { throw new ApiException( - "Missing the required parameter 'organizationId' when calling listRoutesOfRoutingTable(Async)"); + "Missing the required parameter 'organizationId' when calling updateRoutingTableOfArea(Async)"); } // verify the required parameter 'areaId' is set if (areaId == null) { throw new ApiException( - "Missing the required parameter 'areaId' when calling listRoutesOfRoutingTable(Async)"); + "Missing the required parameter 'areaId' when calling updateRoutingTableOfArea(Async)"); } // verify the required parameter 'region' is set if (region == null) { throw new ApiException( - "Missing the required parameter 'region' when calling listRoutesOfRoutingTable(Async)"); + "Missing the required parameter 'region' when calling updateRoutingTableOfArea(Async)"); } // verify the required parameter 'routingTableId' is set if (routingTableId == null) { throw new ApiException( - "Missing the required parameter 'routingTableId' when calling listRoutesOfRoutingTable(Async)"); + "Missing the required parameter 'routingTableId' when calling updateRoutingTableOfArea(Async)"); } - return listRoutesOfRoutingTableCall( - organizationId, areaId, region, routingTableId, labelSelector, _callback); + // verify the required parameter 'updateRoutingTableOfAreaPayload' is set + if (updateRoutingTableOfAreaPayload == null) { + throw new ApiException( + "Missing the required parameter 'updateRoutingTableOfAreaPayload' when calling updateRoutingTableOfArea(Async)"); + } + + return updateRoutingTableOfAreaCall( + organizationId, + areaId, + region, + routingTableId, + updateRoutingTableOfAreaPayload, + _callback); } /** - * List all routes in a routing table. Get a list of all routes in a routing table. + * Update a routing table. Update a routing table defined in a network area. * * @param organizationId The identifier (ID) of a STACKIT Organization. (required) * @param areaId The identifier (ID) of a STACKIT Network Area. (required) * @param region The STACKIT Region of the resources. (required) * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) - * @param labelSelector Filter resources by labels. (optional) - * @return RouteListResponse + * @param updateRoutingTableOfAreaPayload Request an update of a routing table. (required) + * @return RoutingTable * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details * * * - * + * * * * @@ -2896,35 +8931,40 @@ private okhttp3.Call listRoutesOfRoutingTableValidateBeforeCall( * *
Response Details
Status Code Description Response Headers
200 List all routing table routes. -
200 Update request for routing table successful. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
*/ - public RouteListResponse listRoutesOfRoutingTable( + public RoutingTable updateRoutingTableOfArea( @javax.annotation.Nonnull UUID organizationId, @javax.annotation.Nonnull UUID areaId, @javax.annotation.Nonnull String region, @javax.annotation.Nonnull UUID routingTableId, - @javax.annotation.Nullable String labelSelector) + @javax.annotation.Nonnull + UpdateRoutingTableOfAreaPayload updateRoutingTableOfAreaPayload) throws ApiException { - ApiResponse localVarResp = - listRoutesOfRoutingTableWithHttpInfo( - organizationId, areaId, region, routingTableId, labelSelector); + ApiResponse localVarResp = + updateRoutingTableOfAreaWithHttpInfo( + organizationId, + areaId, + region, + routingTableId, + updateRoutingTableOfAreaPayload); return localVarResp.getData(); } /** - * List all routes in a routing table. Get a list of all routes in a routing table. + * Update a routing table. Update a routing table defined in a network area. * * @param organizationId The identifier (ID) of a STACKIT Organization. (required) * @param areaId The identifier (ID) of a STACKIT Network Area. (required) * @param region The STACKIT Region of the resources. (required) * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) - * @param labelSelector Filter resources by labels. (optional) - * @return ApiResponse<RouteListResponse> + * @param updateRoutingTableOfAreaPayload Request an update of a routing table. (required) + * @return ApiResponse<RoutingTable> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details * * * - * + * * * * @@ -2932,29 +8972,34 @@ public RouteListResponse listRoutesOfRoutingTable( * *
Response Details
Status Code Description Response Headers
200 List all routing table routes. -
200 Update request for routing table successful. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
*/ - public ApiResponse listRoutesOfRoutingTableWithHttpInfo( + public ApiResponse updateRoutingTableOfAreaWithHttpInfo( @javax.annotation.Nonnull UUID organizationId, @javax.annotation.Nonnull UUID areaId, @javax.annotation.Nonnull String region, @javax.annotation.Nonnull UUID routingTableId, - @javax.annotation.Nullable String labelSelector) + @javax.annotation.Nonnull + UpdateRoutingTableOfAreaPayload updateRoutingTableOfAreaPayload) throws ApiException { okhttp3.Call localVarCall = - listRoutesOfRoutingTableValidateBeforeCall( - organizationId, areaId, region, routingTableId, labelSelector, null); - Type localVarReturnType = new TypeToken() {}.getType(); + updateRoutingTableOfAreaValidateBeforeCall( + organizationId, + areaId, + region, + routingTableId, + updateRoutingTableOfAreaPayload, + null); + Type localVarReturnType = new TypeToken() {}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * List all routes in a routing table. (asynchronously) Get a list of all routes in a routing - * table. + * Update a routing table. (asynchronously) Update a routing table defined in a network area. * * @param organizationId The identifier (ID) of a STACKIT Organization. (required) * @param areaId The identifier (ID) of a STACKIT Network Area. (required) * @param region The STACKIT Region of the resources. (required) * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) - * @param labelSelector Filter resources by labels. (optional) + * @param updateRoutingTableOfAreaPayload Request an update of a routing table. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body @@ -2963,7 +9008,7 @@ public ApiResponse listRoutesOfRoutingTableWithHttpInfo( * * * - * + * * * * @@ -2971,30 +9016,38 @@ public ApiResponse listRoutesOfRoutingTableWithHttpInfo( * *
Response Details
Status Code Description Response Headers
200 List all routing table routes. -
200 Update request for routing table successful. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
*/ - public okhttp3.Call listRoutesOfRoutingTableAsync( + public okhttp3.Call updateRoutingTableOfAreaAsync( @javax.annotation.Nonnull UUID organizationId, @javax.annotation.Nonnull UUID areaId, @javax.annotation.Nonnull String region, @javax.annotation.Nonnull UUID routingTableId, - @javax.annotation.Nullable String labelSelector, - final ApiCallback _callback) + @javax.annotation.Nonnull + UpdateRoutingTableOfAreaPayload updateRoutingTableOfAreaPayload, + final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = - listRoutesOfRoutingTableValidateBeforeCall( - organizationId, areaId, region, routingTableId, labelSelector, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + updateRoutingTableOfAreaValidateBeforeCall( + organizationId, + areaId, + region, + routingTableId, + updateRoutingTableOfAreaPayload, + _callback); + Type localVarReturnType = new TypeToken() {}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for listRoutingTablesOfArea + * Build call for updateVPCNetworkRange * - * @param organizationId The identifier (ID) of a STACKIT Organization. (required) - * @param areaId The identifier (ID) of a STACKIT Network Area. (required) + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) * @param region The STACKIT Region of the resources. (required) - * @param labelSelector Filter resources by labels. (optional) + * @param networkRangeId The identifier (ID) of a STACKIT Network Range. (required) + * @param body Request an update of a network range. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -3002,19 +9055,22 @@ public okhttp3.Call listRoutesOfRoutingTableAsync( * * * - * + * * * * * + * + * * *
Response Details
Status Code Description Response Headers
200 List all routing tables. -
200 Network Range has been updated. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
409 A conflict has occurred. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
*/ - public okhttp3.Call listRoutingTablesOfAreaCall( - @javax.annotation.Nonnull UUID organizationId, - @javax.annotation.Nonnull UUID areaId, + public okhttp3.Call updateVPCNetworkRangeCall( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, @javax.annotation.Nonnull String region, - @javax.annotation.Nullable String labelSelector, + @javax.annotation.Nonnull UUID networkRangeId, + @javax.annotation.Nonnull V1UpdateVPCNetworkRangeIPv4 body, final ApiCallback _callback) throws ApiException { String basePath = null; @@ -3030,20 +9086,23 @@ public okhttp3.Call listRoutingTablesOfAreaCall( basePath = null; } - Object localVarPostBody = null; + Object localVarPostBody = body; // create path and map variables String localVarPath = - "/v2alpha1/organizations/{organizationId}/network-areas/{areaId}/regions/{region}/routing-tables" + "/v2alpha1/projects/{projectId}/vpcs/{vpcId}/regions/{region}/network-ranges/{networkRangeId}" .replace( - "{" + "organizationId" + "}", - localVarApiClient.escapeString(organizationId.toString())) + "{" + "projectId" + "}", + localVarApiClient.escapeString(projectId.toString())) .replace( - "{" + "areaId" + "}", - localVarApiClient.escapeString(areaId.toString())) + "{" + "vpcId" + "}", + localVarApiClient.escapeString(vpcId.toString())) .replace( "{" + "region" + "}", - localVarApiClient.escapeString(region.toString())); + localVarApiClient.escapeString(region.toString())) + .replace( + "{" + "networkRangeId" + "}", + localVarApiClient.escapeString(networkRangeId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -3051,18 +9110,13 @@ public okhttp3.Call listRoutingTablesOfAreaCall( Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); - if (labelSelector != null) { - localVarQueryParams.addAll( - localVarApiClient.parameterToPair("label_selector", labelSelector)); - } - final String[] localVarAccepts = {"application/json"}; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } - final String[] localVarContentTypes = {}; + final String[] localVarContentTypes = {"application/json"}; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { @@ -3073,7 +9127,7 @@ public okhttp3.Call listRoutingTablesOfAreaCall( return localVarApiClient.buildCall( basePath, localVarPath, - "GET", + "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, @@ -3085,113 +9139,135 @@ public okhttp3.Call listRoutingTablesOfAreaCall( } @SuppressWarnings("rawtypes") - private okhttp3.Call listRoutingTablesOfAreaValidateBeforeCall( - @javax.annotation.Nonnull UUID organizationId, - @javax.annotation.Nonnull UUID areaId, + private okhttp3.Call updateVPCNetworkRangeValidateBeforeCall( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, @javax.annotation.Nonnull String region, - @javax.annotation.Nullable String labelSelector, + @javax.annotation.Nonnull UUID networkRangeId, + @javax.annotation.Nonnull V1UpdateVPCNetworkRangeIPv4 body, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'organizationId' is set - if (organizationId == null) { + // verify the required parameter 'projectId' is set + if (projectId == null) { throw new ApiException( - "Missing the required parameter 'organizationId' when calling listRoutingTablesOfArea(Async)"); + "Missing the required parameter 'projectId' when calling updateVPCNetworkRange(Async)"); } - // verify the required parameter 'areaId' is set - if (areaId == null) { + // verify the required parameter 'vpcId' is set + if (vpcId == null) { throw new ApiException( - "Missing the required parameter 'areaId' when calling listRoutingTablesOfArea(Async)"); + "Missing the required parameter 'vpcId' when calling updateVPCNetworkRange(Async)"); } // verify the required parameter 'region' is set if (region == null) { throw new ApiException( - "Missing the required parameter 'region' when calling listRoutingTablesOfArea(Async)"); + "Missing the required parameter 'region' when calling updateVPCNetworkRange(Async)"); } - return listRoutingTablesOfAreaCall( - organizationId, areaId, region, labelSelector, _callback); + // verify the required parameter 'networkRangeId' is set + if (networkRangeId == null) { + throw new ApiException( + "Missing the required parameter 'networkRangeId' when calling updateVPCNetworkRange(Async)"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException( + "Missing the required parameter 'body' when calling updateVPCNetworkRange(Async)"); + } + + return updateVPCNetworkRangeCall(projectId, vpcId, region, networkRangeId, body, _callback); } /** - * List all routing tables in a network area. Get a list of all routing tables in a network - * area. + * Update a regional network range. Update a network range of a VPC for this region. * - * @param organizationId The identifier (ID) of a STACKIT Organization. (required) - * @param areaId The identifier (ID) of a STACKIT Network Area. (required) + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) * @param region The STACKIT Region of the resources. (required) - * @param labelSelector Filter resources by labels. (optional) - * @return RoutingTableListResponse + * @param networkRangeId The identifier (ID) of a STACKIT Network Range. (required) + * @param body Request an update of a network range. (required) + * @return VPCNetworkRange * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details * * * - * + * * * * * + * + * * *
Response Details
Status Code Description Response Headers
200 List all routing tables. -
200 Network Range has been updated. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
409 A conflict has occurred. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
*/ - public RoutingTableListResponse listRoutingTablesOfArea( - @javax.annotation.Nonnull UUID organizationId, - @javax.annotation.Nonnull UUID areaId, + public VPCNetworkRange updateVPCNetworkRange( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, @javax.annotation.Nonnull String region, - @javax.annotation.Nullable String labelSelector) + @javax.annotation.Nonnull UUID networkRangeId, + @javax.annotation.Nonnull V1UpdateVPCNetworkRangeIPv4 body) throws ApiException { - ApiResponse localVarResp = - listRoutingTablesOfAreaWithHttpInfo(organizationId, areaId, region, labelSelector); + ApiResponse localVarResp = + updateVPCNetworkRangeWithHttpInfo(projectId, vpcId, region, networkRangeId, body); return localVarResp.getData(); } /** - * List all routing tables in a network area. Get a list of all routing tables in a network - * area. + * Update a regional network range. Update a network range of a VPC for this region. * - * @param organizationId The identifier (ID) of a STACKIT Organization. (required) - * @param areaId The identifier (ID) of a STACKIT Network Area. (required) + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) * @param region The STACKIT Region of the resources. (required) - * @param labelSelector Filter resources by labels. (optional) - * @return ApiResponse<RoutingTableListResponse> + * @param networkRangeId The identifier (ID) of a STACKIT Network Range. (required) + * @param body Request an update of a network range. (required) + * @return ApiResponse<VPCNetworkRange> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details * * * - * + * * * * * + * + * * *
Response Details
Status Code Description Response Headers
200 List all routing tables. -
200 Network Range has been updated. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
409 A conflict has occurred. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
*/ - public ApiResponse listRoutingTablesOfAreaWithHttpInfo( - @javax.annotation.Nonnull UUID organizationId, - @javax.annotation.Nonnull UUID areaId, + public ApiResponse updateVPCNetworkRangeWithHttpInfo( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, @javax.annotation.Nonnull String region, - @javax.annotation.Nullable String labelSelector) + @javax.annotation.Nonnull UUID networkRangeId, + @javax.annotation.Nonnull V1UpdateVPCNetworkRangeIPv4 body) throws ApiException { okhttp3.Call localVarCall = - listRoutingTablesOfAreaValidateBeforeCall( - organizationId, areaId, region, labelSelector, null); - Type localVarReturnType = new TypeToken() {}.getType(); + updateVPCNetworkRangeValidateBeforeCall( + projectId, vpcId, region, networkRangeId, body, null); + Type localVarReturnType = new TypeToken() {}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * List all routing tables in a network area. (asynchronously) Get a list of all routing tables - * in a network area. + * Update a regional network range. (asynchronously) Update a network range of a VPC for this + * region. * - * @param organizationId The identifier (ID) of a STACKIT Organization. (required) - * @param areaId The identifier (ID) of a STACKIT Network Area. (required) + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) * @param region The STACKIT Region of the resources. (required) - * @param labelSelector Filter resources by labels. (optional) + * @param networkRangeId The identifier (ID) of a STACKIT Network Range. (required) + * @param body Request an update of a network range. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body @@ -3200,37 +9276,41 @@ public ApiResponse listRoutingTablesOfAreaWithHttpInfo * * * - * + * * * * * + * + * * *
Response Details
Status Code Description Response Headers
200 List all routing tables. -
200 Network Range has been updated. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
409 A conflict has occurred. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
*/ - public okhttp3.Call listRoutingTablesOfAreaAsync( - @javax.annotation.Nonnull UUID organizationId, - @javax.annotation.Nonnull UUID areaId, + public okhttp3.Call updateVPCNetworkRangeAsync( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, @javax.annotation.Nonnull String region, - @javax.annotation.Nullable String labelSelector, - final ApiCallback _callback) + @javax.annotation.Nonnull UUID networkRangeId, + @javax.annotation.Nonnull V1UpdateVPCNetworkRangeIPv4 body, + final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = - listRoutingTablesOfAreaValidateBeforeCall( - organizationId, areaId, region, labelSelector, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + updateVPCNetworkRangeValidateBeforeCall( + projectId, vpcId, region, networkRangeId, body, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for partialUpdateNetwork + * Build call for updateVPCRegion * * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) * @param region The STACKIT Region of the resources. (required) - * @param networkId The identifier (ID) of a STACKIT Network. (required) - * @param partialUpdateNetworkPayload Request an update of a network. (required) + * @param updateVPCRegionPayload Request an update of the regional VPC configuration. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -3238,19 +9318,21 @@ public okhttp3.Call listRoutingTablesOfAreaAsync( * * * - * + * * * * * + * + * * *
Response Details
Status Code Description Response Headers
202 An update was accepted. -
200 Regional VPC configuration has been updated. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
409 A conflict has occurred. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
*/ - public okhttp3.Call partialUpdateNetworkCall( + public okhttp3.Call updateVPCRegionCall( @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, @javax.annotation.Nonnull String region, - @javax.annotation.Nonnull UUID networkId, - @javax.annotation.Nonnull PartialUpdateNetworkPayload partialUpdateNetworkPayload, + @javax.annotation.Nonnull UpdateVPCRegionPayload updateVPCRegionPayload, final ApiCallback _callback) throws ApiException { String basePath = null; @@ -3266,20 +9348,20 @@ public okhttp3.Call partialUpdateNetworkCall( basePath = null; } - Object localVarPostBody = partialUpdateNetworkPayload; + Object localVarPostBody = updateVPCRegionPayload; // create path and map variables String localVarPath = - "/v2alpha1/projects/{projectId}/regions/{region}/networks/{networkId}" + "/v2alpha1/projects/{projectId}/vpcs/{vpcId}/regions/{region}" .replace( "{" + "projectId" + "}", localVarApiClient.escapeString(projectId.toString())) .replace( - "{" + "region" + "}", - localVarApiClient.escapeString(region.toString())) + "{" + "vpcId" + "}", + localVarApiClient.escapeString(vpcId.toString())) .replace( - "{" + "networkId" + "}", - localVarApiClient.escapeString(networkId.toString())); + "{" + "region" + "}", + localVarApiClient.escapeString(region.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -3316,112 +9398,134 @@ public okhttp3.Call partialUpdateNetworkCall( } @SuppressWarnings("rawtypes") - private okhttp3.Call partialUpdateNetworkValidateBeforeCall( + private okhttp3.Call updateVPCRegionValidateBeforeCall( @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, @javax.annotation.Nonnull String region, - @javax.annotation.Nonnull UUID networkId, - @javax.annotation.Nonnull PartialUpdateNetworkPayload partialUpdateNetworkPayload, + @javax.annotation.Nonnull UpdateVPCRegionPayload updateVPCRegionPayload, final ApiCallback _callback) throws ApiException { // verify the required parameter 'projectId' is set if (projectId == null) { throw new ApiException( - "Missing the required parameter 'projectId' when calling partialUpdateNetwork(Async)"); + "Missing the required parameter 'projectId' when calling updateVPCRegion(Async)"); } - // verify the required parameter 'region' is set - if (region == null) { + // verify the required parameter 'vpcId' is set + if (vpcId == null) { throw new ApiException( - "Missing the required parameter 'region' when calling partialUpdateNetwork(Async)"); + "Missing the required parameter 'vpcId' when calling updateVPCRegion(Async)"); } - // verify the required parameter 'networkId' is set - if (networkId == null) { + // verify the required parameter 'region' is set + if (region == null) { throw new ApiException( - "Missing the required parameter 'networkId' when calling partialUpdateNetwork(Async)"); + "Missing the required parameter 'region' when calling updateVPCRegion(Async)"); } - // verify the required parameter 'partialUpdateNetworkPayload' is set - if (partialUpdateNetworkPayload == null) { + // verify the required parameter 'updateVPCRegionPayload' is set + if (updateVPCRegionPayload == null) { throw new ApiException( - "Missing the required parameter 'partialUpdateNetworkPayload' when calling partialUpdateNetwork(Async)"); + "Missing the required parameter 'updateVPCRegionPayload' when calling updateVPCRegion(Async)"); } - return partialUpdateNetworkCall( - projectId, region, networkId, partialUpdateNetworkPayload, _callback); + return updateVPCRegionCall(projectId, vpcId, region, updateVPCRegionPayload, _callback); } /** - * Update network settings. Update the settings of a network inside a project. + * Update the regional configuration of a VPC. Update the current configuration of a region for + * a VPC. **Example:** Update nameservers. **Request Body:** ```json { + * \"ipv4\": { \"defaultNameservers\": [ \"10.1.2.10\", + * \"10.1.2.11\" ], } } ``` **Result:** * + * `ipv4.defaultNameservers`: **Updated** as a new value was provided. * * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) * @param region The STACKIT Region of the resources. (required) - * @param networkId The identifier (ID) of a STACKIT Network. (required) - * @param partialUpdateNetworkPayload Request an update of a network. (required) + * @param updateVPCRegionPayload Request an update of the regional VPC configuration. (required) + * @return RegionalVPC * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details * * * - * + * * * * * + * + * * *
Response Details
Status Code Description Response Headers
202 An update was accepted. -
200 Regional VPC configuration has been updated. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
409 A conflict has occurred. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
*/ - public void partialUpdateNetwork( + public RegionalVPC updateVPCRegion( @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, @javax.annotation.Nonnull String region, - @javax.annotation.Nonnull UUID networkId, - @javax.annotation.Nonnull PartialUpdateNetworkPayload partialUpdateNetworkPayload) + @javax.annotation.Nonnull UpdateVPCRegionPayload updateVPCRegionPayload) throws ApiException { - partialUpdateNetworkWithHttpInfo(projectId, region, networkId, partialUpdateNetworkPayload); + ApiResponse localVarResp = + updateVPCRegionWithHttpInfo(projectId, vpcId, region, updateVPCRegionPayload); + return localVarResp.getData(); } /** - * Update network settings. Update the settings of a network inside a project. + * Update the regional configuration of a VPC. Update the current configuration of a region for + * a VPC. **Example:** Update nameservers. **Request Body:** ```json { + * \"ipv4\": { \"defaultNameservers\": [ \"10.1.2.10\", + * \"10.1.2.11\" ], } } ``` **Result:** * + * `ipv4.defaultNameservers`: **Updated** as a new value was provided. * * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) * @param region The STACKIT Region of the resources. (required) - * @param networkId The identifier (ID) of a STACKIT Network. (required) - * @param partialUpdateNetworkPayload Request an update of a network. (required) - * @return ApiResponse<Void> + * @param updateVPCRegionPayload Request an update of the regional VPC configuration. (required) + * @return ApiResponse<RegionalVPC> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details * * * - * + * * * * * + * + * * *
Response Details
Status Code Description Response Headers
202 An update was accepted. -
200 Regional VPC configuration has been updated. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
409 A conflict has occurred. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
*/ - public ApiResponse partialUpdateNetworkWithHttpInfo( + public ApiResponse updateVPCRegionWithHttpInfo( @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, @javax.annotation.Nonnull String region, - @javax.annotation.Nonnull UUID networkId, - @javax.annotation.Nonnull PartialUpdateNetworkPayload partialUpdateNetworkPayload) + @javax.annotation.Nonnull UpdateVPCRegionPayload updateVPCRegionPayload) throws ApiException { okhttp3.Call localVarCall = - partialUpdateNetworkValidateBeforeCall( - projectId, region, networkId, partialUpdateNetworkPayload, null); - return localVarApiClient.execute(localVarCall); + updateVPCRegionValidateBeforeCall( + projectId, vpcId, region, updateVPCRegionPayload, null); + Type localVarReturnType = new TypeToken() {}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * Update network settings. (asynchronously) Update the settings of a network inside a project. + * Update the regional configuration of a VPC. (asynchronously) Update the current configuration + * of a region for a VPC. **Example:** Update nameservers. **Request Body:** + * ```json { \"ipv4\": { \"defaultNameservers\": [ + * \"10.1.2.10\", \"10.1.2.11\" ], } } ``` **Result:** * + * `ipv4.defaultNameservers`: **Updated** as a new value was provided. * * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) * @param region The STACKIT Region of the resources. (required) - * @param networkId The identifier (ID) of a STACKIT Network. (required) - * @param partialUpdateNetworkPayload Request an update of a network. (required) + * @param updateVPCRegionPayload Request an update of the regional VPC configuration. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body @@ -3430,39 +9534,41 @@ public ApiResponse partialUpdateNetworkWithHttpInfo( * * * - * + * * * * * + * + * * *
Response Details
Status Code Description Response Headers
202 An update was accepted. -
200 Regional VPC configuration has been updated. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
409 A conflict has occurred. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
*/ - public okhttp3.Call partialUpdateNetworkAsync( + public okhttp3.Call updateVPCRegionAsync( @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, @javax.annotation.Nonnull String region, - @javax.annotation.Nonnull UUID networkId, - @javax.annotation.Nonnull PartialUpdateNetworkPayload partialUpdateNetworkPayload, - final ApiCallback _callback) + @javax.annotation.Nonnull UpdateVPCRegionPayload updateVPCRegionPayload, + final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = - partialUpdateNetworkValidateBeforeCall( - projectId, region, networkId, partialUpdateNetworkPayload, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); + updateVPCRegionValidateBeforeCall( + projectId, vpcId, region, updateVPCRegionPayload, _callback); + Type localVarReturnType = new TypeToken() {}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for updateRouteOfRoutingTable + * Build call for updateVPCRoutingTable * - * @param organizationId The identifier (ID) of a STACKIT Organization. (required) - * @param areaId The identifier (ID) of a STACKIT Network Area. (required) + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) * @param region The STACKIT Region of the resources. (required) * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) - * @param routeId The identifier (ID) of a STACKIT Route. (required) - * @param updateRouteOfRoutingTablePayload Request an update of a route in a routing table. - * (required) + * @param updateVPCRoutingTablePayload Request an update of a routing table. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -3470,22 +9576,21 @@ public okhttp3.Call partialUpdateNetworkAsync( * * * - * + * * * * * + * * *
Response Details
Status Code Description Response Headers
200 Update request for route successful. -
200 Update request for routing table successful. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
*/ - public okhttp3.Call updateRouteOfRoutingTableCall( - @javax.annotation.Nonnull UUID organizationId, - @javax.annotation.Nonnull UUID areaId, + public okhttp3.Call updateVPCRoutingTableCall( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, @javax.annotation.Nonnull String region, @javax.annotation.Nonnull UUID routingTableId, - @javax.annotation.Nonnull UUID routeId, - @javax.annotation.Nonnull - UpdateRouteOfRoutingTablePayload updateRouteOfRoutingTablePayload, + @javax.annotation.Nonnull UpdateVPCRoutingTablePayload updateVPCRoutingTablePayload, final ApiCallback _callback) throws ApiException { String basePath = null; @@ -3501,26 +9606,23 @@ public okhttp3.Call updateRouteOfRoutingTableCall( basePath = null; } - Object localVarPostBody = updateRouteOfRoutingTablePayload; + Object localVarPostBody = updateVPCRoutingTablePayload; // create path and map variables String localVarPath = - "/v2alpha1/organizations/{organizationId}/network-areas/{areaId}/regions/{region}/routing-tables/{routingTableId}/routes/{routeId}" + "/v2alpha1/projects/{projectId}/vpcs/{vpcId}/regions/{region}/routing-tables/{routingTableId}" .replace( - "{" + "organizationId" + "}", - localVarApiClient.escapeString(organizationId.toString())) + "{" + "projectId" + "}", + localVarApiClient.escapeString(projectId.toString())) .replace( - "{" + "areaId" + "}", - localVarApiClient.escapeString(areaId.toString())) + "{" + "vpcId" + "}", + localVarApiClient.escapeString(vpcId.toString())) .replace( "{" + "region" + "}", localVarApiClient.escapeString(region.toString())) .replace( "{" + "routingTableId" + "}", - localVarApiClient.escapeString(routingTableId.toString())) - .replace( - "{" + "routeId" + "}", - localVarApiClient.escapeString(routeId.toString())); + localVarApiClient.escapeString(routingTableId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -3557,165 +9659,140 @@ public okhttp3.Call updateRouteOfRoutingTableCall( } @SuppressWarnings("rawtypes") - private okhttp3.Call updateRouteOfRoutingTableValidateBeforeCall( - @javax.annotation.Nonnull UUID organizationId, - @javax.annotation.Nonnull UUID areaId, + private okhttp3.Call updateVPCRoutingTableValidateBeforeCall( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, @javax.annotation.Nonnull String region, @javax.annotation.Nonnull UUID routingTableId, - @javax.annotation.Nonnull UUID routeId, - @javax.annotation.Nonnull - UpdateRouteOfRoutingTablePayload updateRouteOfRoutingTablePayload, + @javax.annotation.Nonnull UpdateVPCRoutingTablePayload updateVPCRoutingTablePayload, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'organizationId' is set - if (organizationId == null) { + // verify the required parameter 'projectId' is set + if (projectId == null) { throw new ApiException( - "Missing the required parameter 'organizationId' when calling updateRouteOfRoutingTable(Async)"); + "Missing the required parameter 'projectId' when calling updateVPCRoutingTable(Async)"); } - // verify the required parameter 'areaId' is set - if (areaId == null) { + // verify the required parameter 'vpcId' is set + if (vpcId == null) { throw new ApiException( - "Missing the required parameter 'areaId' when calling updateRouteOfRoutingTable(Async)"); + "Missing the required parameter 'vpcId' when calling updateVPCRoutingTable(Async)"); } // verify the required parameter 'region' is set if (region == null) { throw new ApiException( - "Missing the required parameter 'region' when calling updateRouteOfRoutingTable(Async)"); + "Missing the required parameter 'region' when calling updateVPCRoutingTable(Async)"); } // verify the required parameter 'routingTableId' is set if (routingTableId == null) { throw new ApiException( - "Missing the required parameter 'routingTableId' when calling updateRouteOfRoutingTable(Async)"); - } - - // verify the required parameter 'routeId' is set - if (routeId == null) { - throw new ApiException( - "Missing the required parameter 'routeId' when calling updateRouteOfRoutingTable(Async)"); + "Missing the required parameter 'routingTableId' when calling updateVPCRoutingTable(Async)"); } - // verify the required parameter 'updateRouteOfRoutingTablePayload' is set - if (updateRouteOfRoutingTablePayload == null) { + // verify the required parameter 'updateVPCRoutingTablePayload' is set + if (updateVPCRoutingTablePayload == null) { throw new ApiException( - "Missing the required parameter 'updateRouteOfRoutingTablePayload' when calling updateRouteOfRoutingTable(Async)"); + "Missing the required parameter 'updateVPCRoutingTablePayload' when calling updateVPCRoutingTable(Async)"); } - return updateRouteOfRoutingTableCall( - organizationId, - areaId, - region, - routingTableId, - routeId, - updateRouteOfRoutingTablePayload, - _callback); + return updateVPCRoutingTableCall( + projectId, vpcId, region, routingTableId, updateVPCRoutingTablePayload, _callback); } /** - * Update a route of a routing table. Update a route defined in a routing table. + * Update a regional routing table. Update a routing table of a VPC for this region. * - * @param organizationId The identifier (ID) of a STACKIT Organization. (required) - * @param areaId The identifier (ID) of a STACKIT Network Area. (required) + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) * @param region The STACKIT Region of the resources. (required) * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) - * @param routeId The identifier (ID) of a STACKIT Route. (required) - * @param updateRouteOfRoutingTablePayload Request an update of a route in a routing table. - * (required) - * @return Route + * @param updateVPCRoutingTablePayload Request an update of a routing table. (required) + * @return VPCRoutingTable * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details * * * - * + * * * * * + * * *
Response Details
Status Code Description Response Headers
200 Update request for route successful. -
200 Update request for routing table successful. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
*/ - public Route updateRouteOfRoutingTable( - @javax.annotation.Nonnull UUID organizationId, - @javax.annotation.Nonnull UUID areaId, + public VPCRoutingTable updateVPCRoutingTable( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, @javax.annotation.Nonnull String region, @javax.annotation.Nonnull UUID routingTableId, - @javax.annotation.Nonnull UUID routeId, - @javax.annotation.Nonnull - UpdateRouteOfRoutingTablePayload updateRouteOfRoutingTablePayload) + @javax.annotation.Nonnull UpdateVPCRoutingTablePayload updateVPCRoutingTablePayload) throws ApiException { - ApiResponse localVarResp = - updateRouteOfRoutingTableWithHttpInfo( - organizationId, - areaId, - region, - routingTableId, - routeId, - updateRouteOfRoutingTablePayload); + ApiResponse localVarResp = + updateVPCRoutingTableWithHttpInfo( + projectId, vpcId, region, routingTableId, updateVPCRoutingTablePayload); return localVarResp.getData(); } /** - * Update a route of a routing table. Update a route defined in a routing table. + * Update a regional routing table. Update a routing table of a VPC for this region. * - * @param organizationId The identifier (ID) of a STACKIT Organization. (required) - * @param areaId The identifier (ID) of a STACKIT Network Area. (required) + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) * @param region The STACKIT Region of the resources. (required) * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) - * @param routeId The identifier (ID) of a STACKIT Route. (required) - * @param updateRouteOfRoutingTablePayload Request an update of a route in a routing table. - * (required) - * @return ApiResponse<Route> + * @param updateVPCRoutingTablePayload Request an update of a routing table. (required) + * @return ApiResponse<VPCRoutingTable> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details * * * - * + * * * * * + * * *
Response Details
Status Code Description Response Headers
200 Update request for route successful. -
200 Update request for routing table successful. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
*/ - public ApiResponse updateRouteOfRoutingTableWithHttpInfo( - @javax.annotation.Nonnull UUID organizationId, - @javax.annotation.Nonnull UUID areaId, + public ApiResponse updateVPCRoutingTableWithHttpInfo( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, @javax.annotation.Nonnull String region, @javax.annotation.Nonnull UUID routingTableId, - @javax.annotation.Nonnull UUID routeId, - @javax.annotation.Nonnull - UpdateRouteOfRoutingTablePayload updateRouteOfRoutingTablePayload) + @javax.annotation.Nonnull UpdateVPCRoutingTablePayload updateVPCRoutingTablePayload) throws ApiException { okhttp3.Call localVarCall = - updateRouteOfRoutingTableValidateBeforeCall( - organizationId, - areaId, + updateVPCRoutingTableValidateBeforeCall( + projectId, + vpcId, region, routingTableId, - routeId, - updateRouteOfRoutingTablePayload, + updateVPCRoutingTablePayload, null); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken() {}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * Update a route of a routing table. (asynchronously) Update a route defined in a routing - * table. + * Update a regional routing table. (asynchronously) Update a routing table of a VPC for this + * region. * - * @param organizationId The identifier (ID) of a STACKIT Organization. (required) - * @param areaId The identifier (ID) of a STACKIT Network Area. (required) + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) * @param region The STACKIT Region of the resources. (required) * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) - * @param routeId The identifier (ID) of a STACKIT Route. (required) - * @param updateRouteOfRoutingTablePayload Request an update of a route in a routing table. - * (required) + * @param updateVPCRoutingTablePayload Request an update of a routing table. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body @@ -3724,47 +9801,47 @@ public ApiResponse updateRouteOfRoutingTableWithHttpInfo( * * * - * + * * * * * + * * *
Response Details
Status Code Description Response Headers
200 Update request for route successful. -
200 Update request for routing table successful. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
*/ - public okhttp3.Call updateRouteOfRoutingTableAsync( - @javax.annotation.Nonnull UUID organizationId, - @javax.annotation.Nonnull UUID areaId, + public okhttp3.Call updateVPCRoutingTableAsync( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, @javax.annotation.Nonnull String region, @javax.annotation.Nonnull UUID routingTableId, - @javax.annotation.Nonnull UUID routeId, - @javax.annotation.Nonnull - UpdateRouteOfRoutingTablePayload updateRouteOfRoutingTablePayload, - final ApiCallback _callback) + @javax.annotation.Nonnull UpdateVPCRoutingTablePayload updateVPCRoutingTablePayload, + final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = - updateRouteOfRoutingTableValidateBeforeCall( - organizationId, - areaId, + updateVPCRoutingTableValidateBeforeCall( + projectId, + vpcId, region, routingTableId, - routeId, - updateRouteOfRoutingTablePayload, + updateVPCRoutingTablePayload, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken() {}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for updateRoutingTableOfArea + * Build call for updateVPCStaticRoute * - * @param organizationId The identifier (ID) of a STACKIT Organization. (required) - * @param areaId The identifier (ID) of a STACKIT Network Area. (required) + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) * @param region The STACKIT Region of the resources. (required) * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) - * @param updateRoutingTableOfAreaPayload Request an update of a routing table. (required) + * @param routeId The identifier (ID) of a STACKIT Route. (required) + * @param updateVPCStaticRoutePayload Request an update of a static route. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -3772,21 +9849,22 @@ public okhttp3.Call updateRouteOfRoutingTableAsync( * * * - * + * * * * * + * * *
Response Details
Status Code Description Response Headers
200 Update request for routing table successful. -
200 Update request for static route successful. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
*/ - public okhttp3.Call updateRoutingTableOfAreaCall( - @javax.annotation.Nonnull UUID organizationId, - @javax.annotation.Nonnull UUID areaId, + public okhttp3.Call updateVPCStaticRouteCall( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, @javax.annotation.Nonnull String region, @javax.annotation.Nonnull UUID routingTableId, - @javax.annotation.Nonnull - UpdateRoutingTableOfAreaPayload updateRoutingTableOfAreaPayload, + @javax.annotation.Nonnull UUID routeId, + @javax.annotation.Nonnull UpdateVPCStaticRoutePayload updateVPCStaticRoutePayload, final ApiCallback _callback) throws ApiException { String basePath = null; @@ -3802,23 +9880,26 @@ public okhttp3.Call updateRoutingTableOfAreaCall( basePath = null; } - Object localVarPostBody = updateRoutingTableOfAreaPayload; + Object localVarPostBody = updateVPCStaticRoutePayload; // create path and map variables String localVarPath = - "/v2alpha1/organizations/{organizationId}/network-areas/{areaId}/regions/{region}/routing-tables/{routingTableId}" + "/v2alpha1/projects/{projectId}/vpcs/{vpcId}/regions/{region}/routing-tables/{routingTableId}/static-routes/{routeId}" .replace( - "{" + "organizationId" + "}", - localVarApiClient.escapeString(organizationId.toString())) + "{" + "projectId" + "}", + localVarApiClient.escapeString(projectId.toString())) .replace( - "{" + "areaId" + "}", - localVarApiClient.escapeString(areaId.toString())) + "{" + "vpcId" + "}", + localVarApiClient.escapeString(vpcId.toString())) .replace( "{" + "region" + "}", localVarApiClient.escapeString(region.toString())) .replace( "{" + "routingTableId" + "}", - localVarApiClient.escapeString(routingTableId.toString())); + localVarApiClient.escapeString(routingTableId.toString())) + .replace( + "{" + "routeId" + "}", + localVarApiClient.escapeString(routeId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -3855,146 +9936,164 @@ public okhttp3.Call updateRoutingTableOfAreaCall( } @SuppressWarnings("rawtypes") - private okhttp3.Call updateRoutingTableOfAreaValidateBeforeCall( - @javax.annotation.Nonnull UUID organizationId, - @javax.annotation.Nonnull UUID areaId, + private okhttp3.Call updateVPCStaticRouteValidateBeforeCall( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, @javax.annotation.Nonnull String region, @javax.annotation.Nonnull UUID routingTableId, - @javax.annotation.Nonnull - UpdateRoutingTableOfAreaPayload updateRoutingTableOfAreaPayload, + @javax.annotation.Nonnull UUID routeId, + @javax.annotation.Nonnull UpdateVPCStaticRoutePayload updateVPCStaticRoutePayload, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'organizationId' is set - if (organizationId == null) { + // verify the required parameter 'projectId' is set + if (projectId == null) { throw new ApiException( - "Missing the required parameter 'organizationId' when calling updateRoutingTableOfArea(Async)"); + "Missing the required parameter 'projectId' when calling updateVPCStaticRoute(Async)"); } - // verify the required parameter 'areaId' is set - if (areaId == null) { + // verify the required parameter 'vpcId' is set + if (vpcId == null) { throw new ApiException( - "Missing the required parameter 'areaId' when calling updateRoutingTableOfArea(Async)"); + "Missing the required parameter 'vpcId' when calling updateVPCStaticRoute(Async)"); } // verify the required parameter 'region' is set if (region == null) { throw new ApiException( - "Missing the required parameter 'region' when calling updateRoutingTableOfArea(Async)"); + "Missing the required parameter 'region' when calling updateVPCStaticRoute(Async)"); } // verify the required parameter 'routingTableId' is set if (routingTableId == null) { throw new ApiException( - "Missing the required parameter 'routingTableId' when calling updateRoutingTableOfArea(Async)"); + "Missing the required parameter 'routingTableId' when calling updateVPCStaticRoute(Async)"); } - // verify the required parameter 'updateRoutingTableOfAreaPayload' is set - if (updateRoutingTableOfAreaPayload == null) { + // verify the required parameter 'routeId' is set + if (routeId == null) { throw new ApiException( - "Missing the required parameter 'updateRoutingTableOfAreaPayload' when calling updateRoutingTableOfArea(Async)"); + "Missing the required parameter 'routeId' when calling updateVPCStaticRoute(Async)"); } - return updateRoutingTableOfAreaCall( - organizationId, - areaId, + // verify the required parameter 'updateVPCStaticRoutePayload' is set + if (updateVPCStaticRoutePayload == null) { + throw new ApiException( + "Missing the required parameter 'updateVPCStaticRoutePayload' when calling updateVPCStaticRoute(Async)"); + } + + return updateVPCStaticRouteCall( + projectId, + vpcId, region, routingTableId, - updateRoutingTableOfAreaPayload, + routeId, + updateVPCStaticRoutePayload, _callback); } /** - * Update a routing table. Update a routing table defined in a network area. + * Update a regional static route. Update a static route of a VPC for this region. * - * @param organizationId The identifier (ID) of a STACKIT Organization. (required) - * @param areaId The identifier (ID) of a STACKIT Network Area. (required) + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) * @param region The STACKIT Region of the resources. (required) * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) - * @param updateRoutingTableOfAreaPayload Request an update of a routing table. (required) - * @return RoutingTable + * @param routeId The identifier (ID) of a STACKIT Route. (required) + * @param updateVPCStaticRoutePayload Request an update of a static route. (required) + * @return Route * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details * * * - * + * * * * * + * * *
Response Details
Status Code Description Response Headers
200 Update request for routing table successful. -
200 Update request for static route successful. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
*/ - public RoutingTable updateRoutingTableOfArea( - @javax.annotation.Nonnull UUID organizationId, - @javax.annotation.Nonnull UUID areaId, + public Route updateVPCStaticRoute( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, @javax.annotation.Nonnull String region, @javax.annotation.Nonnull UUID routingTableId, - @javax.annotation.Nonnull - UpdateRoutingTableOfAreaPayload updateRoutingTableOfAreaPayload) + @javax.annotation.Nonnull UUID routeId, + @javax.annotation.Nonnull UpdateVPCStaticRoutePayload updateVPCStaticRoutePayload) throws ApiException { - ApiResponse localVarResp = - updateRoutingTableOfAreaWithHttpInfo( - organizationId, - areaId, + ApiResponse localVarResp = + updateVPCStaticRouteWithHttpInfo( + projectId, + vpcId, region, routingTableId, - updateRoutingTableOfAreaPayload); + routeId, + updateVPCStaticRoutePayload); return localVarResp.getData(); } /** - * Update a routing table. Update a routing table defined in a network area. + * Update a regional static route. Update a static route of a VPC for this region. * - * @param organizationId The identifier (ID) of a STACKIT Organization. (required) - * @param areaId The identifier (ID) of a STACKIT Network Area. (required) + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) * @param region The STACKIT Region of the resources. (required) * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) - * @param updateRoutingTableOfAreaPayload Request an update of a routing table. (required) - * @return ApiResponse<RoutingTable> + * @param routeId The identifier (ID) of a STACKIT Route. (required) + * @param updateVPCStaticRoutePayload Request an update of a static route. (required) + * @return ApiResponse<Route> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body * @http.response.details * * * - * + * * * * * + * * *
Response Details
Status Code Description Response Headers
200 Update request for routing table successful. -
200 Update request for static route successful. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
*/ - public ApiResponse updateRoutingTableOfAreaWithHttpInfo( - @javax.annotation.Nonnull UUID organizationId, - @javax.annotation.Nonnull UUID areaId, + public ApiResponse updateVPCStaticRouteWithHttpInfo( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, @javax.annotation.Nonnull String region, @javax.annotation.Nonnull UUID routingTableId, - @javax.annotation.Nonnull - UpdateRoutingTableOfAreaPayload updateRoutingTableOfAreaPayload) + @javax.annotation.Nonnull UUID routeId, + @javax.annotation.Nonnull UpdateVPCStaticRoutePayload updateVPCStaticRoutePayload) throws ApiException { okhttp3.Call localVarCall = - updateRoutingTableOfAreaValidateBeforeCall( - organizationId, - areaId, + updateVPCStaticRouteValidateBeforeCall( + projectId, + vpcId, region, routingTableId, - updateRoutingTableOfAreaPayload, + routeId, + updateVPCStaticRoutePayload, null); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken() {}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** - * Update a routing table. (asynchronously) Update a routing table defined in a network area. + * Update a regional static route. (asynchronously) Update a static route of a VPC for this + * region. * - * @param organizationId The identifier (ID) of a STACKIT Organization. (required) - * @param areaId The identifier (ID) of a STACKIT Network Area. (required) + * @param projectId The identifier (ID) of a STACKIT Project. (required) + * @param vpcId The unique identifier (ID) of the target STACKIT VPC in the request path. + * (required) * @param region The STACKIT Region of the resources. (required) * @param routingTableId The identifier (ID) of a STACKIT Routing Table. (required) - * @param updateRoutingTableOfAreaPayload Request an update of a routing table. (required) + * @param routeId The identifier (ID) of a STACKIT Route. (required) + * @param updateVPCStaticRoutePayload Request an update of a static route. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body @@ -4003,33 +10102,35 @@ public ApiResponse updateRoutingTableOfAreaWithHttpInfo( * * * - * + * * * * * + * * *
Response Details
Status Code Description Response Headers
200 Update request for routing table successful. -
200 Update request for static route successful. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
424 The region of the vpc is not enabled. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
*/ - public okhttp3.Call updateRoutingTableOfAreaAsync( - @javax.annotation.Nonnull UUID organizationId, - @javax.annotation.Nonnull UUID areaId, + public okhttp3.Call updateVPCStaticRouteAsync( + @javax.annotation.Nonnull UUID projectId, + @javax.annotation.Nonnull UUID vpcId, @javax.annotation.Nonnull String region, @javax.annotation.Nonnull UUID routingTableId, - @javax.annotation.Nonnull - UpdateRoutingTableOfAreaPayload updateRoutingTableOfAreaPayload, - final ApiCallback _callback) + @javax.annotation.Nonnull UUID routeId, + @javax.annotation.Nonnull UpdateVPCStaticRoutePayload updateVPCStaticRoutePayload, + final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = - updateRoutingTableOfAreaValidateBeforeCall( - organizationId, - areaId, + updateVPCStaticRouteValidateBeforeCall( + projectId, + vpcId, region, routingTableId, - updateRoutingTableOfAreaPayload, + routeId, + updateVPCStaticRoutePayload, _callback); - Type localVarReturnType = new TypeToken() {}.getType(); + Type localVarReturnType = new TypeToken() {}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/AddRoutingTableToAreaPayload.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/AddRoutingTableToAreaPayload.java index b3e77897..415c3ff6 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/AddRoutingTableToAreaPayload.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/AddRoutingTableToAreaPayload.java @@ -32,7 +32,10 @@ import java.util.Objects; import java.util.UUID; -/** An object representing a routing table. */ +/** + * An object representing a routing table. Filterable Fields: `dynamicRoutes`, + * `systemRoutes`. + */ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.19.0") diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/AddVPCRoutingTablePayload.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/AddVPCRoutingTablePayload.java new file mode 100644 index 00000000..b2057151 --- /dev/null +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/AddVPCRoutingTablePayload.java @@ -0,0 +1,511 @@ +/* + * STACKIT IaaS API + * This API allows you to create and modify IaaS resources. + * + * The version of the OpenAPI document: 2alpha1 + * 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.v2alpha1api.model; + +import cloud.stackit.sdk.iaas.v2alpha1api.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.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.time.OffsetDateTime; +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; + +/** + * An object representing a VPC routing table. Filterable Fields: `createdAt`, + * `dynamicRoutes`, `name`, `systemRoutes`, `updatedAt`. + */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.19.0") +public class AddVPCRoutingTablePayload { + 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) + @javax.annotation.Nullable private String description; + + public static final String SERIALIZED_NAME_DYNAMIC_ROUTES = "dynamicRoutes"; + + @SerializedName(SERIALIZED_NAME_DYNAMIC_ROUTES) + @javax.annotation.Nullable private Boolean dynamicRoutes = true; + + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable private UUID id; + + public static final String SERIALIZED_NAME_LABELS = "labels"; + + @SerializedName(SERIALIZED_NAME_LABELS) + @javax.annotation.Nullable private Object labels; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_SYSTEM_ROUTES = "systemRoutes"; + + @SerializedName(SERIALIZED_NAME_SYSTEM_ROUTES) + @javax.annotation.Nullable private Boolean systemRoutes = true; + + public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; + + @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @javax.annotation.Nullable private OffsetDateTime updatedAt; + + public AddVPCRoutingTablePayload() {} + + public AddVPCRoutingTablePayload(OffsetDateTime createdAt, UUID id, OffsetDateTime updatedAt) { + this(); + this.createdAt = createdAt; + this.id = id; + this.updatedAt = updatedAt; + } + + /** + * Date-time when resource was created. + * + * @return createdAt + */ + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public AddVPCRoutingTablePayload 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 AddVPCRoutingTablePayload dynamicRoutes( + @javax.annotation.Nullable Boolean dynamicRoutes) { + this.dynamicRoutes = dynamicRoutes; + return this; + } + + /** + * A config setting for a routing table which allows propagation of dynamic routes to this + * routing table. + * + * @return dynamicRoutes + */ + @javax.annotation.Nullable public Boolean getDynamicRoutes() { + return dynamicRoutes; + } + + public void setDynamicRoutes(@javax.annotation.Nullable Boolean dynamicRoutes) { + this.dynamicRoutes = dynamicRoutes; + } + + /** + * Universally Unique Identifier (UUID). + * + * @return id + */ + @javax.annotation.Nullable public UUID getId() { + return id; + } + + public AddVPCRoutingTablePayload labels(@javax.annotation.Nullable Object labels) { + this.labels = labels; + return this; + } + + /** + * 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. + * + * @return labels + */ + @javax.annotation.Nullable public Object getLabels() { + return labels; + } + + public void setLabels(@javax.annotation.Nullable Object labels) { + this.labels = labels; + } + + public AddVPCRoutingTablePayload name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * The name for a General Object. Matches Names and also UUIDs. + * + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + public AddVPCRoutingTablePayload systemRoutes(@javax.annotation.Nullable Boolean systemRoutes) { + this.systemRoutes = systemRoutes; + return this; + } + + /** + * A config setting for a routing table which allows installation of automatic system routes for + * connectivity between projects in the same SNA. + * + * @return systemRoutes + */ + @javax.annotation.Nullable public Boolean getSystemRoutes() { + return systemRoutes; + } + + public void setSystemRoutes(@javax.annotation.Nullable Boolean systemRoutes) { + this.systemRoutes = systemRoutes; + } + + /** + * 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. + */ + 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 AddVPCRoutingTablePayload instance itself + */ + public AddVPCRoutingTablePayload 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; + } + AddVPCRoutingTablePayload addVPCRoutingTablePayload = (AddVPCRoutingTablePayload) o; + return Objects.equals(this.createdAt, addVPCRoutingTablePayload.createdAt) + && Objects.equals(this.description, addVPCRoutingTablePayload.description) + && Objects.equals(this.dynamicRoutes, addVPCRoutingTablePayload.dynamicRoutes) + && Objects.equals(this.id, addVPCRoutingTablePayload.id) + && Objects.equals(this.labels, addVPCRoutingTablePayload.labels) + && Objects.equals(this.name, addVPCRoutingTablePayload.name) + && Objects.equals(this.systemRoutes, addVPCRoutingTablePayload.systemRoutes) + && Objects.equals(this.updatedAt, addVPCRoutingTablePayload.updatedAt) + && Objects.equals( + this.additionalProperties, addVPCRoutingTablePayload.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + createdAt, + description, + dynamicRoutes, + id, + labels, + name, + systemRoutes, + updatedAt, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AddVPCRoutingTablePayload {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" dynamicRoutes: ").append(toIndentedString(dynamicRoutes)).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"); + sb.append(" systemRoutes: ").append(toIndentedString(systemRoutes)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).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( + "createdAt", + "description", + "dynamicRoutes", + "id", + "labels", + "name", + "systemRoutes", + "updatedAt")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("name")); + } + + /** + * 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 AddVPCRoutingTablePayload + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AddVPCRoutingTablePayload.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 AddVPCRoutingTablePayload is not found in the empty JSON string", + AddVPCRoutingTablePayload.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AddVPCRoutingTablePayload.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("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("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `id` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("id").toString())); + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `name` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AddVPCRoutingTablePayload.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AddVPCRoutingTablePayload' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(AddVPCRoutingTablePayload.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, AddVPCRoutingTablePayload 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 AddVPCRoutingTablePayload read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AddVPCRoutingTablePayload 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 AddVPCRoutingTablePayload given an JSON string + * + * @param jsonString JSON string + * @return An instance of AddVPCRoutingTablePayload + * @throws IOException if the JSON string is invalid with respect to AddVPCRoutingTablePayload + */ + public static AddVPCRoutingTablePayload fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AddVPCRoutingTablePayload.class); + } + + /** + * Convert an instance of AddVPCRoutingTablePayload 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/v2alpha1api/model/AddVPCStaticRoutePayload.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/AddVPCStaticRoutePayload.java new file mode 100644 index 00000000..fda573fd --- /dev/null +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/AddVPCStaticRoutePayload.java @@ -0,0 +1,439 @@ +/* + * STACKIT IaaS API + * This API allows you to create and modify IaaS resources. + * + * The version of the OpenAPI document: 2alpha1 + * 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.v2alpha1api.model; + +import cloud.stackit.sdk.iaas.v2alpha1api.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.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.time.OffsetDateTime; +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; + +/** Object represents a network route. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.19.0") +public class AddVPCStaticRoutePayload { + 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_DESTINATION = "destination"; + + @SerializedName(SERIALIZED_NAME_DESTINATION) + @javax.annotation.Nonnull + private AddVPCStaticRoutePayloadDestination destination; + + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable private UUID id; + + public static final String SERIALIZED_NAME_LABELS = "labels"; + + @SerializedName(SERIALIZED_NAME_LABELS) + @javax.annotation.Nullable private Object labels; + + public static final String SERIALIZED_NAME_NEXTHOP = "nexthop"; + + @SerializedName(SERIALIZED_NAME_NEXTHOP) + @javax.annotation.Nonnull + private AddVPCStaticRoutePayloadNexthop nexthop; + + public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; + + @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @javax.annotation.Nullable private OffsetDateTime updatedAt; + + public AddVPCStaticRoutePayload() {} + + public AddVPCStaticRoutePayload(OffsetDateTime createdAt, UUID id, OffsetDateTime updatedAt) { + this(); + this.createdAt = createdAt; + this.id = id; + this.updatedAt = updatedAt; + } + + /** + * Date-time when resource was created. + * + * @return createdAt + */ + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public AddVPCStaticRoutePayload destination( + @javax.annotation.Nonnull AddVPCStaticRoutePayloadDestination destination) { + this.destination = destination; + return this; + } + + /** + * Get destination + * + * @return destination + */ + @javax.annotation.Nonnull + public AddVPCStaticRoutePayloadDestination getDestination() { + return destination; + } + + public void setDestination( + @javax.annotation.Nonnull AddVPCStaticRoutePayloadDestination destination) { + this.destination = destination; + } + + /** + * Universally Unique Identifier (UUID). + * + * @return id + */ + @javax.annotation.Nullable public UUID getId() { + return id; + } + + public AddVPCStaticRoutePayload labels(@javax.annotation.Nullable Object labels) { + this.labels = labels; + return this; + } + + /** + * 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. + * + * @return labels + */ + @javax.annotation.Nullable public Object getLabels() { + return labels; + } + + public void setLabels(@javax.annotation.Nullable Object labels) { + this.labels = labels; + } + + public AddVPCStaticRoutePayload nexthop( + @javax.annotation.Nonnull AddVPCStaticRoutePayloadNexthop nexthop) { + this.nexthop = nexthop; + return this; + } + + /** + * Get nexthop + * + * @return nexthop + */ + @javax.annotation.Nonnull + public AddVPCStaticRoutePayloadNexthop getNexthop() { + return nexthop; + } + + public void setNexthop(@javax.annotation.Nonnull AddVPCStaticRoutePayloadNexthop nexthop) { + this.nexthop = nexthop; + } + + /** + * 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. + */ + 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 AddVPCStaticRoutePayload instance itself + */ + public AddVPCStaticRoutePayload 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; + } + AddVPCStaticRoutePayload addVPCStaticRoutePayload = (AddVPCStaticRoutePayload) o; + return Objects.equals(this.createdAt, addVPCStaticRoutePayload.createdAt) + && Objects.equals(this.destination, addVPCStaticRoutePayload.destination) + && Objects.equals(this.id, addVPCStaticRoutePayload.id) + && Objects.equals(this.labels, addVPCStaticRoutePayload.labels) + && Objects.equals(this.nexthop, addVPCStaticRoutePayload.nexthop) + && Objects.equals(this.updatedAt, addVPCStaticRoutePayload.updatedAt) + && Objects.equals( + this.additionalProperties, addVPCStaticRoutePayload.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + createdAt, destination, id, labels, nexthop, updatedAt, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AddVPCStaticRoutePayload {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" destination: ").append(toIndentedString(destination)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" labels: ").append(toIndentedString(labels)).append("\n"); + sb.append(" nexthop: ").append(toIndentedString(nexthop)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).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( + "createdAt", + "destination", + "id", + "labels", + "nexthop", + "updatedAt")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("destination", "nexthop")); + } + + /** + * 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 AddVPCStaticRoutePayload + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AddVPCStaticRoutePayload.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 AddVPCStaticRoutePayload is not found in the empty JSON string", + AddVPCStaticRoutePayload.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AddVPCStaticRoutePayload.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(); + // validate the required field `destination` + AddVPCStaticRoutePayloadDestination.validateJsonElement(jsonObj.get("destination")); + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `id` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("id").toString())); + } + // validate the required field `nexthop` + AddVPCStaticRoutePayloadNexthop.validateJsonElement(jsonObj.get("nexthop")); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AddVPCStaticRoutePayload.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AddVPCStaticRoutePayload' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(AddVPCStaticRoutePayload.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, AddVPCStaticRoutePayload 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 AddVPCStaticRoutePayload read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AddVPCStaticRoutePayload 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 AddVPCStaticRoutePayload given an JSON string + * + * @param jsonString JSON string + * @return An instance of AddVPCStaticRoutePayload + * @throws IOException if the JSON string is invalid with respect to AddVPCStaticRoutePayload + */ + public static AddVPCStaticRoutePayload fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AddVPCStaticRoutePayload.class); + } + + /** + * Convert an instance of AddVPCStaticRoutePayload 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/v2alpha1api/model/AddVPCStaticRoutePayloadDestination.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/AddVPCStaticRoutePayloadDestination.java new file mode 100644 index 00000000..0f514690 --- /dev/null +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/AddVPCStaticRoutePayloadDestination.java @@ -0,0 +1,297 @@ +/* + * STACKIT IaaS API + * This API allows you to create and modify IaaS resources. + * + * The version of the OpenAPI document: 2alpha1 + * 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.v2alpha1api.model; + +import cloud.stackit.sdk.iaas.v2alpha1api.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +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.ArrayList; +import java.util.HashMap; +import java.util.Map; +import java.util.logging.Level; +import java.util.logging.Logger; + +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.19.0") +public class AddVPCStaticRoutePayloadDestination extends AbstractOpenApiSchema { + private static final Logger log = + Logger.getLogger(AddVPCStaticRoutePayloadDestination.class.getName()); + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AddVPCStaticRoutePayloadDestination.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AddVPCStaticRoutePayloadDestination' and + // its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterDestinationCIDRv4 = + gson.getDelegateAdapter(this, TypeToken.get(DestinationCIDRv4.class)); + final TypeAdapter adapterDestinationCIDRv6 = + gson.getDelegateAdapter(this, TypeToken.get(DestinationCIDRv6.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, AddVPCStaticRoutePayloadDestination value) + throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type `DestinationCIDRv4` + if (value.getActualInstance() instanceof DestinationCIDRv4) { + JsonElement element = + adapterDestinationCIDRv4.toJsonTree( + (DestinationCIDRv4) value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `DestinationCIDRv6` + if (value.getActualInstance() instanceof DestinationCIDRv6) { + JsonElement element = + adapterDestinationCIDRv6.toJsonTree( + (DestinationCIDRv6) value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + throw new IOException( + "Failed to serialize as the type doesn't match oneOf schemas: DestinationCIDRv4, DestinationCIDRv6"); + } + + @Override + public AddVPCStaticRoutePayloadDestination read(JsonReader in) + throws IOException { + Object deserialized = null; + JsonElement jsonElement = elementAdapter.read(in); + + int match = 0; + ArrayList errorMessages = new ArrayList<>(); + TypeAdapter actualAdapter = elementAdapter; + + // deserialize DestinationCIDRv4 + try { + // validate the JSON object to see if any exception is thrown + DestinationCIDRv4.validateJsonElement(jsonElement); + actualAdapter = adapterDestinationCIDRv4; + match++; + log.log( + Level.FINER, + "Input data matches schema 'DestinationCIDRv4'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + java.util.Locale.ROOT, + "Deserialization for DestinationCIDRv4 failed with `%s`.", + e.getMessage())); + log.log( + Level.FINER, + "Input data does not match schema 'DestinationCIDRv4'", + e); + } + // deserialize DestinationCIDRv6 + try { + // validate the JSON object to see if any exception is thrown + DestinationCIDRv6.validateJsonElement(jsonElement); + actualAdapter = adapterDestinationCIDRv6; + match++; + log.log( + Level.FINER, + "Input data matches schema 'DestinationCIDRv6'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + java.util.Locale.ROOT, + "Deserialization for DestinationCIDRv6 failed with `%s`.", + e.getMessage())); + log.log( + Level.FINER, + "Input data does not match schema 'DestinationCIDRv6'", + e); + } + + if (match == 1) { + AddVPCStaticRoutePayloadDestination ret = + new AddVPCStaticRoutePayloadDestination(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } + + throw new IOException( + String.format( + java.util.Locale.ROOT, + "Failed deserialization for AddVPCStaticRoutePayloadDestination: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", + match, + errorMessages, + jsonElement.toString())); + } + }.nullSafe(); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap>(); + + public AddVPCStaticRoutePayloadDestination() { + super("oneOf", Boolean.FALSE); + } + + public AddVPCStaticRoutePayloadDestination(Object o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("DestinationCIDRv4", DestinationCIDRv4.class); + schemas.put("DestinationCIDRv6", DestinationCIDRv6.class); + } + + @Override + public Map> getSchemas() { + return AddVPCStaticRoutePayloadDestination.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: DestinationCIDRv4, DestinationCIDRv6 + * + *

It could be an instance of the 'oneOf' schemas. + */ + @Override + public void setActualInstance(Object instance) { + if (instance instanceof DestinationCIDRv4) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof DestinationCIDRv6) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException( + "Invalid instance type. Must be DestinationCIDRv4, DestinationCIDRv6"); + } + + /** + * Get the actual instance, which can be the following: DestinationCIDRv4, DestinationCIDRv6 + * + * @return The actual instance (DestinationCIDRv4, DestinationCIDRv6) + */ + @SuppressWarnings("unchecked") + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `DestinationCIDRv4`. If the actual instance is not + * `DestinationCIDRv4`, the ClassCastException will be thrown. + * + * @return The actual instance of `DestinationCIDRv4` + * @throws ClassCastException if the instance is not `DestinationCIDRv4` + */ + public DestinationCIDRv4 getDestinationCIDRv4() throws ClassCastException { + return (DestinationCIDRv4) super.getActualInstance(); + } + + /** + * Get the actual instance of `DestinationCIDRv6`. If the actual instance is not + * `DestinationCIDRv6`, the ClassCastException will be thrown. + * + * @return The actual instance of `DestinationCIDRv6` + * @throws ClassCastException if the instance is not `DestinationCIDRv6` + */ + public DestinationCIDRv6 getDestinationCIDRv6() throws ClassCastException { + return (DestinationCIDRv6) super.getActualInstance(); + } + + /** + * 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 + * AddVPCStaticRoutePayloadDestination + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + // validate oneOf schemas one by one + int validCount = 0; + ArrayList errorMessages = new ArrayList<>(); + // validate the json string with DestinationCIDRv4 + try { + DestinationCIDRv4.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format( + java.util.Locale.ROOT, + "Deserialization for DestinationCIDRv4 failed with `%s`.", + e.getMessage())); + // continue to the next one + } + // validate the json string with DestinationCIDRv6 + try { + DestinationCIDRv6.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format( + java.util.Locale.ROOT, + "Deserialization for DestinationCIDRv6 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 AddVPCStaticRoutePayloadDestination with oneOf schemas: DestinationCIDRv4, DestinationCIDRv6. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", + validCount, + errorMessages, + jsonElement.toString())); + } + } + + /** + * Create an instance of AddVPCStaticRoutePayloadDestination given an JSON string + * + * @param jsonString JSON string + * @return An instance of AddVPCStaticRoutePayloadDestination + * @throws IOException if the JSON string is invalid with respect to + * AddVPCStaticRoutePayloadDestination + */ + public static AddVPCStaticRoutePayloadDestination fromJson(String jsonString) + throws IOException { + return JSON.getGson().fromJson(jsonString, AddVPCStaticRoutePayloadDestination.class); + } + + /** + * Convert an instance of AddVPCStaticRoutePayloadDestination 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/v2alpha1api/model/AddVPCStaticRoutePayloadNexthop.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/AddVPCStaticRoutePayloadNexthop.java new file mode 100644 index 00000000..ccfeb570 --- /dev/null +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/AddVPCStaticRoutePayloadNexthop.java @@ -0,0 +1,411 @@ +/* + * STACKIT IaaS API + * This API allows you to create and modify IaaS resources. + * + * The version of the OpenAPI document: 2alpha1 + * 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.v2alpha1api.model; + +import cloud.stackit.sdk.iaas.v2alpha1api.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +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.ArrayList; +import java.util.HashMap; +import java.util.Map; +import java.util.logging.Level; +import java.util.logging.Logger; + +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.19.0") +public class AddVPCStaticRoutePayloadNexthop extends AbstractOpenApiSchema { + private static final Logger log = + Logger.getLogger(AddVPCStaticRoutePayloadNexthop.class.getName()); + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AddVPCStaticRoutePayloadNexthop.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AddVPCStaticRoutePayloadNexthop' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterNexthopIPv4 = + gson.getDelegateAdapter(this, TypeToken.get(NexthopIPv4.class)); + final TypeAdapter adapterNexthopIPv6 = + gson.getDelegateAdapter(this, TypeToken.get(NexthopIPv6.class)); + final TypeAdapter adapterNexthopInternet = + gson.getDelegateAdapter(this, TypeToken.get(NexthopInternet.class)); + final TypeAdapter adapterNexthopBlackhole = + gson.getDelegateAdapter(this, TypeToken.get(NexthopBlackhole.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, AddVPCStaticRoutePayloadNexthop value) + throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type `NexthopIPv4` + if (value.getActualInstance() instanceof NexthopIPv4) { + JsonElement element = + adapterNexthopIPv4.toJsonTree( + (NexthopIPv4) value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `NexthopIPv6` + if (value.getActualInstance() instanceof NexthopIPv6) { + JsonElement element = + adapterNexthopIPv6.toJsonTree( + (NexthopIPv6) value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `NexthopInternet` + if (value.getActualInstance() instanceof NexthopInternet) { + JsonElement element = + adapterNexthopInternet.toJsonTree( + (NexthopInternet) value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `NexthopBlackhole` + if (value.getActualInstance() instanceof NexthopBlackhole) { + JsonElement element = + adapterNexthopBlackhole.toJsonTree( + (NexthopBlackhole) value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + throw new IOException( + "Failed to serialize as the type doesn't match oneOf schemas: NexthopBlackhole, NexthopIPv4, NexthopIPv6, NexthopInternet"); + } + + @Override + public AddVPCStaticRoutePayloadNexthop read(JsonReader in) + throws IOException { + Object deserialized = null; + JsonElement jsonElement = elementAdapter.read(in); + + int match = 0; + ArrayList errorMessages = new ArrayList<>(); + TypeAdapter actualAdapter = elementAdapter; + + // deserialize NexthopIPv4 + try { + // validate the JSON object to see if any exception is thrown + NexthopIPv4.validateJsonElement(jsonElement); + actualAdapter = adapterNexthopIPv4; + match++; + log.log(Level.FINER, "Input data matches schema 'NexthopIPv4'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + java.util.Locale.ROOT, + "Deserialization for NexthopIPv4 failed with `%s`.", + e.getMessage())); + log.log( + Level.FINER, + "Input data does not match schema 'NexthopIPv4'", + e); + } + // deserialize NexthopIPv6 + try { + // validate the JSON object to see if any exception is thrown + NexthopIPv6.validateJsonElement(jsonElement); + actualAdapter = adapterNexthopIPv6; + match++; + log.log(Level.FINER, "Input data matches schema 'NexthopIPv6'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + java.util.Locale.ROOT, + "Deserialization for NexthopIPv6 failed with `%s`.", + e.getMessage())); + log.log( + Level.FINER, + "Input data does not match schema 'NexthopIPv6'", + e); + } + // deserialize NexthopInternet + try { + // validate the JSON object to see if any exception is thrown + NexthopInternet.validateJsonElement(jsonElement); + actualAdapter = adapterNexthopInternet; + match++; + log.log(Level.FINER, "Input data matches schema 'NexthopInternet'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + java.util.Locale.ROOT, + "Deserialization for NexthopInternet failed with `%s`.", + e.getMessage())); + log.log( + Level.FINER, + "Input data does not match schema 'NexthopInternet'", + e); + } + // deserialize NexthopBlackhole + try { + // validate the JSON object to see if any exception is thrown + NexthopBlackhole.validateJsonElement(jsonElement); + actualAdapter = adapterNexthopBlackhole; + match++; + log.log( + Level.FINER, + "Input data matches schema 'NexthopBlackhole'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + java.util.Locale.ROOT, + "Deserialization for NexthopBlackhole failed with `%s`.", + e.getMessage())); + log.log( + Level.FINER, + "Input data does not match schema 'NexthopBlackhole'", + e); + } + + if (match == 1) { + AddVPCStaticRoutePayloadNexthop ret = + new AddVPCStaticRoutePayloadNexthop(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } + + throw new IOException( + String.format( + java.util.Locale.ROOT, + "Failed deserialization for AddVPCStaticRoutePayloadNexthop: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", + match, + errorMessages, + jsonElement.toString())); + } + }.nullSafe(); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap>(); + + public AddVPCStaticRoutePayloadNexthop() { + super("oneOf", Boolean.FALSE); + } + + public AddVPCStaticRoutePayloadNexthop(Object o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("NexthopIPv4", NexthopIPv4.class); + schemas.put("NexthopIPv6", NexthopIPv6.class); + schemas.put("NexthopInternet", NexthopInternet.class); + schemas.put("NexthopBlackhole", NexthopBlackhole.class); + } + + @Override + public Map> getSchemas() { + return AddVPCStaticRoutePayloadNexthop.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: NexthopBlackhole, NexthopIPv4, NexthopIPv6, NexthopInternet + * + *

It could be an instance of the 'oneOf' schemas. + */ + @Override + public void setActualInstance(Object instance) { + if (instance instanceof NexthopIPv4) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof NexthopIPv6) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof NexthopInternet) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof NexthopBlackhole) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException( + "Invalid instance type. Must be NexthopBlackhole, NexthopIPv4, NexthopIPv6, NexthopInternet"); + } + + /** + * Get the actual instance, which can be the following: NexthopBlackhole, NexthopIPv4, + * NexthopIPv6, NexthopInternet + * + * @return The actual instance (NexthopBlackhole, NexthopIPv4, NexthopIPv6, NexthopInternet) + */ + @SuppressWarnings("unchecked") + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `NexthopIPv4`. If the actual instance is not `NexthopIPv4`, the + * ClassCastException will be thrown. + * + * @return The actual instance of `NexthopIPv4` + * @throws ClassCastException if the instance is not `NexthopIPv4` + */ + public NexthopIPv4 getNexthopIPv4() throws ClassCastException { + return (NexthopIPv4) super.getActualInstance(); + } + + /** + * Get the actual instance of `NexthopIPv6`. If the actual instance is not `NexthopIPv6`, the + * ClassCastException will be thrown. + * + * @return The actual instance of `NexthopIPv6` + * @throws ClassCastException if the instance is not `NexthopIPv6` + */ + public NexthopIPv6 getNexthopIPv6() throws ClassCastException { + return (NexthopIPv6) super.getActualInstance(); + } + + /** + * Get the actual instance of `NexthopInternet`. If the actual instance is not + * `NexthopInternet`, the ClassCastException will be thrown. + * + * @return The actual instance of `NexthopInternet` + * @throws ClassCastException if the instance is not `NexthopInternet` + */ + public NexthopInternet getNexthopInternet() throws ClassCastException { + return (NexthopInternet) super.getActualInstance(); + } + + /** + * Get the actual instance of `NexthopBlackhole`. If the actual instance is not + * `NexthopBlackhole`, the ClassCastException will be thrown. + * + * @return The actual instance of `NexthopBlackhole` + * @throws ClassCastException if the instance is not `NexthopBlackhole` + */ + public NexthopBlackhole getNexthopBlackhole() throws ClassCastException { + return (NexthopBlackhole) super.getActualInstance(); + } + + /** + * 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 + * AddVPCStaticRoutePayloadNexthop + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + // validate oneOf schemas one by one + int validCount = 0; + ArrayList errorMessages = new ArrayList<>(); + // validate the json string with NexthopIPv4 + try { + NexthopIPv4.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format( + java.util.Locale.ROOT, + "Deserialization for NexthopIPv4 failed with `%s`.", + e.getMessage())); + // continue to the next one + } + // validate the json string with NexthopIPv6 + try { + NexthopIPv6.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format( + java.util.Locale.ROOT, + "Deserialization for NexthopIPv6 failed with `%s`.", + e.getMessage())); + // continue to the next one + } + // validate the json string with NexthopInternet + try { + NexthopInternet.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format( + java.util.Locale.ROOT, + "Deserialization for NexthopInternet failed with `%s`.", + e.getMessage())); + // continue to the next one + } + // validate the json string with NexthopBlackhole + try { + NexthopBlackhole.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format( + java.util.Locale.ROOT, + "Deserialization for NexthopBlackhole 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 AddVPCStaticRoutePayloadNexthop with oneOf schemas: NexthopBlackhole, NexthopIPv4, NexthopIPv6, NexthopInternet. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", + validCount, + errorMessages, + jsonElement.toString())); + } + } + + /** + * Create an instance of AddVPCStaticRoutePayloadNexthop given an JSON string + * + * @param jsonString JSON string + * @return An instance of AddVPCStaticRoutePayloadNexthop + * @throws IOException if the JSON string is invalid with respect to + * AddVPCStaticRoutePayloadNexthop + */ + public static AddVPCStaticRoutePayloadNexthop fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AddVPCStaticRoutePayloadNexthop.class); + } + + /** + * Convert an instance of AddVPCStaticRoutePayloadNexthop 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/v2alpha1api/model/CreateNetworkIPv4WithPrefix.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/CreateNetworkIPv4WithPrefix.java index 74bce28b..cdbb9f8b 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/CreateNetworkIPv4WithPrefix.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/CreateNetworkIPv4WithPrefix.java @@ -30,6 +30,7 @@ import java.util.List; import java.util.Map; import java.util.Objects; +import java.util.UUID; import org.openapitools.jackson.nullable.JsonNullable; /** The create request for an IPv4 network with a specified prefix. */ @@ -53,6 +54,11 @@ public class CreateNetworkIPv4WithPrefix { @javax.annotation.Nonnull private String prefix; + public static final String SERIALIZED_NAME_VPC_NETWORK_RANGE_ID = "vpcNetworkRangeId"; + + @SerializedName(SERIALIZED_NAME_VPC_NETWORK_RANGE_ID) + @javax.annotation.Nullable private UUID vpcNetworkRangeId; + public CreateNetworkIPv4WithPrefix() {} public CreateNetworkIPv4WithPrefix gateway(@javax.annotation.Nullable String gateway) { @@ -120,6 +126,25 @@ public void setPrefix(@javax.annotation.Nonnull String prefix) { this.prefix = prefix; } + public CreateNetworkIPv4WithPrefix vpcNetworkRangeId( + @javax.annotation.Nullable UUID vpcNetworkRangeId) { + this.vpcNetworkRangeId = vpcNetworkRangeId; + return this; + } + + /** + * Universally Unique Identifier (UUID). + * + * @return vpcNetworkRangeId + */ + @javax.annotation.Nullable public UUID getVpcNetworkRangeId() { + return vpcNetworkRangeId; + } + + public void setVpcNetworkRangeId(@javax.annotation.Nullable UUID vpcNetworkRangeId) { + this.vpcNetworkRangeId = vpcNetworkRangeId; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -176,6 +201,8 @@ public boolean equals(Object o) { return Objects.equals(this.gateway, createNetworkIPv4WithPrefix.gateway) && Objects.equals(this.nameservers, createNetworkIPv4WithPrefix.nameservers) && Objects.equals(this.prefix, createNetworkIPv4WithPrefix.prefix) + && Objects.equals( + this.vpcNetworkRangeId, createNetworkIPv4WithPrefix.vpcNetworkRangeId) && Objects.equals( this.additionalProperties, createNetworkIPv4WithPrefix.additionalProperties); @@ -192,7 +219,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(gateway, nameservers, prefix, additionalProperties); + return Objects.hash(gateway, nameservers, prefix, vpcNetworkRangeId, additionalProperties); } private static int hashCodeNullable(JsonNullable a) { @@ -209,6 +236,9 @@ public String toString() { sb.append(" gateway: ").append(toIndentedString(gateway)).append("\n"); sb.append(" nameservers: ").append(toIndentedString(nameservers)).append("\n"); sb.append(" prefix: ").append(toIndentedString(prefix)).append("\n"); + sb.append(" vpcNetworkRangeId: ") + .append(toIndentedString(vpcNetworkRangeId)) + .append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); @@ -232,7 +262,9 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("gateway", "nameservers", "prefix")); + openapiFields = + new HashSet( + Arrays.asList("gateway", "nameservers", "prefix", "vpcNetworkRangeId")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("prefix")); @@ -294,6 +326,15 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti "Expected the field `prefix` to be a primitive type in the JSON string but got `%s`", jsonObj.get("prefix").toString())); } + if ((jsonObj.get("vpcNetworkRangeId") != null + && !jsonObj.get("vpcNetworkRangeId").isJsonNull()) + && !jsonObj.get("vpcNetworkRangeId").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `vpcNetworkRangeId` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("vpcNetworkRangeId").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/CreateNetworkIPv4WithPrefixLength.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/CreateNetworkIPv4WithPrefixLength.java index e96668af..7f64f30a 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/CreateNetworkIPv4WithPrefixLength.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/CreateNetworkIPv4WithPrefixLength.java @@ -30,6 +30,7 @@ import java.util.List; import java.util.Map; import java.util.Objects; +import java.util.UUID; /** The create request for an IPv4 network with a wanted prefix length. */ @javax.annotation.Generated( @@ -47,6 +48,11 @@ public class CreateNetworkIPv4WithPrefixLength { @javax.annotation.Nonnull private Long prefixLength; + public static final String SERIALIZED_NAME_VPC_NETWORK_RANGE_ID = "vpcNetworkRangeId"; + + @SerializedName(SERIALIZED_NAME_VPC_NETWORK_RANGE_ID) + @javax.annotation.Nullable private UUID vpcNetworkRangeId; + public CreateNetworkIPv4WithPrefixLength() {} public CreateNetworkIPv4WithPrefixLength nameservers( @@ -96,6 +102,25 @@ public void setPrefixLength(@javax.annotation.Nonnull Long prefixLength) { this.prefixLength = prefixLength; } + public CreateNetworkIPv4WithPrefixLength vpcNetworkRangeId( + @javax.annotation.Nullable UUID vpcNetworkRangeId) { + this.vpcNetworkRangeId = vpcNetworkRangeId; + return this; + } + + /** + * Universally Unique Identifier (UUID). + * + * @return vpcNetworkRangeId + */ + @javax.annotation.Nullable public UUID getVpcNetworkRangeId() { + return vpcNetworkRangeId; + } + + public void setVpcNetworkRangeId(@javax.annotation.Nullable UUID vpcNetworkRangeId) { + this.vpcNetworkRangeId = vpcNetworkRangeId; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -152,6 +177,8 @@ public boolean equals(Object o) { (CreateNetworkIPv4WithPrefixLength) o; return Objects.equals(this.nameservers, createNetworkIPv4WithPrefixLength.nameservers) && Objects.equals(this.prefixLength, createNetworkIPv4WithPrefixLength.prefixLength) + && Objects.equals( + this.vpcNetworkRangeId, createNetworkIPv4WithPrefixLength.vpcNetworkRangeId) && Objects.equals( this.additionalProperties, createNetworkIPv4WithPrefixLength.additionalProperties); @@ -159,7 +186,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(nameservers, prefixLength, additionalProperties); + return Objects.hash(nameservers, prefixLength, vpcNetworkRangeId, additionalProperties); } @Override @@ -168,6 +195,9 @@ public String toString() { sb.append("class CreateNetworkIPv4WithPrefixLength {\n"); sb.append(" nameservers: ").append(toIndentedString(nameservers)).append("\n"); sb.append(" prefixLength: ").append(toIndentedString(prefixLength)).append("\n"); + sb.append(" vpcNetworkRangeId: ") + .append(toIndentedString(vpcNetworkRangeId)) + .append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); @@ -191,7 +221,9 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("nameservers", "prefixLength")); + openapiFields = + new HashSet( + Arrays.asList("nameservers", "prefixLength", "vpcNetworkRangeId")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("prefixLength")); @@ -239,6 +271,15 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti "Expected the field `nameservers` to be an array in the JSON string but got `%s`", jsonObj.get("nameservers").toString())); } + if ((jsonObj.get("vpcNetworkRangeId") != null + && !jsonObj.get("vpcNetworkRangeId").isJsonNull()) + && !jsonObj.get("vpcNetworkRangeId").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `vpcNetworkRangeId` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("vpcNetworkRangeId").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/CreateNetworkIPv6WithPrefix.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/CreateNetworkIPv6WithPrefix.java index da05964f..70df705d 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/CreateNetworkIPv6WithPrefix.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/CreateNetworkIPv6WithPrefix.java @@ -30,6 +30,7 @@ import java.util.List; import java.util.Map; import java.util.Objects; +import java.util.UUID; import org.openapitools.jackson.nullable.JsonNullable; /** The create request for an IPv6 network with a specified prefix. */ @@ -53,6 +54,11 @@ public class CreateNetworkIPv6WithPrefix { @javax.annotation.Nonnull private String prefix; + public static final String SERIALIZED_NAME_VPC_NETWORK_RANGE_ID = "vpcNetworkRangeId"; + + @SerializedName(SERIALIZED_NAME_VPC_NETWORK_RANGE_ID) + @javax.annotation.Nullable private UUID vpcNetworkRangeId; + public CreateNetworkIPv6WithPrefix() {} public CreateNetworkIPv6WithPrefix gateway(@javax.annotation.Nullable String gateway) { @@ -120,6 +126,25 @@ public void setPrefix(@javax.annotation.Nonnull String prefix) { this.prefix = prefix; } + public CreateNetworkIPv6WithPrefix vpcNetworkRangeId( + @javax.annotation.Nullable UUID vpcNetworkRangeId) { + this.vpcNetworkRangeId = vpcNetworkRangeId; + return this; + } + + /** + * Universally Unique Identifier (UUID). + * + * @return vpcNetworkRangeId + */ + @javax.annotation.Nullable public UUID getVpcNetworkRangeId() { + return vpcNetworkRangeId; + } + + public void setVpcNetworkRangeId(@javax.annotation.Nullable UUID vpcNetworkRangeId) { + this.vpcNetworkRangeId = vpcNetworkRangeId; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -176,6 +201,8 @@ public boolean equals(Object o) { return Objects.equals(this.gateway, createNetworkIPv6WithPrefix.gateway) && Objects.equals(this.nameservers, createNetworkIPv6WithPrefix.nameservers) && Objects.equals(this.prefix, createNetworkIPv6WithPrefix.prefix) + && Objects.equals( + this.vpcNetworkRangeId, createNetworkIPv6WithPrefix.vpcNetworkRangeId) && Objects.equals( this.additionalProperties, createNetworkIPv6WithPrefix.additionalProperties); @@ -192,7 +219,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(gateway, nameservers, prefix, additionalProperties); + return Objects.hash(gateway, nameservers, prefix, vpcNetworkRangeId, additionalProperties); } private static int hashCodeNullable(JsonNullable a) { @@ -209,6 +236,9 @@ public String toString() { sb.append(" gateway: ").append(toIndentedString(gateway)).append("\n"); sb.append(" nameservers: ").append(toIndentedString(nameservers)).append("\n"); sb.append(" prefix: ").append(toIndentedString(prefix)).append("\n"); + sb.append(" vpcNetworkRangeId: ") + .append(toIndentedString(vpcNetworkRangeId)) + .append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); @@ -232,7 +262,9 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("gateway", "nameservers", "prefix")); + openapiFields = + new HashSet( + Arrays.asList("gateway", "nameservers", "prefix", "vpcNetworkRangeId")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("prefix")); @@ -294,6 +326,15 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti "Expected the field `prefix` to be a primitive type in the JSON string but got `%s`", jsonObj.get("prefix").toString())); } + if ((jsonObj.get("vpcNetworkRangeId") != null + && !jsonObj.get("vpcNetworkRangeId").isJsonNull()) + && !jsonObj.get("vpcNetworkRangeId").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `vpcNetworkRangeId` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("vpcNetworkRangeId").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/CreateNetworkIPv6WithPrefixLength.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/CreateNetworkIPv6WithPrefixLength.java index 8374607f..8515602c 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/CreateNetworkIPv6WithPrefixLength.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/CreateNetworkIPv6WithPrefixLength.java @@ -30,6 +30,7 @@ import java.util.List; import java.util.Map; import java.util.Objects; +import java.util.UUID; /** The create request for an IPv6 network with a wanted prefix length. */ @javax.annotation.Generated( @@ -47,6 +48,11 @@ public class CreateNetworkIPv6WithPrefixLength { @javax.annotation.Nonnull private Long prefixLength; + public static final String SERIALIZED_NAME_VPC_NETWORK_RANGE_ID = "vpcNetworkRangeId"; + + @SerializedName(SERIALIZED_NAME_VPC_NETWORK_RANGE_ID) + @javax.annotation.Nullable private UUID vpcNetworkRangeId; + public CreateNetworkIPv6WithPrefixLength() {} public CreateNetworkIPv6WithPrefixLength nameservers( @@ -96,6 +102,25 @@ public void setPrefixLength(@javax.annotation.Nonnull Long prefixLength) { this.prefixLength = prefixLength; } + public CreateNetworkIPv6WithPrefixLength vpcNetworkRangeId( + @javax.annotation.Nullable UUID vpcNetworkRangeId) { + this.vpcNetworkRangeId = vpcNetworkRangeId; + return this; + } + + /** + * Universally Unique Identifier (UUID). + * + * @return vpcNetworkRangeId + */ + @javax.annotation.Nullable public UUID getVpcNetworkRangeId() { + return vpcNetworkRangeId; + } + + public void setVpcNetworkRangeId(@javax.annotation.Nullable UUID vpcNetworkRangeId) { + this.vpcNetworkRangeId = vpcNetworkRangeId; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -152,6 +177,8 @@ public boolean equals(Object o) { (CreateNetworkIPv6WithPrefixLength) o; return Objects.equals(this.nameservers, createNetworkIPv6WithPrefixLength.nameservers) && Objects.equals(this.prefixLength, createNetworkIPv6WithPrefixLength.prefixLength) + && Objects.equals( + this.vpcNetworkRangeId, createNetworkIPv6WithPrefixLength.vpcNetworkRangeId) && Objects.equals( this.additionalProperties, createNetworkIPv6WithPrefixLength.additionalProperties); @@ -159,7 +186,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(nameservers, prefixLength, additionalProperties); + return Objects.hash(nameservers, prefixLength, vpcNetworkRangeId, additionalProperties); } @Override @@ -168,6 +195,9 @@ public String toString() { sb.append("class CreateNetworkIPv6WithPrefixLength {\n"); sb.append(" nameservers: ").append(toIndentedString(nameservers)).append("\n"); sb.append(" prefixLength: ").append(toIndentedString(prefixLength)).append("\n"); + sb.append(" vpcNetworkRangeId: ") + .append(toIndentedString(vpcNetworkRangeId)) + .append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); @@ -191,7 +221,9 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("nameservers", "prefixLength")); + openapiFields = + new HashSet( + Arrays.asList("nameservers", "prefixLength", "vpcNetworkRangeId")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("prefixLength")); @@ -239,6 +271,15 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti "Expected the field `nameservers` to be an array in the JSON string but got `%s`", jsonObj.get("nameservers").toString())); } + if ((jsonObj.get("vpcNetworkRangeId") != null + && !jsonObj.get("vpcNetworkRangeId").isJsonNull()) + && !jsonObj.get("vpcNetworkRangeId").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `vpcNetworkRangeId` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("vpcNetworkRangeId").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/CreateNetworkPayload.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/CreateNetworkPayload.java index 7a949ab5..2c95e338 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/CreateNetworkPayload.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/CreateNetworkPayload.java @@ -72,6 +72,11 @@ public class CreateNetworkPayload { @SerializedName(SERIALIZED_NAME_ROUTING_TABLE_ID) @javax.annotation.Nullable private UUID routingTableId; + public static final String SERIALIZED_NAME_VPC_ID = "vpcId"; + + @SerializedName(SERIALIZED_NAME_VPC_ID) + @javax.annotation.Nullable private UUID vpcId; + public CreateNetworkPayload() {} public CreateNetworkPayload dhcp(@javax.annotation.Nullable Boolean dhcp) { @@ -205,6 +210,24 @@ public void setRoutingTableId(@javax.annotation.Nullable UUID routingTableId) { this.routingTableId = routingTableId; } + public CreateNetworkPayload vpcId(@javax.annotation.Nullable UUID vpcId) { + this.vpcId = vpcId; + return this; + } + + /** + * The identifier (ID) of a STACKIT VPC. + * + * @return vpcId + */ + @javax.annotation.Nullable public UUID getVpcId() { + return vpcId; + } + + public void setVpcId(@javax.annotation.Nullable UUID vpcId) { + this.vpcId = vpcId; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -265,6 +288,7 @@ public boolean equals(Object o) { && Objects.equals(this.name, createNetworkPayload.name) && Objects.equals(this.routed, createNetworkPayload.routed) && Objects.equals(this.routingTableId, createNetworkPayload.routingTableId) + && Objects.equals(this.vpcId, createNetworkPayload.vpcId) && Objects.equals( this.additionalProperties, createNetworkPayload.additionalProperties); } @@ -272,7 +296,15 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( - dhcp, ipv4, ipv6, labels, name, routed, routingTableId, additionalProperties); + dhcp, + ipv4, + ipv6, + labels, + name, + routed, + routingTableId, + vpcId, + additionalProperties); } @Override @@ -286,6 +318,7 @@ public String toString() { sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" routed: ").append(toIndentedString(routed)).append("\n"); sb.append(" routingTableId: ").append(toIndentedString(routingTableId)).append("\n"); + sb.append(" vpcId: ").append(toIndentedString(vpcId)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); @@ -318,7 +351,8 @@ private String toIndentedString(Object o) { "labels", "name", "routed", - "routingTableId")); + "routingTableId", + "vpcId")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("name")); @@ -377,6 +411,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti "Expected the field `routingTableId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("routingTableId").toString())); } + if ((jsonObj.get("vpcId") != null && !jsonObj.get("vpcId").isJsonNull()) + && !jsonObj.get("vpcId").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `vpcId` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("vpcId").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/CreateVPCPayload.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/CreateVPCPayload.java new file mode 100644 index 00000000..c4a73edd --- /dev/null +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/CreateVPCPayload.java @@ -0,0 +1,369 @@ +/* + * STACKIT IaaS API + * This API allows you to create and modify IaaS resources. + * + * The version of the OpenAPI document: 2alpha1 + * 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.v2alpha1api.model; + +import cloud.stackit.sdk.iaas.v2alpha1api.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.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; + +/** Object that represents a create VPC request. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.19.0") +public class CreateVPCPayload { + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable private String description; + + public static final String SERIALIZED_NAME_LABELS = "labels"; + + @SerializedName(SERIALIZED_NAME_LABELS) + @javax.annotation.Nullable private Object labels; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public CreateVPCPayload() {} + + public CreateVPCPayload 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 CreateVPCPayload labels(@javax.annotation.Nullable Object labels) { + this.labels = labels; + return this; + } + + /** + * 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. + * + * @return labels + */ + @javax.annotation.Nullable public Object getLabels() { + return labels; + } + + public void setLabels(@javax.annotation.Nullable Object labels) { + this.labels = labels; + } + + public CreateVPCPayload name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * The name for a General Object. Matches Names and also UUIDs. + * + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + /** + * 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 CreateVPCPayload instance itself + */ + public CreateVPCPayload 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; + } + CreateVPCPayload createVPCPayload = (CreateVPCPayload) o; + return Objects.equals(this.description, createVPCPayload.description) + && Objects.equals(this.labels, createVPCPayload.labels) + && Objects.equals(this.name, createVPCPayload.name) + && Objects.equals(this.additionalProperties, createVPCPayload.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(description, labels, name, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateVPCPayload {\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" labels: ").append(toIndentedString(labels)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).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("description", "labels", "name")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("name")); + } + + /** + * 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 CreateVPCPayload + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateVPCPayload.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 CreateVPCPayload is not found in the empty JSON string", + CreateVPCPayload.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : CreateVPCPayload.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("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( + java.util.Locale.ROOT, + "Expected the field `name` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateVPCPayload.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateVPCPayload' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(CreateVPCPayload.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateVPCPayload 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 CreateVPCPayload read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CreateVPCPayload 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 CreateVPCPayload given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateVPCPayload + * @throws IOException if the JSON string is invalid with respect to CreateVPCPayload + */ + public static CreateVPCPayload fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateVPCPayload.class); + } + + /** + * Convert an instance of CreateVPCPayload 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/v2alpha1api/model/CreateVPCRegionPayload.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/CreateVPCRegionPayload.java new file mode 100644 index 00000000..b65efe4c --- /dev/null +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/CreateVPCRegionPayload.java @@ -0,0 +1,322 @@ +/* + * STACKIT IaaS API + * This API allows you to create and modify IaaS resources. + * + * The version of the OpenAPI document: 2alpha1 + * 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.v2alpha1api.model; + +import cloud.stackit.sdk.iaas.v2alpha1api.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.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; + +/** The basic properties of a regional VPC. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.19.0") +public class CreateVPCRegionPayload { + public static final String SERIALIZED_NAME_IPV4 = "ipv4"; + + @SerializedName(SERIALIZED_NAME_IPV4) + @javax.annotation.Nullable private RegionalVPCIPv4 ipv4; + + public static final String SERIALIZED_NAME_STATUS = "status"; + + @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nullable private String status; + + public CreateVPCRegionPayload() {} + + public CreateVPCRegionPayload(String status) { + this(); + this.status = status; + } + + public CreateVPCRegionPayload ipv4(@javax.annotation.Nullable RegionalVPCIPv4 ipv4) { + this.ipv4 = ipv4; + return this; + } + + /** + * Get ipv4 + * + * @return ipv4 + */ + @javax.annotation.Nullable public RegionalVPCIPv4 getIpv4() { + return ipv4; + } + + public void setIpv4(@javax.annotation.Nullable RegionalVPCIPv4 ipv4) { + this.ipv4 = ipv4; + } + + /** + * The state of a resource object. Possible values: `CREATING`, `CREATED`, + * `DELETING`, `DELETED`, `FAILED`, `UPDATED`, + * `UPDATING`. + * + * @return status + */ + @javax.annotation.Nullable public String getStatus() { + return status; + } + + /** + * 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 CreateVPCRegionPayload instance itself + */ + public CreateVPCRegionPayload 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; + } + CreateVPCRegionPayload createVPCRegionPayload = (CreateVPCRegionPayload) o; + return Objects.equals(this.ipv4, createVPCRegionPayload.ipv4) + && Objects.equals(this.status, createVPCRegionPayload.status) + && Objects.equals( + this.additionalProperties, createVPCRegionPayload.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(ipv4, status, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateVPCRegionPayload {\n"); + sb.append(" ipv4: ").append(toIndentedString(ipv4)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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("ipv4", "status")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * 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 CreateVPCRegionPayload + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!CreateVPCRegionPayload.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 CreateVPCRegionPayload is not found in the empty JSON string", + CreateVPCRegionPayload.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `ipv4` + if (jsonObj.get("ipv4") != null && !jsonObj.get("ipv4").isJsonNull()) { + RegionalVPCIPv4.validateJsonElement(jsonObj.get("ipv4")); + } + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) + && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `status` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("status").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!CreateVPCRegionPayload.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'CreateVPCRegionPayload' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(CreateVPCRegionPayload.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, CreateVPCRegionPayload 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 CreateVPCRegionPayload read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + CreateVPCRegionPayload 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 CreateVPCRegionPayload given an JSON string + * + * @param jsonString JSON string + * @return An instance of CreateVPCRegionPayload + * @throws IOException if the JSON string is invalid with respect to CreateVPCRegionPayload + */ + public static CreateVPCRegionPayload fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, CreateVPCRegionPayload.class); + } + + /** + * Convert an instance of CreateVPCRegionPayload 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/v2alpha1api/model/Network.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/Network.java index 506d55d6..7bb229db 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/Network.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/Network.java @@ -98,6 +98,11 @@ public class Network { @SerializedName(SERIALIZED_NAME_UPDATED_AT) @javax.annotation.Nullable private OffsetDateTime updatedAt; + public static final String SERIALIZED_NAME_VPC_ID = "vpcId"; + + @SerializedName(SERIALIZED_NAME_VPC_ID) + @javax.annotation.Nullable private UUID vpcId; + public Network() {} public Network(OffsetDateTime createdAt, OffsetDateTime updatedAt) { @@ -295,6 +300,24 @@ public void setStatus(@javax.annotation.Nonnull String status) { return updatedAt; } + public Network vpcId(@javax.annotation.Nullable UUID vpcId) { + this.vpcId = vpcId; + return this; + } + + /** + * The identifier (ID) of a STACKIT VPC. + * + * @return vpcId + */ + @javax.annotation.Nullable public UUID getVpcId() { + return vpcId; + } + + public void setVpcId(@javax.annotation.Nullable UUID vpcId) { + this.vpcId = vpcId; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -359,6 +382,7 @@ public boolean equals(Object o) { && Objects.equals(this.routingTableId, network.routingTableId) && Objects.equals(this.status, network.status) && Objects.equals(this.updatedAt, network.updatedAt) + && Objects.equals(this.vpcId, network.vpcId) && Objects.equals(this.additionalProperties, network.additionalProperties); } @@ -376,6 +400,7 @@ public int hashCode() { routingTableId, status, updatedAt, + vpcId, additionalProperties); } @@ -394,6 +419,7 @@ public String toString() { sb.append(" routingTableId: ").append(toIndentedString(routingTableId)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" vpcId: ").append(toIndentedString(vpcId)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); @@ -430,7 +456,8 @@ private String toIndentedString(Object o) { "routed", "routingTableId", "status", - "updatedAt")); + "updatedAt", + "vpcId")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("id", "name", "status")); @@ -503,6 +530,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti "Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); } + if ((jsonObj.get("vpcId") != null && !jsonObj.get("vpcId").isJsonNull()) + && !jsonObj.get("vpcId").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `vpcId` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("vpcId").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/NetworkIPv4.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/NetworkIPv4.java index c214e2ee..2556d04b 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/NetworkIPv4.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/NetworkIPv4.java @@ -30,6 +30,7 @@ import java.util.List; import java.util.Map; import java.util.Objects; +import java.util.UUID; import org.openapitools.jackson.nullable.JsonNullable; /** Object that represents the IPv4 part of a network. */ @@ -58,6 +59,11 @@ public class NetworkIPv4 { @SerializedName(SERIALIZED_NAME_PUBLIC_IP) @javax.annotation.Nullable private String publicIp; + public static final String SERIALIZED_NAME_VPC_NETWORK_RANGE_ID = "vpcNetworkRangeId"; + + @SerializedName(SERIALIZED_NAME_VPC_NETWORK_RANGE_ID) + @javax.annotation.Nullable private UUID vpcNetworkRangeId; + public NetworkIPv4() {} public NetworkIPv4(String publicIp) { @@ -146,6 +152,24 @@ public void setPrefixes(@javax.annotation.Nonnull List prefixes) { return publicIp; } + public NetworkIPv4 vpcNetworkRangeId(@javax.annotation.Nullable UUID vpcNetworkRangeId) { + this.vpcNetworkRangeId = vpcNetworkRangeId; + return this; + } + + /** + * Universally Unique Identifier (UUID). + * + * @return vpcNetworkRangeId + */ + @javax.annotation.Nullable public UUID getVpcNetworkRangeId() { + return vpcNetworkRangeId; + } + + public void setVpcNetworkRangeId(@javax.annotation.Nullable UUID vpcNetworkRangeId) { + this.vpcNetworkRangeId = vpcNetworkRangeId; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -203,6 +227,7 @@ public boolean equals(Object o) { && Objects.equals(this.nameservers, networkIPv4.nameservers) && Objects.equals(this.prefixes, networkIPv4.prefixes) && Objects.equals(this.publicIp, networkIPv4.publicIp) + && Objects.equals(this.vpcNetworkRangeId, networkIPv4.vpcNetworkRangeId) && Objects.equals(this.additionalProperties, networkIPv4.additionalProperties); } @@ -217,7 +242,8 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(gateway, nameservers, prefixes, publicIp, additionalProperties); + return Objects.hash( + gateway, nameservers, prefixes, publicIp, vpcNetworkRangeId, additionalProperties); } private static int hashCodeNullable(JsonNullable a) { @@ -235,6 +261,9 @@ public String toString() { sb.append(" nameservers: ").append(toIndentedString(nameservers)).append("\n"); sb.append(" prefixes: ").append(toIndentedString(prefixes)).append("\n"); sb.append(" publicIp: ").append(toIndentedString(publicIp)).append("\n"); + sb.append(" vpcNetworkRangeId: ") + .append(toIndentedString(vpcNetworkRangeId)) + .append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); @@ -260,7 +289,12 @@ private String toIndentedString(Object o) { // a set of all properties/fields (JSON key names) openapiFields = new HashSet( - Arrays.asList("gateway", "nameservers", "prefixes", "publicIp")); + Arrays.asList( + "gateway", + "nameservers", + "prefixes", + "publicIp", + "vpcNetworkRangeId")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("prefixes")); @@ -333,6 +367,15 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti "Expected the field `publicIp` to be a primitive type in the JSON string but got `%s`", jsonObj.get("publicIp").toString())); } + if ((jsonObj.get("vpcNetworkRangeId") != null + && !jsonObj.get("vpcNetworkRangeId").isJsonNull()) + && !jsonObj.get("vpcNetworkRangeId").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `vpcNetworkRangeId` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("vpcNetworkRangeId").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/NetworkIPv6.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/NetworkIPv6.java index 3cb22991..2adef9e5 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/NetworkIPv6.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/NetworkIPv6.java @@ -30,6 +30,7 @@ import java.util.List; import java.util.Map; import java.util.Objects; +import java.util.UUID; import org.openapitools.jackson.nullable.JsonNullable; /** Object that represents the IPv6 part of a network. */ @@ -53,6 +54,11 @@ public class NetworkIPv6 { @javax.annotation.Nonnull private List prefixes = new ArrayList<>(); + public static final String SERIALIZED_NAME_VPC_NETWORK_RANGE_ID = "vpcNetworkRangeId"; + + @SerializedName(SERIALIZED_NAME_VPC_NETWORK_RANGE_ID) + @javax.annotation.Nullable private UUID vpcNetworkRangeId; + public NetworkIPv6() {} public NetworkIPv6 gateway(@javax.annotation.Nullable String gateway) { @@ -127,6 +133,24 @@ public void setPrefixes(@javax.annotation.Nonnull List prefixes) { this.prefixes = prefixes; } + public NetworkIPv6 vpcNetworkRangeId(@javax.annotation.Nullable UUID vpcNetworkRangeId) { + this.vpcNetworkRangeId = vpcNetworkRangeId; + return this; + } + + /** + * Universally Unique Identifier (UUID). + * + * @return vpcNetworkRangeId + */ + @javax.annotation.Nullable public UUID getVpcNetworkRangeId() { + return vpcNetworkRangeId; + } + + public void setVpcNetworkRangeId(@javax.annotation.Nullable UUID vpcNetworkRangeId) { + this.vpcNetworkRangeId = vpcNetworkRangeId; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -183,6 +207,7 @@ public boolean equals(Object o) { return Objects.equals(this.gateway, networkIPv6.gateway) && Objects.equals(this.nameservers, networkIPv6.nameservers) && Objects.equals(this.prefixes, networkIPv6.prefixes) + && Objects.equals(this.vpcNetworkRangeId, networkIPv6.vpcNetworkRangeId) && Objects.equals(this.additionalProperties, networkIPv6.additionalProperties); } @@ -197,7 +222,8 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(gateway, nameservers, prefixes, additionalProperties); + return Objects.hash( + gateway, nameservers, prefixes, vpcNetworkRangeId, additionalProperties); } private static int hashCodeNullable(JsonNullable a) { @@ -214,6 +240,9 @@ public String toString() { sb.append(" gateway: ").append(toIndentedString(gateway)).append("\n"); sb.append(" nameservers: ").append(toIndentedString(nameservers)).append("\n"); sb.append(" prefixes: ").append(toIndentedString(prefixes)).append("\n"); + sb.append(" vpcNetworkRangeId: ") + .append(toIndentedString(vpcNetworkRangeId)) + .append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); @@ -237,7 +266,9 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("gateway", "nameservers", "prefixes")); + openapiFields = + new HashSet( + Arrays.asList("gateway", "nameservers", "prefixes", "vpcNetworkRangeId")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("prefixes")); @@ -302,6 +333,15 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti "Expected the field `prefixes` to be an array in the JSON string but got `%s`", jsonObj.get("prefixes").toString())); } + if ((jsonObj.get("vpcNetworkRangeId") != null + && !jsonObj.get("vpcNetworkRangeId").isJsonNull()) + && !jsonObj.get("vpcNetworkRangeId").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `vpcNetworkRangeId` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("vpcNetworkRangeId").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/NetworkRangeIPv4Request.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/NetworkRangeIPv4Request.java new file mode 100644 index 00000000..e0f1fba3 --- /dev/null +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/NetworkRangeIPv4Request.java @@ -0,0 +1,603 @@ +/* + * STACKIT IaaS API + * This API allows you to create and modify IaaS resources. + * + * The version of the OpenAPI document: 2alpha1 + * 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.v2alpha1api.model; + +import cloud.stackit.sdk.iaas.v2alpha1api.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.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * Contains the IPv4 properties of a VPC network range request. Filterable Fields: + * `defaultPrefixLen`, `maxPrefixLen`, `minPrefixLen`, + * `nameservers`, `prefix`. + */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.19.0") +public class NetworkRangeIPv4Request { + public static final String SERIALIZED_NAME_DEFAULT_PREFIX_LEN = "defaultPrefixLen"; + + @SerializedName(SERIALIZED_NAME_DEFAULT_PREFIX_LEN) + @javax.annotation.Nullable private Long defaultPrefixLen = 25l; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable private String description; + + /** Gets or Sets ipVersion */ + @JsonAdapter(IpVersionEnum.Adapter.class) + public enum IpVersionEnum { + IPV4("ipv4"), + + UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api"); + + private String value; + + IpVersionEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static IpVersionEnum fromValue(String value) { + for (IpVersionEnum b : IpVersionEnum.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 IpVersionEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public IpVersionEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return IpVersionEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + IpVersionEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_IP_VERSION = "ipVersion"; + + @SerializedName(SERIALIZED_NAME_IP_VERSION) + @javax.annotation.Nonnull + private IpVersionEnum ipVersion; + + public static final String SERIALIZED_NAME_LABELS = "labels"; + + @SerializedName(SERIALIZED_NAME_LABELS) + @javax.annotation.Nullable private Object labels; + + public static final String SERIALIZED_NAME_MAX_PREFIX_LEN = "maxPrefixLen"; + + @SerializedName(SERIALIZED_NAME_MAX_PREFIX_LEN) + @javax.annotation.Nullable private Long maxPrefixLen = 29l; + + public static final String SERIALIZED_NAME_MIN_PREFIX_LEN = "minPrefixLen"; + + @SerializedName(SERIALIZED_NAME_MIN_PREFIX_LEN) + @javax.annotation.Nullable private Long minPrefixLen = 24l; + + public static final String SERIALIZED_NAME_NAMESERVERS = "nameservers"; + + @SerializedName(SERIALIZED_NAME_NAMESERVERS) + @javax.annotation.Nullable private List nameservers; + + public static final String SERIALIZED_NAME_PREFIX = "prefix"; + + @SerializedName(SERIALIZED_NAME_PREFIX) + @javax.annotation.Nonnull + private String prefix; + + public NetworkRangeIPv4Request() {} + + public NetworkRangeIPv4Request defaultPrefixLen( + @javax.annotation.Nullable Long defaultPrefixLen) { + this.defaultPrefixLen = defaultPrefixLen; + return this; + } + + /** + * The default prefix length for network ranges in the VPC. minimum: 24 maximum: 29 + * + * @return defaultPrefixLen + */ + @javax.annotation.Nullable public Long getDefaultPrefixLen() { + return defaultPrefixLen; + } + + public void setDefaultPrefixLen(@javax.annotation.Nullable Long defaultPrefixLen) { + this.defaultPrefixLen = defaultPrefixLen; + } + + public NetworkRangeIPv4Request 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 NetworkRangeIPv4Request ipVersion(@javax.annotation.Nonnull IpVersionEnum ipVersion) { + this.ipVersion = ipVersion; + return this; + } + + /** + * Get ipVersion + * + * @return ipVersion + */ + @javax.annotation.Nonnull + public IpVersionEnum getIpVersion() { + return ipVersion; + } + + public void setIpVersion(@javax.annotation.Nonnull IpVersionEnum ipVersion) { + this.ipVersion = ipVersion; + } + + public NetworkRangeIPv4Request labels(@javax.annotation.Nullable Object labels) { + this.labels = labels; + return this; + } + + /** + * 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. + * + * @return labels + */ + @javax.annotation.Nullable public Object getLabels() { + return labels; + } + + public void setLabels(@javax.annotation.Nullable Object labels) { + this.labels = labels; + } + + public NetworkRangeIPv4Request maxPrefixLen(@javax.annotation.Nullable Long maxPrefixLen) { + this.maxPrefixLen = maxPrefixLen; + return this; + } + + /** + * The maximal prefix length for network ranges in the VPC. minimum: 24 maximum: 29 + * + * @return maxPrefixLen + */ + @javax.annotation.Nullable public Long getMaxPrefixLen() { + return maxPrefixLen; + } + + public void setMaxPrefixLen(@javax.annotation.Nullable Long maxPrefixLen) { + this.maxPrefixLen = maxPrefixLen; + } + + public NetworkRangeIPv4Request minPrefixLen(@javax.annotation.Nullable Long minPrefixLen) { + this.minPrefixLen = minPrefixLen; + return this; + } + + /** + * The minimal prefix length for network ranges in the VPC. minimum: 8 maximum: 29 + * + * @return minPrefixLen + */ + @javax.annotation.Nullable public Long getMinPrefixLen() { + return minPrefixLen; + } + + public void setMinPrefixLen(@javax.annotation.Nullable Long minPrefixLen) { + this.minPrefixLen = minPrefixLen; + } + + public NetworkRangeIPv4Request nameservers( + @javax.annotation.Nullable List nameservers) { + this.nameservers = nameservers; + return this; + } + + public NetworkRangeIPv4Request addNameserversItem(String nameserversItem) { + if (this.nameservers == null) { + this.nameservers = new ArrayList<>(); + } + this.nameservers.add(nameserversItem); + return this; + } + + /** + * A list containing DNS Servers/Nameservers for IPv4. + * + * @return nameservers + */ + @javax.annotation.Nullable public List getNameservers() { + return nameservers; + } + + public void setNameservers(@javax.annotation.Nullable List nameservers) { + this.nameservers = nameservers; + } + + public NetworkRangeIPv4Request prefix(@javax.annotation.Nonnull String prefix) { + this.prefix = prefix; + return this; + } + + /** + * Classless Inter-Domain Routing (CIDR). + * + * @return prefix + */ + @javax.annotation.Nonnull + public String getPrefix() { + return prefix; + } + + public void setPrefix(@javax.annotation.Nonnull String prefix) { + this.prefix = prefix; + } + + /** + * 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 NetworkRangeIPv4Request instance itself + */ + public NetworkRangeIPv4Request 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; + } + NetworkRangeIPv4Request networkRangeIPv4Request = (NetworkRangeIPv4Request) o; + return Objects.equals(this.defaultPrefixLen, networkRangeIPv4Request.defaultPrefixLen) + && Objects.equals(this.description, networkRangeIPv4Request.description) + && Objects.equals(this.ipVersion, networkRangeIPv4Request.ipVersion) + && Objects.equals(this.labels, networkRangeIPv4Request.labels) + && Objects.equals(this.maxPrefixLen, networkRangeIPv4Request.maxPrefixLen) + && Objects.equals(this.minPrefixLen, networkRangeIPv4Request.minPrefixLen) + && Objects.equals(this.nameservers, networkRangeIPv4Request.nameservers) + && Objects.equals(this.prefix, networkRangeIPv4Request.prefix) + && Objects.equals( + this.additionalProperties, networkRangeIPv4Request.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + defaultPrefixLen, + description, + ipVersion, + labels, + maxPrefixLen, + minPrefixLen, + nameservers, + prefix, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NetworkRangeIPv4Request {\n"); + sb.append(" defaultPrefixLen: ").append(toIndentedString(defaultPrefixLen)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" ipVersion: ").append(toIndentedString(ipVersion)).append("\n"); + sb.append(" labels: ").append(toIndentedString(labels)).append("\n"); + sb.append(" maxPrefixLen: ").append(toIndentedString(maxPrefixLen)).append("\n"); + sb.append(" minPrefixLen: ").append(toIndentedString(minPrefixLen)).append("\n"); + sb.append(" nameservers: ").append(toIndentedString(nameservers)).append("\n"); + sb.append(" prefix: ").append(toIndentedString(prefix)).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( + "defaultPrefixLen", + "description", + "ipVersion", + "labels", + "maxPrefixLen", + "minPrefixLen", + "nameservers", + "prefix")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("ipVersion", "prefix")); + } + + /** + * 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 NetworkRangeIPv4Request + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!NetworkRangeIPv4Request.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 NetworkRangeIPv4Request is not found in the empty JSON string", + NetworkRangeIPv4Request.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : NetworkRangeIPv4Request.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("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("ipVersion").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `ipVersion` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("ipVersion").toString())); + } + // validate the required field `ipVersion` + IpVersionEnum.validateJsonElement(jsonObj.get("ipVersion")); + // ensure the optional json data is an array if present + if (jsonObj.get("nameservers") != null + && !jsonObj.get("nameservers").isJsonNull() + && !jsonObj.get("nameservers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `nameservers` to be an array in the JSON string but got `%s`", + jsonObj.get("nameservers").toString())); + } + if (!jsonObj.get("prefix").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `prefix` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("prefix").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!NetworkRangeIPv4Request.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'NetworkRangeIPv4Request' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(NetworkRangeIPv4Request.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, NetworkRangeIPv4Request 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 NetworkRangeIPv4Request read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + NetworkRangeIPv4Request 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 NetworkRangeIPv4Request given an JSON string + * + * @param jsonString JSON string + * @return An instance of NetworkRangeIPv4Request + * @throws IOException if the JSON string is invalid with respect to NetworkRangeIPv4Request + */ + public static NetworkRangeIPv4Request fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, NetworkRangeIPv4Request.class); + } + + /** + * Convert an instance of NetworkRangeIPv4Request 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/v2alpha1api/model/PartialUpdateVPCPayload.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/PartialUpdateVPCPayload.java new file mode 100644 index 00000000..b631800e --- /dev/null +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/PartialUpdateVPCPayload.java @@ -0,0 +1,358 @@ +/* + * STACKIT IaaS API + * This API allows you to create and modify IaaS resources. + * + * The version of the OpenAPI document: 2alpha1 + * 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.v2alpha1api.model; + +import cloud.stackit.sdk.iaas.v2alpha1api.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.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; + +/** Object that represents a update VPC request. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.19.0") +public class PartialUpdateVPCPayload { + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable private String description; + + public static final String SERIALIZED_NAME_LABELS = "labels"; + + @SerializedName(SERIALIZED_NAME_LABELS) + @javax.annotation.Nullable private Object labels; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable private String name; + + public PartialUpdateVPCPayload() {} + + public PartialUpdateVPCPayload 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 PartialUpdateVPCPayload labels(@javax.annotation.Nullable Object labels) { + this.labels = labels; + return this; + } + + /** + * 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. + * + * @return labels + */ + @javax.annotation.Nullable public Object getLabels() { + return labels; + } + + public void setLabels(@javax.annotation.Nullable Object labels) { + this.labels = labels; + } + + public PartialUpdateVPCPayload name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * The name for a General Object. Matches Names and also UUIDs. + * + * @return name + */ + @javax.annotation.Nullable public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + /** + * 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 PartialUpdateVPCPayload instance itself + */ + public PartialUpdateVPCPayload 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; + } + PartialUpdateVPCPayload partialUpdateVPCPayload = (PartialUpdateVPCPayload) o; + return Objects.equals(this.description, partialUpdateVPCPayload.description) + && Objects.equals(this.labels, partialUpdateVPCPayload.labels) + && Objects.equals(this.name, partialUpdateVPCPayload.name) + && Objects.equals( + this.additionalProperties, partialUpdateVPCPayload.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(description, labels, name, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PartialUpdateVPCPayload {\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" labels: ").append(toIndentedString(labels)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).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("description", "labels", "name")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * 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 PartialUpdateVPCPayload + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PartialUpdateVPCPayload.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 PartialUpdateVPCPayload is not found in the empty JSON string", + PartialUpdateVPCPayload.openapiRequiredFields.toString())); + } + } + 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("name") != null && !jsonObj.get("name").isJsonNull()) + && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `name` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PartialUpdateVPCPayload.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PartialUpdateVPCPayload' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(PartialUpdateVPCPayload.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, PartialUpdateVPCPayload 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 PartialUpdateVPCPayload read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + PartialUpdateVPCPayload 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 PartialUpdateVPCPayload given an JSON string + * + * @param jsonString JSON string + * @return An instance of PartialUpdateVPCPayload + * @throws IOException if the JSON string is invalid with respect to PartialUpdateVPCPayload + */ + public static PartialUpdateVPCPayload fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PartialUpdateVPCPayload.class); + } + + /** + * Convert an instance of PartialUpdateVPCPayload 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/v2alpha1api/model/RegionalVPC.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/RegionalVPC.java new file mode 100644 index 00000000..3be6254d --- /dev/null +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/RegionalVPC.java @@ -0,0 +1,320 @@ +/* + * STACKIT IaaS API + * This API allows you to create and modify IaaS resources. + * + * The version of the OpenAPI document: 2alpha1 + * 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.v2alpha1api.model; + +import cloud.stackit.sdk.iaas.v2alpha1api.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.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; + +/** The basic properties of a regional VPC. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.19.0") +public class RegionalVPC { + public static final String SERIALIZED_NAME_IPV4 = "ipv4"; + + @SerializedName(SERIALIZED_NAME_IPV4) + @javax.annotation.Nullable private RegionalVPCIPv4 ipv4; + + public static final String SERIALIZED_NAME_STATUS = "status"; + + @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nullable private String status; + + public RegionalVPC() {} + + public RegionalVPC(String status) { + this(); + this.status = status; + } + + public RegionalVPC ipv4(@javax.annotation.Nullable RegionalVPCIPv4 ipv4) { + this.ipv4 = ipv4; + return this; + } + + /** + * Get ipv4 + * + * @return ipv4 + */ + @javax.annotation.Nullable public RegionalVPCIPv4 getIpv4() { + return ipv4; + } + + public void setIpv4(@javax.annotation.Nullable RegionalVPCIPv4 ipv4) { + this.ipv4 = ipv4; + } + + /** + * The state of a resource object. Possible values: `CREATING`, `CREATED`, + * `DELETING`, `DELETED`, `FAILED`, `UPDATED`, + * `UPDATING`. + * + * @return status + */ + @javax.annotation.Nullable public String getStatus() { + return status; + } + + /** + * 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 RegionalVPC instance itself + */ + public RegionalVPC 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; + } + RegionalVPC regionalVPC = (RegionalVPC) o; + return Objects.equals(this.ipv4, regionalVPC.ipv4) + && Objects.equals(this.status, regionalVPC.status) + && Objects.equals(this.additionalProperties, regionalVPC.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(ipv4, status, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RegionalVPC {\n"); + sb.append(" ipv4: ").append(toIndentedString(ipv4)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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("ipv4", "status")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * 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 RegionalVPC + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RegionalVPC.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 RegionalVPC is not found in the empty JSON string", + RegionalVPC.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `ipv4` + if (jsonObj.get("ipv4") != null && !jsonObj.get("ipv4").isJsonNull()) { + RegionalVPCIPv4.validateJsonElement(jsonObj.get("ipv4")); + } + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) + && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `status` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("status").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RegionalVPC.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RegionalVPC' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(RegionalVPC.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, RegionalVPC 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 RegionalVPC read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + RegionalVPC 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 RegionalVPC given an JSON string + * + * @param jsonString JSON string + * @return An instance of RegionalVPC + * @throws IOException if the JSON string is invalid with respect to RegionalVPC + */ + public static RegionalVPC fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RegionalVPC.class); + } + + /** + * Convert an instance of RegionalVPC 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/v2alpha1api/model/RegionalVPCIPv4.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/RegionalVPCIPv4.java new file mode 100644 index 00000000..bb949a53 --- /dev/null +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/RegionalVPCIPv4.java @@ -0,0 +1,323 @@ +/* + * STACKIT IaaS API + * This API allows you to create and modify IaaS resources. + * + * The version of the OpenAPI document: 2alpha1 + * 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.v2alpha1api.model; + +import cloud.stackit.sdk.iaas.v2alpha1api.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.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.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** The regional IPv4 config of a VPC. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.19.0") +public class RegionalVPCIPv4 { + public static final String SERIALIZED_NAME_DEFAULT_NAMESERVERS = "defaultNameservers"; + + @SerializedName(SERIALIZED_NAME_DEFAULT_NAMESERVERS) + @javax.annotation.Nonnull + private List defaultNameservers = new ArrayList<>(); + + public RegionalVPCIPv4() {} + + public RegionalVPCIPv4 defaultNameservers( + @javax.annotation.Nonnull List defaultNameservers) { + this.defaultNameservers = defaultNameservers; + return this; + } + + public RegionalVPCIPv4 addDefaultNameserversItem(String defaultNameserversItem) { + if (this.defaultNameservers == null) { + this.defaultNameservers = new ArrayList<>(); + } + this.defaultNameservers.add(defaultNameserversItem); + return this; + } + + /** + * Get defaultNameservers + * + * @return defaultNameservers + */ + @javax.annotation.Nonnull + public List getDefaultNameservers() { + return defaultNameservers; + } + + public void setDefaultNameservers(@javax.annotation.Nonnull List defaultNameservers) { + this.defaultNameservers = defaultNameservers; + } + + /** + * 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 RegionalVPCIPv4 instance itself + */ + public RegionalVPCIPv4 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; + } + RegionalVPCIPv4 regionalVPCIPv4 = (RegionalVPCIPv4) o; + return Objects.equals(this.defaultNameservers, regionalVPCIPv4.defaultNameservers) + && Objects.equals(this.additionalProperties, regionalVPCIPv4.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(defaultNameservers, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RegionalVPCIPv4 {\n"); + sb.append(" defaultNameservers: ") + .append(toIndentedString(defaultNameservers)) + .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("defaultNameservers")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("defaultNameservers")); + } + + /** + * 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 RegionalVPCIPv4 + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RegionalVPCIPv4.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 RegionalVPCIPv4 is not found in the empty JSON string", + RegionalVPCIPv4.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : RegionalVPCIPv4.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(); + // ensure the required json array is present + if (jsonObj.get("defaultNameservers") == null) { + throw new IllegalArgumentException( + "Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("defaultNameservers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `defaultNameservers` to be an array in the JSON string but got `%s`", + jsonObj.get("defaultNameservers").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RegionalVPCIPv4.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RegionalVPCIPv4' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(RegionalVPCIPv4.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, RegionalVPCIPv4 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 RegionalVPCIPv4 read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + RegionalVPCIPv4 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 RegionalVPCIPv4 given an JSON string + * + * @param jsonString JSON string + * @return An instance of RegionalVPCIPv4 + * @throws IOException if the JSON string is invalid with respect to RegionalVPCIPv4 + */ + public static RegionalVPCIPv4 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RegionalVPCIPv4.class); + } + + /** + * Convert an instance of RegionalVPCIPv4 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/v2alpha1api/model/RegionalVPCList.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/RegionalVPCList.java new file mode 100644 index 00000000..4486053c --- /dev/null +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/RegionalVPCList.java @@ -0,0 +1,308 @@ +/* + * STACKIT IaaS API + * This API allows you to create and modify IaaS resources. + * + * The version of the OpenAPI document: 2alpha1 + * 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.v2alpha1api.model; + +import cloud.stackit.sdk.iaas.v2alpha1api.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.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; + +/** Regional VPC list response. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.19.0") +public class RegionalVPCList { + public static final String SERIALIZED_NAME_REGIONS = "regions"; + + @SerializedName(SERIALIZED_NAME_REGIONS) + @javax.annotation.Nonnull + private Map regions = new HashMap<>(); + + public RegionalVPCList() {} + + public RegionalVPCList regions(@javax.annotation.Nonnull Map regions) { + this.regions = regions; + return this; + } + + public RegionalVPCList putRegionsItem(String key, RegionalVPC regionsItem) { + if (this.regions == null) { + this.regions = new HashMap<>(); + } + this.regions.put(key, regionsItem); + return this; + } + + /** + * Get regions + * + * @return regions + */ + @javax.annotation.Nonnull + public Map getRegions() { + return regions; + } + + public void setRegions(@javax.annotation.Nonnull Map regions) { + this.regions = regions; + } + + /** + * 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 RegionalVPCList instance itself + */ + public RegionalVPCList 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; + } + RegionalVPCList regionalVPCList = (RegionalVPCList) o; + return Objects.equals(this.regions, regionalVPCList.regions) + && Objects.equals(this.additionalProperties, regionalVPCList.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(regions, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RegionalVPCList {\n"); + sb.append(" regions: ").append(toIndentedString(regions)).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("regions")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("regions")); + } + + /** + * 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 RegionalVPCList + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!RegionalVPCList.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 RegionalVPCList is not found in the empty JSON string", + RegionalVPCList.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : RegionalVPCList.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(); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!RegionalVPCList.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'RegionalVPCList' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(RegionalVPCList.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, RegionalVPCList 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 RegionalVPCList read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + RegionalVPCList 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 RegionalVPCList given an JSON string + * + * @param jsonString JSON string + * @return An instance of RegionalVPCList + * @throws IOException if the JSON string is invalid with respect to RegionalVPCList + */ + public static RegionalVPCList fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, RegionalVPCList.class); + } + + /** + * Convert an instance of RegionalVPCList 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/v2alpha1api/model/RoutingTable.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/RoutingTable.java index 3f378ca2..e584cacf 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/RoutingTable.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/RoutingTable.java @@ -32,7 +32,10 @@ import java.util.Objects; import java.util.UUID; -/** An object representing a routing table. */ +/** + * An object representing a routing table. Filterable Fields: `dynamicRoutes`, + * `systemRoutes`. + */ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.19.0") diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/UpdateVPCRegionPayload.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/UpdateVPCRegionPayload.java new file mode 100644 index 00000000..f778eb7b --- /dev/null +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/UpdateVPCRegionPayload.java @@ -0,0 +1,322 @@ +/* + * STACKIT IaaS API + * This API allows you to create and modify IaaS resources. + * + * The version of the OpenAPI document: 2alpha1 + * 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.v2alpha1api.model; + +import cloud.stackit.sdk.iaas.v2alpha1api.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.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; + +/** The basic properties of a regional VPC. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.19.0") +public class UpdateVPCRegionPayload { + public static final String SERIALIZED_NAME_IPV4 = "ipv4"; + + @SerializedName(SERIALIZED_NAME_IPV4) + @javax.annotation.Nullable private RegionalVPCIPv4 ipv4; + + public static final String SERIALIZED_NAME_STATUS = "status"; + + @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nullable private String status; + + public UpdateVPCRegionPayload() {} + + public UpdateVPCRegionPayload(String status) { + this(); + this.status = status; + } + + public UpdateVPCRegionPayload ipv4(@javax.annotation.Nullable RegionalVPCIPv4 ipv4) { + this.ipv4 = ipv4; + return this; + } + + /** + * Get ipv4 + * + * @return ipv4 + */ + @javax.annotation.Nullable public RegionalVPCIPv4 getIpv4() { + return ipv4; + } + + public void setIpv4(@javax.annotation.Nullable RegionalVPCIPv4 ipv4) { + this.ipv4 = ipv4; + } + + /** + * The state of a resource object. Possible values: `CREATING`, `CREATED`, + * `DELETING`, `DELETED`, `FAILED`, `UPDATED`, + * `UPDATING`. + * + * @return status + */ + @javax.annotation.Nullable public String getStatus() { + return status; + } + + /** + * 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 UpdateVPCRegionPayload instance itself + */ + public UpdateVPCRegionPayload 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; + } + UpdateVPCRegionPayload updateVPCRegionPayload = (UpdateVPCRegionPayload) o; + return Objects.equals(this.ipv4, updateVPCRegionPayload.ipv4) + && Objects.equals(this.status, updateVPCRegionPayload.status) + && Objects.equals( + this.additionalProperties, updateVPCRegionPayload.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(ipv4, status, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateVPCRegionPayload {\n"); + sb.append(" ipv4: ").append(toIndentedString(ipv4)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).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("ipv4", "status")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * 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 UpdateVPCRegionPayload + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateVPCRegionPayload.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 UpdateVPCRegionPayload is not found in the empty JSON string", + UpdateVPCRegionPayload.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `ipv4` + if (jsonObj.get("ipv4") != null && !jsonObj.get("ipv4").isJsonNull()) { + RegionalVPCIPv4.validateJsonElement(jsonObj.get("ipv4")); + } + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) + && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `status` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("status").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateVPCRegionPayload.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateVPCRegionPayload' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(UpdateVPCRegionPayload.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateVPCRegionPayload 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 UpdateVPCRegionPayload read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + UpdateVPCRegionPayload 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 UpdateVPCRegionPayload given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateVPCRegionPayload + * @throws IOException if the JSON string is invalid with respect to UpdateVPCRegionPayload + */ + public static UpdateVPCRegionPayload fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateVPCRegionPayload.class); + } + + /** + * Convert an instance of UpdateVPCRegionPayload 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/v2alpha1api/model/UpdateVPCRoutingTablePayload.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/UpdateVPCRoutingTablePayload.java new file mode 100644 index 00000000..61913739 --- /dev/null +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/UpdateVPCRoutingTablePayload.java @@ -0,0 +1,422 @@ +/* + * STACKIT IaaS API + * This API allows you to create and modify IaaS resources. + * + * The version of the OpenAPI document: 2alpha1 + * 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.v2alpha1api.model; + +import cloud.stackit.sdk.iaas.v2alpha1api.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.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; + +/** Object that represents the request body for a routing table update. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.19.0") +public class UpdateVPCRoutingTablePayload { + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable private String description; + + public static final String SERIALIZED_NAME_DYNAMIC_ROUTES = "dynamicRoutes"; + + @SerializedName(SERIALIZED_NAME_DYNAMIC_ROUTES) + @javax.annotation.Nullable private Boolean dynamicRoutes; + + public static final String SERIALIZED_NAME_LABELS = "labels"; + + @SerializedName(SERIALIZED_NAME_LABELS) + @javax.annotation.Nullable private Object labels; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nullable private String name; + + public static final String SERIALIZED_NAME_SYSTEM_ROUTES = "systemRoutes"; + + @SerializedName(SERIALIZED_NAME_SYSTEM_ROUTES) + @javax.annotation.Nullable private Boolean systemRoutes; + + public UpdateVPCRoutingTablePayload() {} + + public UpdateVPCRoutingTablePayload 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 UpdateVPCRoutingTablePayload dynamicRoutes( + @javax.annotation.Nullable Boolean dynamicRoutes) { + this.dynamicRoutes = dynamicRoutes; + return this; + } + + /** + * The update config setting for a routing table which allows propagation of dynamic routes to + * this routing table. + * + * @return dynamicRoutes + */ + @javax.annotation.Nullable public Boolean getDynamicRoutes() { + return dynamicRoutes; + } + + public void setDynamicRoutes(@javax.annotation.Nullable Boolean dynamicRoutes) { + this.dynamicRoutes = dynamicRoutes; + } + + public UpdateVPCRoutingTablePayload labels(@javax.annotation.Nullable Object labels) { + this.labels = labels; + return this; + } + + /** + * 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. + * + * @return labels + */ + @javax.annotation.Nullable public Object getLabels() { + return labels; + } + + public void setLabels(@javax.annotation.Nullable Object labels) { + this.labels = labels; + } + + public UpdateVPCRoutingTablePayload name(@javax.annotation.Nullable String name) { + this.name = name; + return this; + } + + /** + * The name for a General Object. Matches Names and also UUIDs. + * + * @return name + */ + @javax.annotation.Nullable public String getName() { + return name; + } + + public void setName(@javax.annotation.Nullable String name) { + this.name = name; + } + + public UpdateVPCRoutingTablePayload systemRoutes( + @javax.annotation.Nullable Boolean systemRoutes) { + this.systemRoutes = systemRoutes; + return this; + } + + /** + * The update config setting for a routing table which allows installation of automatic system + * routes for connectivity between projects in the same SNA. + * + * @return systemRoutes + */ + @javax.annotation.Nullable public Boolean getSystemRoutes() { + return systemRoutes; + } + + public void setSystemRoutes(@javax.annotation.Nullable Boolean systemRoutes) { + this.systemRoutes = systemRoutes; + } + + /** + * 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 UpdateVPCRoutingTablePayload instance itself + */ + public UpdateVPCRoutingTablePayload 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; + } + UpdateVPCRoutingTablePayload updateVPCRoutingTablePayload = + (UpdateVPCRoutingTablePayload) o; + return Objects.equals(this.description, updateVPCRoutingTablePayload.description) + && Objects.equals(this.dynamicRoutes, updateVPCRoutingTablePayload.dynamicRoutes) + && Objects.equals(this.labels, updateVPCRoutingTablePayload.labels) + && Objects.equals(this.name, updateVPCRoutingTablePayload.name) + && Objects.equals(this.systemRoutes, updateVPCRoutingTablePayload.systemRoutes) + && Objects.equals( + this.additionalProperties, + updateVPCRoutingTablePayload.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + description, dynamicRoutes, labels, name, systemRoutes, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateVPCRoutingTablePayload {\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" dynamicRoutes: ").append(toIndentedString(dynamicRoutes)).append("\n"); + sb.append(" labels: ").append(toIndentedString(labels)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" systemRoutes: ").append(toIndentedString(systemRoutes)).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( + "description", "dynamicRoutes", "labels", "name", "systemRoutes")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * 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 + * UpdateVPCRoutingTablePayload + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateVPCRoutingTablePayload.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 UpdateVPCRoutingTablePayload is not found in the empty JSON string", + UpdateVPCRoutingTablePayload.openapiRequiredFields.toString())); + } + } + 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("name") != null && !jsonObj.get("name").isJsonNull()) + && !jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `name` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateVPCRoutingTablePayload.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateVPCRoutingTablePayload' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter( + this, TypeToken.get(UpdateVPCRoutingTablePayload.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateVPCRoutingTablePayload 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 UpdateVPCRoutingTablePayload read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + UpdateVPCRoutingTablePayload 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 UpdateVPCRoutingTablePayload given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateVPCRoutingTablePayload + * @throws IOException if the JSON string is invalid with respect to + * UpdateVPCRoutingTablePayload + */ + public static UpdateVPCRoutingTablePayload fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateVPCRoutingTablePayload.class); + } + + /** + * Convert an instance of UpdateVPCRoutingTablePayload 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/v2alpha1api/model/UpdateVPCStaticRoutePayload.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/UpdateVPCStaticRoutePayload.java new file mode 100644 index 00000000..2918018d --- /dev/null +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/UpdateVPCStaticRoutePayload.java @@ -0,0 +1,295 @@ +/* + * STACKIT IaaS API + * This API allows you to create and modify IaaS resources. + * + * The version of the OpenAPI document: 2alpha1 + * 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.v2alpha1api.model; + +import cloud.stackit.sdk.iaas.v2alpha1api.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.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; + +/** Object that represents the request body for a route update. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.19.0") +public class UpdateVPCStaticRoutePayload { + public static final String SERIALIZED_NAME_LABELS = "labels"; + + @SerializedName(SERIALIZED_NAME_LABELS) + @javax.annotation.Nullable private Object labels; + + public UpdateVPCStaticRoutePayload() {} + + public UpdateVPCStaticRoutePayload labels(@javax.annotation.Nullable Object labels) { + this.labels = labels; + return this; + } + + /** + * 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. + * + * @return labels + */ + @javax.annotation.Nullable public Object getLabels() { + return labels; + } + + public void setLabels(@javax.annotation.Nullable Object labels) { + this.labels = labels; + } + + /** + * 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 UpdateVPCStaticRoutePayload instance itself + */ + public UpdateVPCStaticRoutePayload 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; + } + UpdateVPCStaticRoutePayload updateVPCStaticRoutePayload = (UpdateVPCStaticRoutePayload) o; + return Objects.equals(this.labels, updateVPCStaticRoutePayload.labels) + && Objects.equals( + this.additionalProperties, + updateVPCStaticRoutePayload.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(labels, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateVPCStaticRoutePayload {\n"); + sb.append(" labels: ").append(toIndentedString(labels)).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("labels")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * 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 + * UpdateVPCStaticRoutePayload + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!UpdateVPCStaticRoutePayload.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 UpdateVPCStaticRoutePayload is not found in the empty JSON string", + UpdateVPCStaticRoutePayload.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!UpdateVPCStaticRoutePayload.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'UpdateVPCStaticRoutePayload' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(UpdateVPCStaticRoutePayload.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, UpdateVPCStaticRoutePayload 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 UpdateVPCStaticRoutePayload read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + UpdateVPCStaticRoutePayload 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 UpdateVPCStaticRoutePayload given an JSON string + * + * @param jsonString JSON string + * @return An instance of UpdateVPCStaticRoutePayload + * @throws IOException if the JSON string is invalid with respect to UpdateVPCStaticRoutePayload + */ + public static UpdateVPCStaticRoutePayload fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, UpdateVPCStaticRoutePayload.class); + } + + /** + * Convert an instance of UpdateVPCStaticRoutePayload 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/v2alpha1api/model/V1UpdateVPCNetworkRangeIPv4.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/V1UpdateVPCNetworkRangeIPv4.java new file mode 100644 index 00000000..18d9e2a5 --- /dev/null +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/V1UpdateVPCNetworkRangeIPv4.java @@ -0,0 +1,567 @@ +/* + * STACKIT IaaS API + * This API allows you to create and modify IaaS resources. + * + * The version of the OpenAPI document: 2alpha1 + * 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.v2alpha1api.model; + +import cloud.stackit.sdk.iaas.v2alpha1api.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.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** Contains the IPv4 properties of a VPC network range update. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.19.0") +public class V1UpdateVPCNetworkRangeIPv4 { + public static final String SERIALIZED_NAME_DEFAULT_PREFIX_LEN = "defaultPrefixLen"; + + @SerializedName(SERIALIZED_NAME_DEFAULT_PREFIX_LEN) + @javax.annotation.Nullable private Long defaultPrefixLen; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nullable private String description; + + /** The IP version of the network range being updated. */ + @JsonAdapter(IpVersionEnum.Adapter.class) + public enum IpVersionEnum { + IPV4("ipv4"), + + UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api"); + + private String value; + + IpVersionEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static IpVersionEnum fromValue(String value) { + for (IpVersionEnum b : IpVersionEnum.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 IpVersionEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public IpVersionEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return IpVersionEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + IpVersionEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_IP_VERSION = "ipVersion"; + + @SerializedName(SERIALIZED_NAME_IP_VERSION) + @javax.annotation.Nonnull + private IpVersionEnum ipVersion; + + public static final String SERIALIZED_NAME_LABELS = "labels"; + + @SerializedName(SERIALIZED_NAME_LABELS) + @javax.annotation.Nullable private Object labels; + + public static final String SERIALIZED_NAME_MAX_PREFIX_LEN = "maxPrefixLen"; + + @SerializedName(SERIALIZED_NAME_MAX_PREFIX_LEN) + @javax.annotation.Nullable private Long maxPrefixLen; + + public static final String SERIALIZED_NAME_MIN_PREFIX_LEN = "minPrefixLen"; + + @SerializedName(SERIALIZED_NAME_MIN_PREFIX_LEN) + @javax.annotation.Nullable private Long minPrefixLen; + + public static final String SERIALIZED_NAME_NAMESERVERS = "nameservers"; + + @SerializedName(SERIALIZED_NAME_NAMESERVERS) + @javax.annotation.Nullable private List nameservers = new ArrayList<>(); + + public V1UpdateVPCNetworkRangeIPv4() {} + + public V1UpdateVPCNetworkRangeIPv4 defaultPrefixLen( + @javax.annotation.Nullable Long defaultPrefixLen) { + this.defaultPrefixLen = defaultPrefixLen; + return this; + } + + /** + * The default prefix length for network ranges in the VPC. minimum: 24 maximum: 29 + * + * @return defaultPrefixLen + */ + @javax.annotation.Nullable public Long getDefaultPrefixLen() { + return defaultPrefixLen; + } + + public void setDefaultPrefixLen(@javax.annotation.Nullable Long defaultPrefixLen) { + this.defaultPrefixLen = defaultPrefixLen; + } + + public V1UpdateVPCNetworkRangeIPv4 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 V1UpdateVPCNetworkRangeIPv4 ipVersion( + @javax.annotation.Nonnull IpVersionEnum ipVersion) { + this.ipVersion = ipVersion; + return this; + } + + /** + * The IP version of the network range being updated. + * + * @return ipVersion + */ + @javax.annotation.Nonnull + public IpVersionEnum getIpVersion() { + return ipVersion; + } + + public void setIpVersion(@javax.annotation.Nonnull IpVersionEnum ipVersion) { + this.ipVersion = ipVersion; + } + + public V1UpdateVPCNetworkRangeIPv4 labels(@javax.annotation.Nullable Object labels) { + this.labels = labels; + return this; + } + + /** + * 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. + * + * @return labels + */ + @javax.annotation.Nullable public Object getLabels() { + return labels; + } + + public void setLabels(@javax.annotation.Nullable Object labels) { + this.labels = labels; + } + + public V1UpdateVPCNetworkRangeIPv4 maxPrefixLen(@javax.annotation.Nullable Long maxPrefixLen) { + this.maxPrefixLen = maxPrefixLen; + return this; + } + + /** + * The maximal prefix length for network ranges in the VPC. minimum: 24 maximum: 29 + * + * @return maxPrefixLen + */ + @javax.annotation.Nullable public Long getMaxPrefixLen() { + return maxPrefixLen; + } + + public void setMaxPrefixLen(@javax.annotation.Nullable Long maxPrefixLen) { + this.maxPrefixLen = maxPrefixLen; + } + + public V1UpdateVPCNetworkRangeIPv4 minPrefixLen(@javax.annotation.Nullable Long minPrefixLen) { + this.minPrefixLen = minPrefixLen; + return this; + } + + /** + * The minimal prefix length for network ranges in the VPC. minimum: 8 maximum: 29 + * + * @return minPrefixLen + */ + @javax.annotation.Nullable public Long getMinPrefixLen() { + return minPrefixLen; + } + + public void setMinPrefixLen(@javax.annotation.Nullable Long minPrefixLen) { + this.minPrefixLen = minPrefixLen; + } + + public V1UpdateVPCNetworkRangeIPv4 nameservers( + @javax.annotation.Nullable List nameservers) { + this.nameservers = nameservers; + return this; + } + + public V1UpdateVPCNetworkRangeIPv4 addNameserversItem(String nameserversItem) { + if (this.nameservers == null) { + this.nameservers = new ArrayList<>(); + } + this.nameservers.add(nameserversItem); + return this; + } + + /** + * A list containing DNS Servers/Nameservers for IPv4. + * + * @return nameservers + */ + @javax.annotation.Nullable public List getNameservers() { + return nameservers; + } + + public void setNameservers(@javax.annotation.Nullable List nameservers) { + this.nameservers = nameservers; + } + + /** + * 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 V1UpdateVPCNetworkRangeIPv4 instance itself + */ + public V1UpdateVPCNetworkRangeIPv4 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; + } + V1UpdateVPCNetworkRangeIPv4 v1UpdateVPCNetworkRangeIPv4 = (V1UpdateVPCNetworkRangeIPv4) o; + return Objects.equals(this.defaultPrefixLen, v1UpdateVPCNetworkRangeIPv4.defaultPrefixLen) + && Objects.equals(this.description, v1UpdateVPCNetworkRangeIPv4.description) + && Objects.equals(this.ipVersion, v1UpdateVPCNetworkRangeIPv4.ipVersion) + && Objects.equals(this.labels, v1UpdateVPCNetworkRangeIPv4.labels) + && Objects.equals(this.maxPrefixLen, v1UpdateVPCNetworkRangeIPv4.maxPrefixLen) + && Objects.equals(this.minPrefixLen, v1UpdateVPCNetworkRangeIPv4.minPrefixLen) + && Objects.equals(this.nameservers, v1UpdateVPCNetworkRangeIPv4.nameservers) + && Objects.equals( + this.additionalProperties, + v1UpdateVPCNetworkRangeIPv4.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + defaultPrefixLen, + description, + ipVersion, + labels, + maxPrefixLen, + minPrefixLen, + nameservers, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class V1UpdateVPCNetworkRangeIPv4 {\n"); + sb.append(" defaultPrefixLen: ").append(toIndentedString(defaultPrefixLen)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" ipVersion: ").append(toIndentedString(ipVersion)).append("\n"); + sb.append(" labels: ").append(toIndentedString(labels)).append("\n"); + sb.append(" maxPrefixLen: ").append(toIndentedString(maxPrefixLen)).append("\n"); + sb.append(" minPrefixLen: ").append(toIndentedString(minPrefixLen)).append("\n"); + sb.append(" nameservers: ").append(toIndentedString(nameservers)).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( + "defaultPrefixLen", + "description", + "ipVersion", + "labels", + "maxPrefixLen", + "minPrefixLen", + "nameservers")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("ipVersion")); + } + + /** + * 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 + * V1UpdateVPCNetworkRangeIPv4 + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!V1UpdateVPCNetworkRangeIPv4.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 V1UpdateVPCNetworkRangeIPv4 is not found in the empty JSON string", + V1UpdateVPCNetworkRangeIPv4.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : V1UpdateVPCNetworkRangeIPv4.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("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("ipVersion").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `ipVersion` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("ipVersion").toString())); + } + // validate the required field `ipVersion` + IpVersionEnum.validateJsonElement(jsonObj.get("ipVersion")); + // ensure the optional json data is an array if present + if (jsonObj.get("nameservers") != null + && !jsonObj.get("nameservers").isJsonNull() + && !jsonObj.get("nameservers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `nameservers` to be an array in the JSON string but got `%s`", + jsonObj.get("nameservers").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!V1UpdateVPCNetworkRangeIPv4.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'V1UpdateVPCNetworkRangeIPv4' and its + // subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(V1UpdateVPCNetworkRangeIPv4.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, V1UpdateVPCNetworkRangeIPv4 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 V1UpdateVPCNetworkRangeIPv4 read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + V1UpdateVPCNetworkRangeIPv4 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 V1UpdateVPCNetworkRangeIPv4 given an JSON string + * + * @param jsonString JSON string + * @return An instance of V1UpdateVPCNetworkRangeIPv4 + * @throws IOException if the JSON string is invalid with respect to V1UpdateVPCNetworkRangeIPv4 + */ + public static V1UpdateVPCNetworkRangeIPv4 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, V1UpdateVPCNetworkRangeIPv4.class); + } + + /** + * Convert an instance of V1UpdateVPCNetworkRangeIPv4 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/v2alpha1api/model/VPC.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/VPC.java new file mode 100644 index 00000000..7e9b76b0 --- /dev/null +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/VPC.java @@ -0,0 +1,521 @@ +/* + * STACKIT IaaS API + * This API allows you to create and modify IaaS resources. + * + * The version of the OpenAPI document: 2alpha1 + * 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.v2alpha1api.model; + +import cloud.stackit.sdk.iaas.v2alpha1api.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.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.time.OffsetDateTime; +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; + +/** Object that represents a VPC. Filterable Fields: `name`. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.19.0") +public class VPC { + public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; + + @SerializedName(SERIALIZED_NAME_CREATED_AT) + @javax.annotation.Nonnull + private OffsetDateTime createdAt; + + public static final String SERIALIZED_NAME_DESCRIPTION = "description"; + + @SerializedName(SERIALIZED_NAME_DESCRIPTION) + @javax.annotation.Nonnull + private String description; + + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nonnull + private UUID id; + + public static final String SERIALIZED_NAME_LABELS = "labels"; + + @SerializedName(SERIALIZED_NAME_LABELS) + @javax.annotation.Nonnull + private Object labels; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_PROJECT_ID = "projectId"; + + @SerializedName(SERIALIZED_NAME_PROJECT_ID) + @javax.annotation.Nonnull + private UUID projectId; + + public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; + + @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @javax.annotation.Nonnull + private OffsetDateTime updatedAt; + + public VPC() {} + + public VPC createdAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Date-time when resource was created. + * + * @return createdAt + */ + @javax.annotation.Nonnull + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(@javax.annotation.Nonnull OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public VPC description(@javax.annotation.Nonnull String description) { + this.description = description; + return this; + } + + /** + * Description Object. Allows string up to 255 Characters. + * + * @return description + */ + @javax.annotation.Nonnull + public String getDescription() { + return description; + } + + public void setDescription(@javax.annotation.Nonnull String description) { + this.description = description; + } + + public VPC id(@javax.annotation.Nonnull UUID id) { + this.id = id; + return this; + } + + /** + * Universally Unique Identifier (UUID). + * + * @return id + */ + @javax.annotation.Nonnull + public UUID getId() { + return id; + } + + public void setId(@javax.annotation.Nonnull UUID id) { + this.id = id; + } + + public VPC labels(@javax.annotation.Nonnull Object labels) { + this.labels = labels; + return this; + } + + /** + * 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. + * + * @return labels + */ + @javax.annotation.Nonnull + public Object getLabels() { + return labels; + } + + public void setLabels(@javax.annotation.Nonnull Object labels) { + this.labels = labels; + } + + public VPC name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * The name for a General Object. Matches Names and also UUIDs. + * + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + public VPC projectId(@javax.annotation.Nonnull UUID projectId) { + this.projectId = projectId; + return this; + } + + /** + * Universally Unique Identifier (UUID). + * + * @return projectId + */ + @javax.annotation.Nonnull + public UUID getProjectId() { + return projectId; + } + + public void setProjectId(@javax.annotation.Nonnull UUID projectId) { + this.projectId = projectId; + } + + public VPC updatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Date-time when resource was last updated. + * + * @return updatedAt + */ + @javax.annotation.Nonnull + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(@javax.annotation.Nonnull OffsetDateTime updatedAt) { + this.updatedAt = 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. + */ + 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 VPC instance itself + */ + public VPC 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; + } + VPC VPC = (VPC) o; + return Objects.equals(this.createdAt, VPC.createdAt) + && Objects.equals(this.description, VPC.description) + && Objects.equals(this.id, VPC.id) + && Objects.equals(this.labels, VPC.labels) + && Objects.equals(this.name, VPC.name) + && Objects.equals(this.projectId, VPC.projectId) + && Objects.equals(this.updatedAt, VPC.updatedAt) + && Objects.equals(this.additionalProperties, VPC.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + createdAt, + description, + id, + labels, + name, + projectId, + updatedAt, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class VPC {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).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"); + sb.append(" projectId: ").append(toIndentedString(projectId)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).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( + "createdAt", + "description", + "id", + "labels", + "name", + "projectId", + "updatedAt")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = + new HashSet( + Arrays.asList( + "createdAt", + "description", + "id", + "labels", + "name", + "projectId", + "updatedAt")); + } + + /** + * 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 VPC + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!VPC.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 VPC is not found in the empty JSON string", + VPC.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : VPC.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("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("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `id` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("id").toString())); + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `name` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("name").toString())); + } + if (!jsonObj.get("projectId").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `projectId` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("projectId").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!VPC.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'VPC' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(VPC.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, VPC 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 VPC read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + VPC 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 VPC given an JSON string + * + * @param jsonString JSON string + * @return An instance of VPC + * @throws IOException if the JSON string is invalid with respect to VPC + */ + public static VPC fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, VPC.class); + } + + /** + * Convert an instance of VPC 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/v2alpha1api/model/VPCBaseNetworkRange.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/VPCBaseNetworkRange.java new file mode 100644 index 00000000..e391fc3e --- /dev/null +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/VPCBaseNetworkRange.java @@ -0,0 +1,428 @@ +/* + * STACKIT IaaS API + * This API allows you to create and modify IaaS resources. + * + * The version of the OpenAPI document: 2alpha1 + * 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.v2alpha1api.model; + +import cloud.stackit.sdk.iaas.v2alpha1api.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.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.time.OffsetDateTime; +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; + +/** Contains the common properties of a VPC network range. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.19.0") +public class VPCBaseNetworkRange { + 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) + @javax.annotation.Nullable private String description; + + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable private UUID id; + + public static final String SERIALIZED_NAME_LABELS = "labels"; + + @SerializedName(SERIALIZED_NAME_LABELS) + @javax.annotation.Nullable private Object labels; + + public static final String SERIALIZED_NAME_STATUS = "status"; + + @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nullable private String status; + + public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; + + @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @javax.annotation.Nullable private OffsetDateTime updatedAt; + + public VPCBaseNetworkRange() {} + + public VPCBaseNetworkRange(OffsetDateTime createdAt, UUID id, OffsetDateTime updatedAt) { + this(); + this.createdAt = createdAt; + this.id = id; + this.updatedAt = updatedAt; + } + + /** + * Date-time when resource was created. + * + * @return createdAt + */ + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public VPCBaseNetworkRange 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; + } + + /** + * Universally Unique Identifier (UUID). + * + * @return id + */ + @javax.annotation.Nullable public UUID getId() { + return id; + } + + public VPCBaseNetworkRange labels(@javax.annotation.Nullable Object labels) { + this.labels = labels; + return this; + } + + /** + * 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. + * + * @return labels + */ + @javax.annotation.Nullable public Object getLabels() { + return labels; + } + + public void setLabels(@javax.annotation.Nullable Object labels) { + this.labels = labels; + } + + public VPCBaseNetworkRange status(@javax.annotation.Nullable String status) { + this.status = status; + return this; + } + + /** + * The state of a resource object. Possible values: `CREATING`, `CREATED`, + * `DELETING`, `DELETED`, `FAILED`, `UPDATED`, + * `UPDATING`. + * + * @return status + */ + @javax.annotation.Nullable public String getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nullable String status) { + this.status = status; + } + + /** + * 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. + */ + 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 VPCBaseNetworkRange instance itself + */ + public VPCBaseNetworkRange 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; + } + VPCBaseNetworkRange vpCBaseNetworkRange = (VPCBaseNetworkRange) o; + return Objects.equals(this.createdAt, vpCBaseNetworkRange.createdAt) + && Objects.equals(this.description, vpCBaseNetworkRange.description) + && Objects.equals(this.id, vpCBaseNetworkRange.id) + && Objects.equals(this.labels, vpCBaseNetworkRange.labels) + && Objects.equals(this.status, vpCBaseNetworkRange.status) + && Objects.equals(this.updatedAt, vpCBaseNetworkRange.updatedAt) + && Objects.equals( + this.additionalProperties, vpCBaseNetworkRange.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + createdAt, description, id, labels, status, updatedAt, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class VPCBaseNetworkRange {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" labels: ").append(toIndentedString(labels)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).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( + "createdAt", "description", "id", "labels", "status", "updatedAt")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * 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 VPCBaseNetworkRange + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!VPCBaseNetworkRange.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 VPCBaseNetworkRange is not found in the empty JSON string", + VPCBaseNetworkRange.openapiRequiredFields.toString())); + } + } + 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("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `id` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("id").toString())); + } + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) + && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `status` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("status").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!VPCBaseNetworkRange.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'VPCBaseNetworkRange' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(VPCBaseNetworkRange.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, VPCBaseNetworkRange 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 VPCBaseNetworkRange read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + VPCBaseNetworkRange 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 VPCBaseNetworkRange given an JSON string + * + * @param jsonString JSON string + * @return An instance of VPCBaseNetworkRange + * @throws IOException if the JSON string is invalid with respect to VPCBaseNetworkRange + */ + public static VPCBaseNetworkRange fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, VPCBaseNetworkRange.class); + } + + /** + * Convert an instance of VPCBaseNetworkRange 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/v2alpha1api/model/VPCList.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/VPCList.java new file mode 100644 index 00000000..d1b90eee --- /dev/null +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/VPCList.java @@ -0,0 +1,324 @@ +/* + * STACKIT IaaS API + * This API allows you to create and modify IaaS resources. + * + * The version of the OpenAPI document: 2alpha1 + * 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.v2alpha1api.model; + +import cloud.stackit.sdk.iaas.v2alpha1api.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonArray; +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.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.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** VPC list response. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.19.0") +public class VPCList { + public static final String SERIALIZED_NAME_ITEMS = "items"; + + @SerializedName(SERIALIZED_NAME_ITEMS) + @javax.annotation.Nonnull + private List items = new ArrayList<>(); + + public VPCList() {} + + public VPCList items(@javax.annotation.Nonnull List items) { + this.items = items; + return this; + } + + public VPCList addItemsItem(VPC itemsItem) { + if (this.items == null) { + this.items = new ArrayList<>(); + } + this.items.add(itemsItem); + return this; + } + + /** + * A list of VPCs. + * + * @return items + */ + @javax.annotation.Nonnull + public List getItems() { + return items; + } + + public void setItems(@javax.annotation.Nonnull List items) { + this.items = items; + } + + /** + * 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 VPCList instance itself + */ + public VPCList 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; + } + VPCList vpCList = (VPCList) o; + return Objects.equals(this.items, vpCList.items) + && Objects.equals(this.additionalProperties, vpCList.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(items, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class VPCList {\n"); + sb.append(" items: ").append(toIndentedString(items)).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("items")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("items")); + } + + /** + * 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 VPCList + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!VPCList.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 VPCList is not found in the empty JSON string", + VPCList.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : VPCList.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(); + // ensure the json data is an array + if (!jsonObj.get("items").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `items` to be an array in the JSON string but got `%s`", + jsonObj.get("items").toString())); + } + + JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); + // validate the required field `items` (array) + for (int i = 0; i < jsonArrayitems.size(); i++) { + VPC.validateJsonElement(jsonArrayitems.get(i)); + } + ; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!VPCList.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'VPCList' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(VPCList.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, VPCList 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 VPCList read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + VPCList 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 VPCList given an JSON string + * + * @param jsonString JSON string + * @return An instance of VPCList + * @throws IOException if the JSON string is invalid with respect to VPCList + */ + public static VPCList fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, VPCList.class); + } + + /** + * Convert an instance of VPCList 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/v2alpha1api/model/VPCNetworkRange.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/VPCNetworkRange.java new file mode 100644 index 00000000..19b72a24 --- /dev/null +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/VPCNetworkRange.java @@ -0,0 +1,290 @@ +/* + * STACKIT IaaS API + * This API allows you to create and modify IaaS resources. + * + * The version of the OpenAPI document: 2alpha1 + * 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.v2alpha1api.model; + +import cloud.stackit.sdk.iaas.v2alpha1api.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.TypeAdapterFactory; +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.ArrayList; +import java.util.HashMap; +import java.util.Map; +import java.util.logging.Level; +import java.util.logging.Logger; + +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.19.0") +public class VPCNetworkRange extends AbstractOpenApiSchema { + private static final Logger log = Logger.getLogger(VPCNetworkRange.class.getName()); + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!VPCNetworkRange.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'VPCNetworkRange' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter adapterVPCNetworkRangeIPv4 = + gson.getDelegateAdapter(this, TypeToken.get(VPCNetworkRangeIPv4.class)); + final TypeAdapter adapterVPCNetworkRangeIPv6 = + gson.getDelegateAdapter(this, TypeToken.get(VPCNetworkRangeIPv6.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, VPCNetworkRange value) + throws IOException { + if (value == null || value.getActualInstance() == null) { + elementAdapter.write(out, null); + return; + } + + // check if the actual instance is of the type `VPCNetworkRangeIPv4` + if (value.getActualInstance() instanceof VPCNetworkRangeIPv4) { + JsonElement element = + adapterVPCNetworkRangeIPv4.toJsonTree( + (VPCNetworkRangeIPv4) value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + // check if the actual instance is of the type `VPCNetworkRangeIPv6` + if (value.getActualInstance() instanceof VPCNetworkRangeIPv6) { + JsonElement element = + adapterVPCNetworkRangeIPv6.toJsonTree( + (VPCNetworkRangeIPv6) value.getActualInstance()); + elementAdapter.write(out, element); + return; + } + throw new IOException( + "Failed to serialize as the type doesn't match oneOf schemas: VPCNetworkRangeIPv4, VPCNetworkRangeIPv6"); + } + + @Override + public VPCNetworkRange read(JsonReader in) throws IOException { + Object deserialized = null; + JsonElement jsonElement = elementAdapter.read(in); + + int match = 0; + ArrayList errorMessages = new ArrayList<>(); + TypeAdapter actualAdapter = elementAdapter; + + // deserialize VPCNetworkRangeIPv4 + try { + // validate the JSON object to see if any exception is thrown + VPCNetworkRangeIPv4.validateJsonElement(jsonElement); + actualAdapter = adapterVPCNetworkRangeIPv4; + match++; + log.log( + Level.FINER, + "Input data matches schema 'VPCNetworkRangeIPv4'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + java.util.Locale.ROOT, + "Deserialization for VPCNetworkRangeIPv4 failed with `%s`.", + e.getMessage())); + log.log( + Level.FINER, + "Input data does not match schema 'VPCNetworkRangeIPv4'", + e); + } + // deserialize VPCNetworkRangeIPv6 + try { + // validate the JSON object to see if any exception is thrown + VPCNetworkRangeIPv6.validateJsonElement(jsonElement); + actualAdapter = adapterVPCNetworkRangeIPv6; + match++; + log.log( + Level.FINER, + "Input data matches schema 'VPCNetworkRangeIPv6'"); + } catch (Exception e) { + // deserialization failed, continue + errorMessages.add( + String.format( + java.util.Locale.ROOT, + "Deserialization for VPCNetworkRangeIPv6 failed with `%s`.", + e.getMessage())); + log.log( + Level.FINER, + "Input data does not match schema 'VPCNetworkRangeIPv6'", + e); + } + + if (match == 1) { + VPCNetworkRange ret = new VPCNetworkRange(); + ret.setActualInstance(actualAdapter.fromJsonTree(jsonElement)); + return ret; + } + + throw new IOException( + String.format( + java.util.Locale.ROOT, + "Failed deserialization for VPCNetworkRange: %d classes match result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", + match, + errorMessages, + jsonElement.toString())); + } + }.nullSafe(); + } + } + + // store a list of schema names defined in oneOf + public static final Map> schemas = new HashMap>(); + + public VPCNetworkRange() { + super("oneOf", Boolean.FALSE); + } + + public VPCNetworkRange(Object o) { + super("oneOf", Boolean.FALSE); + setActualInstance(o); + } + + static { + schemas.put("VPCNetworkRangeIPv4", VPCNetworkRangeIPv4.class); + schemas.put("VPCNetworkRangeIPv6", VPCNetworkRangeIPv6.class); + } + + @Override + public Map> getSchemas() { + return VPCNetworkRange.schemas; + } + + /** + * Set the instance that matches the oneOf child schema, check the instance parameter is valid + * against the oneOf child schemas: VPCNetworkRangeIPv4, VPCNetworkRangeIPv6 + * + *

It could be an instance of the 'oneOf' schemas. + */ + @Override + public void setActualInstance(Object instance) { + if (instance instanceof VPCNetworkRangeIPv4) { + super.setActualInstance(instance); + return; + } + + if (instance instanceof VPCNetworkRangeIPv6) { + super.setActualInstance(instance); + return; + } + + throw new RuntimeException( + "Invalid instance type. Must be VPCNetworkRangeIPv4, VPCNetworkRangeIPv6"); + } + + /** + * Get the actual instance, which can be the following: VPCNetworkRangeIPv4, VPCNetworkRangeIPv6 + * + * @return The actual instance (VPCNetworkRangeIPv4, VPCNetworkRangeIPv6) + */ + @SuppressWarnings("unchecked") + @Override + public Object getActualInstance() { + return super.getActualInstance(); + } + + /** + * Get the actual instance of `VPCNetworkRangeIPv4`. If the actual instance is not + * `VPCNetworkRangeIPv4`, the ClassCastException will be thrown. + * + * @return The actual instance of `VPCNetworkRangeIPv4` + * @throws ClassCastException if the instance is not `VPCNetworkRangeIPv4` + */ + public VPCNetworkRangeIPv4 getVPCNetworkRangeIPv4() throws ClassCastException { + return (VPCNetworkRangeIPv4) super.getActualInstance(); + } + + /** + * Get the actual instance of `VPCNetworkRangeIPv6`. If the actual instance is not + * `VPCNetworkRangeIPv6`, the ClassCastException will be thrown. + * + * @return The actual instance of `VPCNetworkRangeIPv6` + * @throws ClassCastException if the instance is not `VPCNetworkRangeIPv6` + */ + public VPCNetworkRangeIPv6 getVPCNetworkRangeIPv6() throws ClassCastException { + return (VPCNetworkRangeIPv6) super.getActualInstance(); + } + + /** + * 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 VPCNetworkRange + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + // validate oneOf schemas one by one + int validCount = 0; + ArrayList errorMessages = new ArrayList<>(); + // validate the json string with VPCNetworkRangeIPv4 + try { + VPCNetworkRangeIPv4.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format( + java.util.Locale.ROOT, + "Deserialization for VPCNetworkRangeIPv4 failed with `%s`.", + e.getMessage())); + // continue to the next one + } + // validate the json string with VPCNetworkRangeIPv6 + try { + VPCNetworkRangeIPv6.validateJsonElement(jsonElement); + validCount++; + } catch (Exception e) { + errorMessages.add( + String.format( + java.util.Locale.ROOT, + "Deserialization for VPCNetworkRangeIPv6 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 VPCNetworkRange with oneOf schemas: VPCNetworkRangeIPv4, VPCNetworkRangeIPv6. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", + validCount, + errorMessages, + jsonElement.toString())); + } + } + + /** + * Create an instance of VPCNetworkRange given an JSON string + * + * @param jsonString JSON string + * @return An instance of VPCNetworkRange + * @throws IOException if the JSON string is invalid with respect to VPCNetworkRange + */ + public static VPCNetworkRange fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, VPCNetworkRange.class); + } + + /** + * Convert an instance of VPCNetworkRange 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/v2alpha1api/model/VPCNetworkRangeIPv4.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/VPCNetworkRangeIPv4.java new file mode 100644 index 00000000..be2f7956 --- /dev/null +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/VPCNetworkRangeIPv4.java @@ -0,0 +1,704 @@ +/* + * STACKIT IaaS API + * This API allows you to create and modify IaaS resources. + * + * The version of the OpenAPI document: 2alpha1 + * 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.v2alpha1api.model; + +import cloud.stackit.sdk.iaas.v2alpha1api.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.time.OffsetDateTime; +import java.util.ArrayList; +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; + +/** Contains the IPv4 properties of a VPC network range. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.19.0") +public class VPCNetworkRangeIPv4 { + 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) + @javax.annotation.Nullable private String description; + + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable private UUID id; + + public static final String SERIALIZED_NAME_LABELS = "labels"; + + @SerializedName(SERIALIZED_NAME_LABELS) + @javax.annotation.Nullable private Object labels; + + public static final String SERIALIZED_NAME_STATUS = "status"; + + @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nullable private String status; + + public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; + + @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @javax.annotation.Nullable private OffsetDateTime updatedAt; + + public static final String SERIALIZED_NAME_DEFAULT_PREFIX_LEN = "defaultPrefixLen"; + + @SerializedName(SERIALIZED_NAME_DEFAULT_PREFIX_LEN) + @javax.annotation.Nullable private Long defaultPrefixLen = 25l; + + /** Gets or Sets ipVersion */ + @JsonAdapter(IpVersionEnum.Adapter.class) + public enum IpVersionEnum { + IPV4("ipv4"), + + UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api"); + + private String value; + + IpVersionEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static IpVersionEnum fromValue(String value) { + for (IpVersionEnum b : IpVersionEnum.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 IpVersionEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public IpVersionEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return IpVersionEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + IpVersionEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_IP_VERSION = "ipVersion"; + + @SerializedName(SERIALIZED_NAME_IP_VERSION) + @javax.annotation.Nonnull + private IpVersionEnum ipVersion; + + public static final String SERIALIZED_NAME_MAX_PREFIX_LEN = "maxPrefixLen"; + + @SerializedName(SERIALIZED_NAME_MAX_PREFIX_LEN) + @javax.annotation.Nullable private Long maxPrefixLen = 29l; + + public static final String SERIALIZED_NAME_MIN_PREFIX_LEN = "minPrefixLen"; + + @SerializedName(SERIALIZED_NAME_MIN_PREFIX_LEN) + @javax.annotation.Nullable private Long minPrefixLen = 24l; + + public static final String SERIALIZED_NAME_NAMESERVERS = "nameservers"; + + @SerializedName(SERIALIZED_NAME_NAMESERVERS) + @javax.annotation.Nullable private List nameservers; + + public static final String SERIALIZED_NAME_PREFIX = "prefix"; + + @SerializedName(SERIALIZED_NAME_PREFIX) + @javax.annotation.Nonnull + private String prefix; + + public VPCNetworkRangeIPv4() {} + + public VPCNetworkRangeIPv4(OffsetDateTime createdAt, UUID id, OffsetDateTime updatedAt) { + this(); + this.createdAt = createdAt; + this.id = id; + this.updatedAt = updatedAt; + } + + /** + * Date-time when resource was created. + * + * @return createdAt + */ + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public VPCNetworkRangeIPv4 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; + } + + /** + * Universally Unique Identifier (UUID). + * + * @return id + */ + @javax.annotation.Nullable public UUID getId() { + return id; + } + + public VPCNetworkRangeIPv4 labels(@javax.annotation.Nullable Object labels) { + this.labels = labels; + return this; + } + + /** + * 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. + * + * @return labels + */ + @javax.annotation.Nullable public Object getLabels() { + return labels; + } + + public void setLabels(@javax.annotation.Nullable Object labels) { + this.labels = labels; + } + + public VPCNetworkRangeIPv4 status(@javax.annotation.Nullable String status) { + this.status = status; + return this; + } + + /** + * The state of a resource object. Possible values: `CREATING`, `CREATED`, + * `DELETING`, `DELETED`, `FAILED`, `UPDATED`, + * `UPDATING`. + * + * @return status + */ + @javax.annotation.Nullable public String getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nullable String status) { + this.status = status; + } + + /** + * Date-time when resource was last updated. + * + * @return updatedAt + */ + @javax.annotation.Nullable public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + public VPCNetworkRangeIPv4 defaultPrefixLen(@javax.annotation.Nullable Long defaultPrefixLen) { + this.defaultPrefixLen = defaultPrefixLen; + return this; + } + + /** + * The default prefix length for network ranges in the VPC. minimum: 24 maximum: 29 + * + * @return defaultPrefixLen + */ + @javax.annotation.Nullable public Long getDefaultPrefixLen() { + return defaultPrefixLen; + } + + public void setDefaultPrefixLen(@javax.annotation.Nullable Long defaultPrefixLen) { + this.defaultPrefixLen = defaultPrefixLen; + } + + public VPCNetworkRangeIPv4 ipVersion(@javax.annotation.Nonnull IpVersionEnum ipVersion) { + this.ipVersion = ipVersion; + return this; + } + + /** + * Get ipVersion + * + * @return ipVersion + */ + @javax.annotation.Nonnull + public IpVersionEnum getIpVersion() { + return ipVersion; + } + + public void setIpVersion(@javax.annotation.Nonnull IpVersionEnum ipVersion) { + this.ipVersion = ipVersion; + } + + public VPCNetworkRangeIPv4 maxPrefixLen(@javax.annotation.Nullable Long maxPrefixLen) { + this.maxPrefixLen = maxPrefixLen; + return this; + } + + /** + * The maximal prefix length for network ranges in the VPC. minimum: 24 maximum: 29 + * + * @return maxPrefixLen + */ + @javax.annotation.Nullable public Long getMaxPrefixLen() { + return maxPrefixLen; + } + + public void setMaxPrefixLen(@javax.annotation.Nullable Long maxPrefixLen) { + this.maxPrefixLen = maxPrefixLen; + } + + public VPCNetworkRangeIPv4 minPrefixLen(@javax.annotation.Nullable Long minPrefixLen) { + this.minPrefixLen = minPrefixLen; + return this; + } + + /** + * The minimal prefix length for network ranges in the VPC. minimum: 8 maximum: 29 + * + * @return minPrefixLen + */ + @javax.annotation.Nullable public Long getMinPrefixLen() { + return minPrefixLen; + } + + public void setMinPrefixLen(@javax.annotation.Nullable Long minPrefixLen) { + this.minPrefixLen = minPrefixLen; + } + + public VPCNetworkRangeIPv4 nameservers(@javax.annotation.Nullable List nameservers) { + this.nameservers = nameservers; + return this; + } + + public VPCNetworkRangeIPv4 addNameserversItem(String nameserversItem) { + if (this.nameservers == null) { + this.nameservers = new ArrayList<>(); + } + this.nameservers.add(nameserversItem); + return this; + } + + /** + * A list containing DNS Servers/Nameservers for IPv4. + * + * @return nameservers + */ + @javax.annotation.Nullable public List getNameservers() { + return nameservers; + } + + public void setNameservers(@javax.annotation.Nullable List nameservers) { + this.nameservers = nameservers; + } + + public VPCNetworkRangeIPv4 prefix(@javax.annotation.Nonnull String prefix) { + this.prefix = prefix; + return this; + } + + /** + * Classless Inter-Domain Routing (CIDR). + * + * @return prefix + */ + @javax.annotation.Nonnull + public String getPrefix() { + return prefix; + } + + public void setPrefix(@javax.annotation.Nonnull String prefix) { + this.prefix = prefix; + } + + /** + * 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 VPCNetworkRangeIPv4 instance itself + */ + public VPCNetworkRangeIPv4 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; + } + VPCNetworkRangeIPv4 vpCNetworkRangeIPv4 = (VPCNetworkRangeIPv4) o; + return Objects.equals(this.createdAt, vpCNetworkRangeIPv4.createdAt) + && Objects.equals(this.description, vpCNetworkRangeIPv4.description) + && Objects.equals(this.id, vpCNetworkRangeIPv4.id) + && Objects.equals(this.labels, vpCNetworkRangeIPv4.labels) + && Objects.equals(this.status, vpCNetworkRangeIPv4.status) + && Objects.equals(this.updatedAt, vpCNetworkRangeIPv4.updatedAt) + && Objects.equals(this.defaultPrefixLen, vpCNetworkRangeIPv4.defaultPrefixLen) + && Objects.equals(this.ipVersion, vpCNetworkRangeIPv4.ipVersion) + && Objects.equals(this.maxPrefixLen, vpCNetworkRangeIPv4.maxPrefixLen) + && Objects.equals(this.minPrefixLen, vpCNetworkRangeIPv4.minPrefixLen) + && Objects.equals(this.nameservers, vpCNetworkRangeIPv4.nameservers) + && Objects.equals(this.prefix, vpCNetworkRangeIPv4.prefix) + && Objects.equals( + this.additionalProperties, vpCNetworkRangeIPv4.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + createdAt, + description, + id, + labels, + status, + updatedAt, + defaultPrefixLen, + ipVersion, + maxPrefixLen, + minPrefixLen, + nameservers, + prefix, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class VPCNetworkRangeIPv4 {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" labels: ").append(toIndentedString(labels)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" defaultPrefixLen: ").append(toIndentedString(defaultPrefixLen)).append("\n"); + sb.append(" ipVersion: ").append(toIndentedString(ipVersion)).append("\n"); + sb.append(" maxPrefixLen: ").append(toIndentedString(maxPrefixLen)).append("\n"); + sb.append(" minPrefixLen: ").append(toIndentedString(minPrefixLen)).append("\n"); + sb.append(" nameservers: ").append(toIndentedString(nameservers)).append("\n"); + sb.append(" prefix: ").append(toIndentedString(prefix)).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( + "createdAt", + "description", + "id", + "labels", + "status", + "updatedAt", + "defaultPrefixLen", + "ipVersion", + "maxPrefixLen", + "minPrefixLen", + "nameservers", + "prefix")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("ipVersion", "prefix")); + } + + /** + * 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 VPCNetworkRangeIPv4 + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!VPCNetworkRangeIPv4.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 VPCNetworkRangeIPv4 is not found in the empty JSON string", + VPCNetworkRangeIPv4.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : VPCNetworkRangeIPv4.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("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("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `id` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("id").toString())); + } + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) + && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `status` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("status").toString())); + } + if (!jsonObj.get("ipVersion").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `ipVersion` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("ipVersion").toString())); + } + // validate the required field `ipVersion` + IpVersionEnum.validateJsonElement(jsonObj.get("ipVersion")); + // ensure the optional json data is an array if present + if (jsonObj.get("nameservers") != null + && !jsonObj.get("nameservers").isJsonNull() + && !jsonObj.get("nameservers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `nameservers` to be an array in the JSON string but got `%s`", + jsonObj.get("nameservers").toString())); + } + if (!jsonObj.get("prefix").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `prefix` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("prefix").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!VPCNetworkRangeIPv4.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'VPCNetworkRangeIPv4' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(VPCNetworkRangeIPv4.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, VPCNetworkRangeIPv4 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 VPCNetworkRangeIPv4 read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + VPCNetworkRangeIPv4 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 VPCNetworkRangeIPv4 given an JSON string + * + * @param jsonString JSON string + * @return An instance of VPCNetworkRangeIPv4 + * @throws IOException if the JSON string is invalid with respect to VPCNetworkRangeIPv4 + */ + public static VPCNetworkRangeIPv4 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, VPCNetworkRangeIPv4.class); + } + + /** + * Convert an instance of VPCNetworkRangeIPv4 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/v2alpha1api/model/VPCNetworkRangeIPv6.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/VPCNetworkRangeIPv6.java new file mode 100644 index 00000000..96414a07 --- /dev/null +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/VPCNetworkRangeIPv6.java @@ -0,0 +1,704 @@ +/* + * STACKIT IaaS API + * This API allows you to create and modify IaaS resources. + * + * The version of the OpenAPI document: 2alpha1 + * 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.v2alpha1api.model; + +import cloud.stackit.sdk.iaas.v2alpha1api.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.time.OffsetDateTime; +import java.util.ArrayList; +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; + +/** Contains the IPv6 properties of a VPC network range. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.19.0") +public class VPCNetworkRangeIPv6 { + 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) + @javax.annotation.Nullable private String description; + + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable private UUID id; + + public static final String SERIALIZED_NAME_LABELS = "labels"; + + @SerializedName(SERIALIZED_NAME_LABELS) + @javax.annotation.Nullable private Object labels; + + public static final String SERIALIZED_NAME_STATUS = "status"; + + @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nullable private String status; + + public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; + + @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @javax.annotation.Nullable private OffsetDateTime updatedAt; + + public static final String SERIALIZED_NAME_DEFAULT_PREFIX_LEN = "defaultPrefixLen"; + + @SerializedName(SERIALIZED_NAME_DEFAULT_PREFIX_LEN) + @javax.annotation.Nullable private Long defaultPrefixLen; + + /** Gets or Sets ipVersion */ + @JsonAdapter(IpVersionEnum.Adapter.class) + public enum IpVersionEnum { + IPV6("ipv6"), + + UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api"); + + private String value; + + IpVersionEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static IpVersionEnum fromValue(String value) { + for (IpVersionEnum b : IpVersionEnum.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 IpVersionEnum enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public IpVersionEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return IpVersionEnum.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + IpVersionEnum.fromValue(value); + } + } + + public static final String SERIALIZED_NAME_IP_VERSION = "ipVersion"; + + @SerializedName(SERIALIZED_NAME_IP_VERSION) + @javax.annotation.Nonnull + private IpVersionEnum ipVersion; + + public static final String SERIALIZED_NAME_MAX_PREFIX_LEN = "maxPrefixLen"; + + @SerializedName(SERIALIZED_NAME_MAX_PREFIX_LEN) + @javax.annotation.Nullable private Long maxPrefixLen; + + public static final String SERIALIZED_NAME_MIN_PREFIX_LEN = "minPrefixLen"; + + @SerializedName(SERIALIZED_NAME_MIN_PREFIX_LEN) + @javax.annotation.Nullable private Long minPrefixLen; + + public static final String SERIALIZED_NAME_NAMESERVERS = "nameservers"; + + @SerializedName(SERIALIZED_NAME_NAMESERVERS) + @javax.annotation.Nullable private List nameservers; + + public static final String SERIALIZED_NAME_PREFIX = "prefix"; + + @SerializedName(SERIALIZED_NAME_PREFIX) + @javax.annotation.Nonnull + private String prefix; + + public VPCNetworkRangeIPv6() {} + + public VPCNetworkRangeIPv6(OffsetDateTime createdAt, UUID id, OffsetDateTime updatedAt) { + this(); + this.createdAt = createdAt; + this.id = id; + this.updatedAt = updatedAt; + } + + /** + * Date-time when resource was created. + * + * @return createdAt + */ + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public VPCNetworkRangeIPv6 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; + } + + /** + * Universally Unique Identifier (UUID). + * + * @return id + */ + @javax.annotation.Nullable public UUID getId() { + return id; + } + + public VPCNetworkRangeIPv6 labels(@javax.annotation.Nullable Object labels) { + this.labels = labels; + return this; + } + + /** + * 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. + * + * @return labels + */ + @javax.annotation.Nullable public Object getLabels() { + return labels; + } + + public void setLabels(@javax.annotation.Nullable Object labels) { + this.labels = labels; + } + + public VPCNetworkRangeIPv6 status(@javax.annotation.Nullable String status) { + this.status = status; + return this; + } + + /** + * The state of a resource object. Possible values: `CREATING`, `CREATED`, + * `DELETING`, `DELETED`, `FAILED`, `UPDATED`, + * `UPDATING`. + * + * @return status + */ + @javax.annotation.Nullable public String getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nullable String status) { + this.status = status; + } + + /** + * Date-time when resource was last updated. + * + * @return updatedAt + */ + @javax.annotation.Nullable public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + public VPCNetworkRangeIPv6 defaultPrefixLen(@javax.annotation.Nullable Long defaultPrefixLen) { + this.defaultPrefixLen = defaultPrefixLen; + return this; + } + + /** + * The ipv6 prefix lengths for subnets or network ranges in the VPC. minimum: 0 maximum: 128 + * + * @return defaultPrefixLen + */ + @javax.annotation.Nullable public Long getDefaultPrefixLen() { + return defaultPrefixLen; + } + + public void setDefaultPrefixLen(@javax.annotation.Nullable Long defaultPrefixLen) { + this.defaultPrefixLen = defaultPrefixLen; + } + + public VPCNetworkRangeIPv6 ipVersion(@javax.annotation.Nonnull IpVersionEnum ipVersion) { + this.ipVersion = ipVersion; + return this; + } + + /** + * Get ipVersion + * + * @return ipVersion + */ + @javax.annotation.Nonnull + public IpVersionEnum getIpVersion() { + return ipVersion; + } + + public void setIpVersion(@javax.annotation.Nonnull IpVersionEnum ipVersion) { + this.ipVersion = ipVersion; + } + + public VPCNetworkRangeIPv6 maxPrefixLen(@javax.annotation.Nullable Long maxPrefixLen) { + this.maxPrefixLen = maxPrefixLen; + return this; + } + + /** + * The ipv6 prefix lengths for subnets or network ranges in the VPC. minimum: 0 maximum: 128 + * + * @return maxPrefixLen + */ + @javax.annotation.Nullable public Long getMaxPrefixLen() { + return maxPrefixLen; + } + + public void setMaxPrefixLen(@javax.annotation.Nullable Long maxPrefixLen) { + this.maxPrefixLen = maxPrefixLen; + } + + public VPCNetworkRangeIPv6 minPrefixLen(@javax.annotation.Nullable Long minPrefixLen) { + this.minPrefixLen = minPrefixLen; + return this; + } + + /** + * The ipv6 prefix lengths for subnets or network ranges in the VPC. minimum: 0 maximum: 128 + * + * @return minPrefixLen + */ + @javax.annotation.Nullable public Long getMinPrefixLen() { + return minPrefixLen; + } + + public void setMinPrefixLen(@javax.annotation.Nullable Long minPrefixLen) { + this.minPrefixLen = minPrefixLen; + } + + public VPCNetworkRangeIPv6 nameservers(@javax.annotation.Nullable List nameservers) { + this.nameservers = nameservers; + return this; + } + + public VPCNetworkRangeIPv6 addNameserversItem(String nameserversItem) { + if (this.nameservers == null) { + this.nameservers = new ArrayList<>(); + } + this.nameservers.add(nameserversItem); + return this; + } + + /** + * A list containing DNS Servers/Nameservers for IPv6. + * + * @return nameservers + */ + @javax.annotation.Nullable public List getNameservers() { + return nameservers; + } + + public void setNameservers(@javax.annotation.Nullable List nameservers) { + this.nameservers = nameservers; + } + + public VPCNetworkRangeIPv6 prefix(@javax.annotation.Nonnull String prefix) { + this.prefix = prefix; + return this; + } + + /** + * Classless Inter-Domain Routing (CIDR) for IPv6. + * + * @return prefix + */ + @javax.annotation.Nonnull + public String getPrefix() { + return prefix; + } + + public void setPrefix(@javax.annotation.Nonnull String prefix) { + this.prefix = prefix; + } + + /** + * 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 VPCNetworkRangeIPv6 instance itself + */ + public VPCNetworkRangeIPv6 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; + } + VPCNetworkRangeIPv6 vpCNetworkRangeIPv6 = (VPCNetworkRangeIPv6) o; + return Objects.equals(this.createdAt, vpCNetworkRangeIPv6.createdAt) + && Objects.equals(this.description, vpCNetworkRangeIPv6.description) + && Objects.equals(this.id, vpCNetworkRangeIPv6.id) + && Objects.equals(this.labels, vpCNetworkRangeIPv6.labels) + && Objects.equals(this.status, vpCNetworkRangeIPv6.status) + && Objects.equals(this.updatedAt, vpCNetworkRangeIPv6.updatedAt) + && Objects.equals(this.defaultPrefixLen, vpCNetworkRangeIPv6.defaultPrefixLen) + && Objects.equals(this.ipVersion, vpCNetworkRangeIPv6.ipVersion) + && Objects.equals(this.maxPrefixLen, vpCNetworkRangeIPv6.maxPrefixLen) + && Objects.equals(this.minPrefixLen, vpCNetworkRangeIPv6.minPrefixLen) + && Objects.equals(this.nameservers, vpCNetworkRangeIPv6.nameservers) + && Objects.equals(this.prefix, vpCNetworkRangeIPv6.prefix) + && Objects.equals( + this.additionalProperties, vpCNetworkRangeIPv6.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + createdAt, + description, + id, + labels, + status, + updatedAt, + defaultPrefixLen, + ipVersion, + maxPrefixLen, + minPrefixLen, + nameservers, + prefix, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class VPCNetworkRangeIPv6 {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" labels: ").append(toIndentedString(labels)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" defaultPrefixLen: ").append(toIndentedString(defaultPrefixLen)).append("\n"); + sb.append(" ipVersion: ").append(toIndentedString(ipVersion)).append("\n"); + sb.append(" maxPrefixLen: ").append(toIndentedString(maxPrefixLen)).append("\n"); + sb.append(" minPrefixLen: ").append(toIndentedString(minPrefixLen)).append("\n"); + sb.append(" nameservers: ").append(toIndentedString(nameservers)).append("\n"); + sb.append(" prefix: ").append(toIndentedString(prefix)).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( + "createdAt", + "description", + "id", + "labels", + "status", + "updatedAt", + "defaultPrefixLen", + "ipVersion", + "maxPrefixLen", + "minPrefixLen", + "nameservers", + "prefix")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("ipVersion", "prefix")); + } + + /** + * 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 VPCNetworkRangeIPv6 + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!VPCNetworkRangeIPv6.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 VPCNetworkRangeIPv6 is not found in the empty JSON string", + VPCNetworkRangeIPv6.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : VPCNetworkRangeIPv6.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("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("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `id` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("id").toString())); + } + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) + && !jsonObj.get("status").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `status` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("status").toString())); + } + if (!jsonObj.get("ipVersion").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `ipVersion` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("ipVersion").toString())); + } + // validate the required field `ipVersion` + IpVersionEnum.validateJsonElement(jsonObj.get("ipVersion")); + // ensure the optional json data is an array if present + if (jsonObj.get("nameservers") != null + && !jsonObj.get("nameservers").isJsonNull() + && !jsonObj.get("nameservers").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `nameservers` to be an array in the JSON string but got `%s`", + jsonObj.get("nameservers").toString())); + } + if (!jsonObj.get("prefix").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `prefix` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("prefix").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!VPCNetworkRangeIPv6.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'VPCNetworkRangeIPv6' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(VPCNetworkRangeIPv6.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, VPCNetworkRangeIPv6 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 VPCNetworkRangeIPv6 read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + VPCNetworkRangeIPv6 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 VPCNetworkRangeIPv6 given an JSON string + * + * @param jsonString JSON string + * @return An instance of VPCNetworkRangeIPv6 + * @throws IOException if the JSON string is invalid with respect to VPCNetworkRangeIPv6 + */ + public static VPCNetworkRangeIPv6 fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, VPCNetworkRangeIPv6.class); + } + + /** + * Convert an instance of VPCNetworkRangeIPv6 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/v2alpha1api/model/VPCNetworkRangeList.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/VPCNetworkRangeList.java new file mode 100644 index 00000000..096e9e8e --- /dev/null +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/VPCNetworkRangeList.java @@ -0,0 +1,326 @@ +/* + * STACKIT IaaS API + * This API allows you to create and modify IaaS resources. + * + * The version of the OpenAPI document: 2alpha1 + * 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.v2alpha1api.model; + +import cloud.stackit.sdk.iaas.v2alpha1api.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonArray; +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.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.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** VPC Network Range list response. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.19.0") +public class VPCNetworkRangeList { + public static final String SERIALIZED_NAME_ITEMS = "items"; + + @SerializedName(SERIALIZED_NAME_ITEMS) + @javax.annotation.Nonnull + private List items = new ArrayList<>(); + + public VPCNetworkRangeList() {} + + public VPCNetworkRangeList items(@javax.annotation.Nonnull List items) { + this.items = items; + return this; + } + + public VPCNetworkRangeList addItemsItem(VPCNetworkRange itemsItem) { + if (this.items == null) { + this.items = new ArrayList<>(); + } + this.items.add(itemsItem); + return this; + } + + /** + * A list of VPC network ranges. + * + * @return items + */ + @javax.annotation.Nonnull + public List getItems() { + return items; + } + + public void setItems(@javax.annotation.Nonnull List items) { + this.items = items; + } + + /** + * 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 VPCNetworkRangeList instance itself + */ + public VPCNetworkRangeList 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; + } + VPCNetworkRangeList vpCNetworkRangeList = (VPCNetworkRangeList) o; + return Objects.equals(this.items, vpCNetworkRangeList.items) + && Objects.equals( + this.additionalProperties, vpCNetworkRangeList.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(items, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class VPCNetworkRangeList {\n"); + sb.append(" items: ").append(toIndentedString(items)).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("items")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("items")); + } + + /** + * 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 VPCNetworkRangeList + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!VPCNetworkRangeList.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 VPCNetworkRangeList is not found in the empty JSON string", + VPCNetworkRangeList.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : VPCNetworkRangeList.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(); + // ensure the json data is an array + if (!jsonObj.get("items").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `items` to be an array in the JSON string but got `%s`", + jsonObj.get("items").toString())); + } + + JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); + // validate the required field `items` (array) + for (int i = 0; i < jsonArrayitems.size(); i++) { + VPCNetworkRange.validateJsonElement(jsonArrayitems.get(i)); + } + ; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!VPCNetworkRangeList.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'VPCNetworkRangeList' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(VPCNetworkRangeList.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, VPCNetworkRangeList 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 VPCNetworkRangeList read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + VPCNetworkRangeList 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 VPCNetworkRangeList given an JSON string + * + * @param jsonString JSON string + * @return An instance of VPCNetworkRangeList + * @throws IOException if the JSON string is invalid with respect to VPCNetworkRangeList + */ + public static VPCNetworkRangeList fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, VPCNetworkRangeList.class); + } + + /** + * Convert an instance of VPCNetworkRangeList 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/v2alpha1api/model/VPCRoutingTable.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/VPCRoutingTable.java new file mode 100644 index 00000000..71f39366 --- /dev/null +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/VPCRoutingTable.java @@ -0,0 +1,508 @@ +/* + * STACKIT IaaS API + * This API allows you to create and modify IaaS resources. + * + * The version of the OpenAPI document: 2alpha1 + * 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.v2alpha1api.model; + +import cloud.stackit.sdk.iaas.v2alpha1api.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.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.time.OffsetDateTime; +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; + +/** + * An object representing a VPC routing table. Filterable Fields: `createdAt`, + * `dynamicRoutes`, `name`, `systemRoutes`, `updatedAt`. + */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.19.0") +public class VPCRoutingTable { + 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) + @javax.annotation.Nullable private String description; + + public static final String SERIALIZED_NAME_DYNAMIC_ROUTES = "dynamicRoutes"; + + @SerializedName(SERIALIZED_NAME_DYNAMIC_ROUTES) + @javax.annotation.Nullable private Boolean dynamicRoutes = true; + + public static final String SERIALIZED_NAME_ID = "id"; + + @SerializedName(SERIALIZED_NAME_ID) + @javax.annotation.Nullable private UUID id; + + public static final String SERIALIZED_NAME_LABELS = "labels"; + + @SerializedName(SERIALIZED_NAME_LABELS) + @javax.annotation.Nullable private Object labels; + + public static final String SERIALIZED_NAME_NAME = "name"; + + @SerializedName(SERIALIZED_NAME_NAME) + @javax.annotation.Nonnull + private String name; + + public static final String SERIALIZED_NAME_SYSTEM_ROUTES = "systemRoutes"; + + @SerializedName(SERIALIZED_NAME_SYSTEM_ROUTES) + @javax.annotation.Nullable private Boolean systemRoutes = true; + + public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt"; + + @SerializedName(SERIALIZED_NAME_UPDATED_AT) + @javax.annotation.Nullable private OffsetDateTime updatedAt; + + public VPCRoutingTable() {} + + public VPCRoutingTable(OffsetDateTime createdAt, UUID id, OffsetDateTime updatedAt) { + this(); + this.createdAt = createdAt; + this.id = id; + this.updatedAt = updatedAt; + } + + /** + * Date-time when resource was created. + * + * @return createdAt + */ + @javax.annotation.Nullable public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public VPCRoutingTable 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 VPCRoutingTable dynamicRoutes(@javax.annotation.Nullable Boolean dynamicRoutes) { + this.dynamicRoutes = dynamicRoutes; + return this; + } + + /** + * A config setting for a routing table which allows propagation of dynamic routes to this + * routing table. + * + * @return dynamicRoutes + */ + @javax.annotation.Nullable public Boolean getDynamicRoutes() { + return dynamicRoutes; + } + + public void setDynamicRoutes(@javax.annotation.Nullable Boolean dynamicRoutes) { + this.dynamicRoutes = dynamicRoutes; + } + + /** + * Universally Unique Identifier (UUID). + * + * @return id + */ + @javax.annotation.Nullable public UUID getId() { + return id; + } + + public VPCRoutingTable labels(@javax.annotation.Nullable Object labels) { + this.labels = labels; + return this; + } + + /** + * 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. + * + * @return labels + */ + @javax.annotation.Nullable public Object getLabels() { + return labels; + } + + public void setLabels(@javax.annotation.Nullable Object labels) { + this.labels = labels; + } + + public VPCRoutingTable name(@javax.annotation.Nonnull String name) { + this.name = name; + return this; + } + + /** + * The name for a General Object. Matches Names and also UUIDs. + * + * @return name + */ + @javax.annotation.Nonnull + public String getName() { + return name; + } + + public void setName(@javax.annotation.Nonnull String name) { + this.name = name; + } + + public VPCRoutingTable systemRoutes(@javax.annotation.Nullable Boolean systemRoutes) { + this.systemRoutes = systemRoutes; + return this; + } + + /** + * A config setting for a routing table which allows installation of automatic system routes for + * connectivity between projects in the same SNA. + * + * @return systemRoutes + */ + @javax.annotation.Nullable public Boolean getSystemRoutes() { + return systemRoutes; + } + + public void setSystemRoutes(@javax.annotation.Nullable Boolean systemRoutes) { + this.systemRoutes = systemRoutes; + } + + /** + * 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. + */ + 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 VPCRoutingTable instance itself + */ + public VPCRoutingTable 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; + } + VPCRoutingTable vpCRoutingTable = (VPCRoutingTable) o; + return Objects.equals(this.createdAt, vpCRoutingTable.createdAt) + && Objects.equals(this.description, vpCRoutingTable.description) + && Objects.equals(this.dynamicRoutes, vpCRoutingTable.dynamicRoutes) + && Objects.equals(this.id, vpCRoutingTable.id) + && Objects.equals(this.labels, vpCRoutingTable.labels) + && Objects.equals(this.name, vpCRoutingTable.name) + && Objects.equals(this.systemRoutes, vpCRoutingTable.systemRoutes) + && Objects.equals(this.updatedAt, vpCRoutingTable.updatedAt) + && Objects.equals(this.additionalProperties, vpCRoutingTable.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + createdAt, + description, + dynamicRoutes, + id, + labels, + name, + systemRoutes, + updatedAt, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class VPCRoutingTable {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" dynamicRoutes: ").append(toIndentedString(dynamicRoutes)).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"); + sb.append(" systemRoutes: ").append(toIndentedString(systemRoutes)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).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( + "createdAt", + "description", + "dynamicRoutes", + "id", + "labels", + "name", + "systemRoutes", + "updatedAt")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("name")); + } + + /** + * 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 VPCRoutingTable + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!VPCRoutingTable.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 VPCRoutingTable is not found in the empty JSON string", + VPCRoutingTable.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : VPCRoutingTable.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("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("id") != null && !jsonObj.get("id").isJsonNull()) + && !jsonObj.get("id").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `id` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("id").toString())); + } + if (!jsonObj.get("name").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `name` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("name").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!VPCRoutingTable.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'VPCRoutingTable' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(VPCRoutingTable.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, VPCRoutingTable 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 VPCRoutingTable read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + VPCRoutingTable 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 VPCRoutingTable given an JSON string + * + * @param jsonString JSON string + * @return An instance of VPCRoutingTable + * @throws IOException if the JSON string is invalid with respect to VPCRoutingTable + */ + public static VPCRoutingTable fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, VPCRoutingTable.class); + } + + /** + * Convert an instance of VPCRoutingTable 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/v2alpha1api/model/VPCRoutingTableList.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/VPCRoutingTableList.java new file mode 100644 index 00000000..f3042e56 --- /dev/null +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/model/VPCRoutingTableList.java @@ -0,0 +1,326 @@ +/* + * STACKIT IaaS API + * This API allows you to create and modify IaaS resources. + * + * The version of the OpenAPI document: 2alpha1 + * 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.v2alpha1api.model; + +import cloud.stackit.sdk.iaas.v2alpha1api.JSON; +import com.google.gson.Gson; +import com.google.gson.JsonArray; +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.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.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** VPC Routing table response. */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.19.0") +public class VPCRoutingTableList { + public static final String SERIALIZED_NAME_ITEMS = "items"; + + @SerializedName(SERIALIZED_NAME_ITEMS) + @javax.annotation.Nonnull + private List items = new ArrayList<>(); + + public VPCRoutingTableList() {} + + public VPCRoutingTableList items(@javax.annotation.Nonnull List items) { + this.items = items; + return this; + } + + public VPCRoutingTableList addItemsItem(VPCRoutingTable itemsItem) { + if (this.items == null) { + this.items = new ArrayList<>(); + } + this.items.add(itemsItem); + return this; + } + + /** + * A list of VPC routing tables. + * + * @return items + */ + @javax.annotation.Nonnull + public List getItems() { + return items; + } + + public void setItems(@javax.annotation.Nonnull List items) { + this.items = items; + } + + /** + * 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 VPCRoutingTableList instance itself + */ + public VPCRoutingTableList 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; + } + VPCRoutingTableList vpCRoutingTableList = (VPCRoutingTableList) o; + return Objects.equals(this.items, vpCRoutingTableList.items) + && Objects.equals( + this.additionalProperties, vpCRoutingTableList.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(items, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class VPCRoutingTableList {\n"); + sb.append(" items: ").append(toIndentedString(items)).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("items")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("items")); + } + + /** + * 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 VPCRoutingTableList + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!VPCRoutingTableList.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 VPCRoutingTableList is not found in the empty JSON string", + VPCRoutingTableList.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : VPCRoutingTableList.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(); + // ensure the json data is an array + if (!jsonObj.get("items").isJsonArray()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `items` to be an array in the JSON string but got `%s`", + jsonObj.get("items").toString())); + } + + JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); + // validate the required field `items` (array) + for (int i = 0; i < jsonArrayitems.size(); i++) { + VPCRoutingTable.validateJsonElement(jsonArrayitems.get(i)); + } + ; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!VPCRoutingTableList.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'VPCRoutingTableList' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(VPCRoutingTableList.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, VPCRoutingTableList 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 VPCRoutingTableList read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + VPCRoutingTableList 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 VPCRoutingTableList given an JSON string + * + * @param jsonString JSON string + * @return An instance of VPCRoutingTableList + * @throws IOException if the JSON string is invalid with respect to VPCRoutingTableList + */ + public static VPCRoutingTableList fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, VPCRoutingTableList.class); + } + + /** + * Convert an instance of VPCRoutingTableList 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/JSON.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/JSON.java index e5b97e64..abc11672 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 @@ -454,6 +454,8 @@ private static Class getClassByDiscriminator( new cloud.stackit.sdk.iaas.v2api.model.ServerNetwork.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new cloud.stackit.sdk.iaas.v2api.model.ServerNetworking.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new cloud.stackit.sdk.iaas.v2api.model.ServerVTPM.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new cloud.stackit.sdk.iaas.v2api.model.ServiceAccountMailListResponse .CustomTypeAdapterFactory()); diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/api/DefaultApi.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/api/DefaultApi.java index eb68ad37..5284bada 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/api/DefaultApi.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/api/DefaultApi.java @@ -1797,7 +1797,7 @@ private okhttp3.Call addServiceAccountToServerValidateBeforeCall( } /** - * Attach service account to a server. Attach an additional service account to the server. + * Attach service account to a server. Attach a service account to the server. * * @param projectId The identifier (ID) of a STACKIT Project. (required) * @param region The STACKIT Region of the resources. (required) @@ -1832,7 +1832,7 @@ public ServiceAccountMailListResponse addServiceAccountToServer( } /** - * Attach service account to a server. Attach an additional service account to the server. + * Attach service account to a server. Attach a service account to the server. * * @param projectId The identifier (ID) of a STACKIT Project. (required) * @param region The STACKIT Region of the resources. (required) @@ -1868,8 +1868,7 @@ public ApiResponse addServiceAccountToServerWith } /** - * Attach service account to a server. (asynchronously) Attach an additional service account to - * the server. + * Attach service account to a server. (asynchronously) Attach a service account to the server. * * @param projectId The identifier (ID) of a STACKIT Project. (required) * @param region The STACKIT Region of the resources. (required) @@ -2396,6 +2395,7 @@ public okhttp3.Call createAffinityGroupAsync( * 401 A request which was not authorized. - * 403 A request which was forbidden. - * 404 The object was not found. - + * 413 The request entity is too large. - * 500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. - * */ @@ -2511,6 +2511,7 @@ private okhttp3.Call createBackupValidateBeforeCall( * 401 A request which was not authorized. - * 403 A request which was forbidden. - * 404 The object was not found. - + * 413 The request entity is too large. - * 500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. - * */ @@ -2543,6 +2544,7 @@ public Backup createBackup( * 401 A request which was not authorized. - * 403 A request which was forbidden. - * 404 The object was not found. - + * 413 The request entity is too large. - * 500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. - * */ @@ -2577,6 +2579,7 @@ public ApiResponse createBackupWithHttpInfo( * 401 A request which was not authorized. - * 403 A request which was forbidden. - * 404 The object was not found. - + * 413 The request entity is too large. - * 500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. - * */ @@ -2612,6 +2615,7 @@ public okhttp3.Call createBackupAsync( * 401 A request which was not authorized. - * 403 A request which was forbidden. - * 404 The object was not found. - + * 413 The request entity is too large. - * 429 Too Many Requests. - * 500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. - * @@ -2710,8 +2714,8 @@ private okhttp3.Call createImageValidateBeforeCall( } /** - * Create new Image. Create a new Image in a project. This call, if successful, returns a - * pre-signed URL for the customer to upload the image. + * Create new Image. Create a new Image in a project in queued state. Image data must be + * imported separately. This call returns a pre-signed URL to upload small images. * * @param projectId The identifier (ID) of a STACKIT Project. (required) * @param region The STACKIT Region of the resources. (required) @@ -2728,6 +2732,7 @@ private okhttp3.Call createImageValidateBeforeCall( * 401 A request which was not authorized. - * 403 A request which was forbidden. - * 404 The object was not found. - + * 413 The request entity is too large. - * 429 Too Many Requests. - * 500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. - * @@ -2743,8 +2748,8 @@ public ImageCreateResponse createImage( } /** - * Create new Image. Create a new Image in a project. This call, if successful, returns a - * pre-signed URL for the customer to upload the image. + * Create new Image. Create a new Image in a project in queued state. Image data must be + * imported separately. This call returns a pre-signed URL to upload small images. * * @param projectId The identifier (ID) of a STACKIT Project. (required) * @param region The STACKIT Region of the resources. (required) @@ -2761,6 +2766,7 @@ public ImageCreateResponse createImage( * 401 A request which was not authorized. - * 403 A request which was forbidden. - * 404 The object was not found. - + * 413 The request entity is too large. - * 429 Too Many Requests. - * 500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. - * @@ -2777,8 +2783,8 @@ public ApiResponse createImageWithHttpInfo( } /** - * Create new Image. (asynchronously) Create a new Image in a project. This call, if successful, - * returns a pre-signed URL for the customer to upload the image. + * Create new Image. (asynchronously) Create a new Image in a project in queued state. Image + * data must be imported separately. This call returns a pre-signed URL to upload small images. * * @param projectId The identifier (ID) of a STACKIT Project. (required) * @param region The STACKIT Region of the resources. (required) @@ -2796,6 +2802,7 @@ public ApiResponse createImageWithHttpInfo( * 401 A request which was not authorized. - * 403 A request which was forbidden. - * 404 The object was not found. - + * 413 The request entity is too large. - * 429 Too Many Requests. - * 500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. - * @@ -5535,6 +5542,8 @@ public okhttp3.Call createServerAsync( * 401 A request which was not authorized. - * 403 A request which was forbidden. - * 404 The object was not found. - + * 409 A conflict has occurred. - + * 413 The request entity is too large. - * 500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. - * */ @@ -5649,6 +5658,8 @@ private okhttp3.Call createSnapshotValidateBeforeCall( * 401 A request which was not authorized. - * 403 A request which was forbidden. - * 404 The object was not found. - + * 409 A conflict has occurred. - + * 413 The request entity is too large. - * 500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. - * */ @@ -5680,6 +5691,8 @@ public Snapshot createSnapshot( * 401 A request which was not authorized. - * 403 A request which was forbidden. - * 404 The object was not found. - + * 409 A conflict has occurred. - + * 413 The request entity is too large. - * 500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. - * */ @@ -5713,6 +5726,8 @@ public ApiResponse createSnapshotWithHttpInfo( * 401 A request which was not authorized. - * 403 A request which was forbidden. - * 404 The object was not found. - + * 409 A conflict has occurred. - + * 413 The request entity is too large. - * 500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. - * */ @@ -5749,6 +5764,8 @@ public okhttp3.Call createSnapshotAsync( * 401 A request which was not authorized. - * 403 A request which was forbidden. - * 404 The object was not found. - + * 409 A conflict has occurred. - + * 413 The request entity is too large. - * 500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. - * */ @@ -5865,6 +5882,8 @@ private okhttp3.Call createVolumeValidateBeforeCall( * 401 A request which was not authorized. - * 403 A request which was forbidden. - * 404 The object was not found. - + * 409 A conflict has occurred. - + * 413 The request entity is too large. - * 500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. - * */ @@ -5898,6 +5917,8 @@ public Volume createVolume( * 401 A request which was not authorized. - * 403 A request which was forbidden. - * 404 The object was not found. - + * 409 A conflict has occurred. - + * 413 The request entity is too large. - * 500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. - * */ @@ -5933,6 +5954,8 @@ public ApiResponse createVolumeWithHttpInfo( * 401 A request which was not authorized. - * 403 A request which was forbidden. - * 404 The object was not found. - + * 409 A conflict has occurred. - + * 413 The request entity is too large. - * 500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. - * */ @@ -22005,7 +22028,7 @@ public okhttp3.Call listServerNICsAsync( * * * - * + * * * * @@ -22110,7 +22133,7 @@ private okhttp3.Call listServerServiceAccountsValidateBeforeCall( } /** - * List all service accounts of the Server. Get the list of the service accounts of the server. + * List the service account of the Server. Get service account of the server in a list. * * @param projectId The identifier (ID) of a STACKIT Project. (required) * @param region The STACKIT Region of the resources. (required) @@ -22122,7 +22145,7 @@ private okhttp3.Call listServerServiceAccountsValidateBeforeCall( *
Response Details
Status Code Description Response Headers
200 List service accounts. -
200 List service account. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
* * - * + * * * * @@ -22141,7 +22164,7 @@ public ServiceAccountMailListResponse listServerServiceAccounts( } /** - * List all service accounts of the Server. Get the list of the service accounts of the server. + * List the service account of the Server. Get service account of the server in a list. * * @param projectId The identifier (ID) of a STACKIT Project. (required) * @param region The STACKIT Region of the resources. (required) @@ -22153,7 +22176,7 @@ public ServiceAccountMailListResponse listServerServiceAccounts( *
Response Details
Status Code Description Response Headers
200 List service accounts. -
200 List service account. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
* * - * + * * * * @@ -22173,8 +22196,8 @@ public ApiResponse listServerServiceAccountsWith } /** - * List all service accounts of the Server. (asynchronously) Get the list of the service - * accounts of the server. + * List the service account of the Server. (asynchronously) Get service account of the server in + * a list. * * @param projectId The identifier (ID) of a STACKIT Project. (required) * @param region The STACKIT Region of the resources. (required) @@ -22187,7 +22210,7 @@ public ApiResponse listServerServiceAccountsWith *
Response Details
Status Code Description Response Headers
200 List service accounts. -
200 List service account. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
* * - * + * * * * @@ -24835,7 +24858,7 @@ private okhttp3.Call removeServiceAccountFromServerValidateBeforeCall( } /** - * Detach a service account from a server. Detach an additional service account from the server. + * Detach a service account from a server. Detach a service account from the server. * * @param projectId The identifier (ID) of a STACKIT Project. (required) * @param region The STACKIT Region of the resources. (required) @@ -24870,7 +24893,7 @@ public ServiceAccountMailListResponse removeServiceAccountFromServer( } /** - * Detach a service account from a server. Detach an additional service account from the server. + * Detach a service account from a server. Detach a service account from the server. * * @param projectId The identifier (ID) of a STACKIT Project. (required) * @param region The STACKIT Region of the resources. (required) @@ -24906,8 +24929,8 @@ public ApiResponse removeServiceAccountFromServe } /** - * Detach a service account from a server. (asynchronously) Detach an additional service account - * from the server. + * Detach a service account from a server. (asynchronously) Detach a service account from the + * server. * * @param projectId The identifier (ID) of a STACKIT Project. (required) * @param region The STACKIT Region of the resources. (required) diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/AddRoutingTableToAreaPayload.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/AddRoutingTableToAreaPayload.java index c8fed02c..ac4f3e4c 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/AddRoutingTableToAreaPayload.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/AddRoutingTableToAreaPayload.java @@ -32,7 +32,10 @@ import java.util.Objects; import java.util.UUID; -/** An object representing a routing table. */ +/** + * An object representing a routing table. Filterable Fields: `dynamicRoutes`, + * `systemRoutes`. + */ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.19.0") diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/CreateNetworkAreaRangePayload.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/CreateNetworkAreaRangePayload.java index 71f7c5bd..433ae5a6 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/CreateNetworkAreaRangePayload.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/CreateNetworkAreaRangePayload.java @@ -58,7 +58,7 @@ public CreateNetworkAreaRangePayload addIpv4Item(NetworkRange ipv4Item) { } /** - * A list of network ranges. + * A list of network area network ranges. * * @return ipv4 */ diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/CreateNetworkIPv4WithPrefix.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/CreateNetworkIPv4WithPrefix.java index 10e46166..84a6f307 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/CreateNetworkIPv4WithPrefix.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/CreateNetworkIPv4WithPrefix.java @@ -30,6 +30,7 @@ import java.util.List; import java.util.Map; import java.util.Objects; +import java.util.UUID; import org.openapitools.jackson.nullable.JsonNullable; /** The create request for an IPv4 network with a specified prefix. */ @@ -53,6 +54,11 @@ public class CreateNetworkIPv4WithPrefix { @javax.annotation.Nonnull private String prefix; + public static final String SERIALIZED_NAME_VPC_NETWORK_RANGE_ID = "vpcNetworkRangeId"; + + @SerializedName(SERIALIZED_NAME_VPC_NETWORK_RANGE_ID) + @javax.annotation.Nullable private UUID vpcNetworkRangeId; + public CreateNetworkIPv4WithPrefix() {} public CreateNetworkIPv4WithPrefix gateway(@javax.annotation.Nullable String gateway) { @@ -120,6 +126,25 @@ public void setPrefix(@javax.annotation.Nonnull String prefix) { this.prefix = prefix; } + public CreateNetworkIPv4WithPrefix vpcNetworkRangeId( + @javax.annotation.Nullable UUID vpcNetworkRangeId) { + this.vpcNetworkRangeId = vpcNetworkRangeId; + return this; + } + + /** + * Universally Unique Identifier (UUID). + * + * @return vpcNetworkRangeId + */ + @javax.annotation.Nullable public UUID getVpcNetworkRangeId() { + return vpcNetworkRangeId; + } + + public void setVpcNetworkRangeId(@javax.annotation.Nullable UUID vpcNetworkRangeId) { + this.vpcNetworkRangeId = vpcNetworkRangeId; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -176,6 +201,8 @@ public boolean equals(Object o) { return Objects.equals(this.gateway, createNetworkIPv4WithPrefix.gateway) && Objects.equals(this.nameservers, createNetworkIPv4WithPrefix.nameservers) && Objects.equals(this.prefix, createNetworkIPv4WithPrefix.prefix) + && Objects.equals( + this.vpcNetworkRangeId, createNetworkIPv4WithPrefix.vpcNetworkRangeId) && Objects.equals( this.additionalProperties, createNetworkIPv4WithPrefix.additionalProperties); @@ -192,7 +219,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(gateway, nameservers, prefix, additionalProperties); + return Objects.hash(gateway, nameservers, prefix, vpcNetworkRangeId, additionalProperties); } private static int hashCodeNullable(JsonNullable a) { @@ -209,6 +236,9 @@ public String toString() { sb.append(" gateway: ").append(toIndentedString(gateway)).append("\n"); sb.append(" nameservers: ").append(toIndentedString(nameservers)).append("\n"); sb.append(" prefix: ").append(toIndentedString(prefix)).append("\n"); + sb.append(" vpcNetworkRangeId: ") + .append(toIndentedString(vpcNetworkRangeId)) + .append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); @@ -232,7 +262,9 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("gateway", "nameservers", "prefix")); + openapiFields = + new HashSet( + Arrays.asList("gateway", "nameservers", "prefix", "vpcNetworkRangeId")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("prefix")); @@ -294,6 +326,15 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti "Expected the field `prefix` to be a primitive type in the JSON string but got `%s`", jsonObj.get("prefix").toString())); } + if ((jsonObj.get("vpcNetworkRangeId") != null + && !jsonObj.get("vpcNetworkRangeId").isJsonNull()) + && !jsonObj.get("vpcNetworkRangeId").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `vpcNetworkRangeId` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("vpcNetworkRangeId").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/CreateNetworkIPv4WithPrefixLength.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/CreateNetworkIPv4WithPrefixLength.java index 43b52819..14379bf2 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/CreateNetworkIPv4WithPrefixLength.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/CreateNetworkIPv4WithPrefixLength.java @@ -30,6 +30,7 @@ import java.util.List; import java.util.Map; import java.util.Objects; +import java.util.UUID; /** The create request for an IPv4 network with a wanted prefix length. */ @javax.annotation.Generated( @@ -47,6 +48,11 @@ public class CreateNetworkIPv4WithPrefixLength { @javax.annotation.Nonnull private Long prefixLength; + public static final String SERIALIZED_NAME_VPC_NETWORK_RANGE_ID = "vpcNetworkRangeId"; + + @SerializedName(SERIALIZED_NAME_VPC_NETWORK_RANGE_ID) + @javax.annotation.Nullable private UUID vpcNetworkRangeId; + public CreateNetworkIPv4WithPrefixLength() {} public CreateNetworkIPv4WithPrefixLength nameservers( @@ -96,6 +102,25 @@ public void setPrefixLength(@javax.annotation.Nonnull Long prefixLength) { this.prefixLength = prefixLength; } + public CreateNetworkIPv4WithPrefixLength vpcNetworkRangeId( + @javax.annotation.Nullable UUID vpcNetworkRangeId) { + this.vpcNetworkRangeId = vpcNetworkRangeId; + return this; + } + + /** + * Universally Unique Identifier (UUID). + * + * @return vpcNetworkRangeId + */ + @javax.annotation.Nullable public UUID getVpcNetworkRangeId() { + return vpcNetworkRangeId; + } + + public void setVpcNetworkRangeId(@javax.annotation.Nullable UUID vpcNetworkRangeId) { + this.vpcNetworkRangeId = vpcNetworkRangeId; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -152,6 +177,8 @@ public boolean equals(Object o) { (CreateNetworkIPv4WithPrefixLength) o; return Objects.equals(this.nameservers, createNetworkIPv4WithPrefixLength.nameservers) && Objects.equals(this.prefixLength, createNetworkIPv4WithPrefixLength.prefixLength) + && Objects.equals( + this.vpcNetworkRangeId, createNetworkIPv4WithPrefixLength.vpcNetworkRangeId) && Objects.equals( this.additionalProperties, createNetworkIPv4WithPrefixLength.additionalProperties); @@ -159,7 +186,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(nameservers, prefixLength, additionalProperties); + return Objects.hash(nameservers, prefixLength, vpcNetworkRangeId, additionalProperties); } @Override @@ -168,6 +195,9 @@ public String toString() { sb.append("class CreateNetworkIPv4WithPrefixLength {\n"); sb.append(" nameservers: ").append(toIndentedString(nameservers)).append("\n"); sb.append(" prefixLength: ").append(toIndentedString(prefixLength)).append("\n"); + sb.append(" vpcNetworkRangeId: ") + .append(toIndentedString(vpcNetworkRangeId)) + .append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); @@ -191,7 +221,9 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("nameservers", "prefixLength")); + openapiFields = + new HashSet( + Arrays.asList("nameservers", "prefixLength", "vpcNetworkRangeId")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("prefixLength")); @@ -239,6 +271,15 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti "Expected the field `nameservers` to be an array in the JSON string but got `%s`", jsonObj.get("nameservers").toString())); } + if ((jsonObj.get("vpcNetworkRangeId") != null + && !jsonObj.get("vpcNetworkRangeId").isJsonNull()) + && !jsonObj.get("vpcNetworkRangeId").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `vpcNetworkRangeId` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("vpcNetworkRangeId").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/CreateNetworkIPv6WithPrefix.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/CreateNetworkIPv6WithPrefix.java index 4121d8cd..1e8220db 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/CreateNetworkIPv6WithPrefix.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/CreateNetworkIPv6WithPrefix.java @@ -30,6 +30,7 @@ import java.util.List; import java.util.Map; import java.util.Objects; +import java.util.UUID; import org.openapitools.jackson.nullable.JsonNullable; /** The create request for an IPv6 network with a specified prefix. */ @@ -53,6 +54,11 @@ public class CreateNetworkIPv6WithPrefix { @javax.annotation.Nonnull private String prefix; + public static final String SERIALIZED_NAME_VPC_NETWORK_RANGE_ID = "vpcNetworkRangeId"; + + @SerializedName(SERIALIZED_NAME_VPC_NETWORK_RANGE_ID) + @javax.annotation.Nullable private UUID vpcNetworkRangeId; + public CreateNetworkIPv6WithPrefix() {} public CreateNetworkIPv6WithPrefix gateway(@javax.annotation.Nullable String gateway) { @@ -120,6 +126,25 @@ public void setPrefix(@javax.annotation.Nonnull String prefix) { this.prefix = prefix; } + public CreateNetworkIPv6WithPrefix vpcNetworkRangeId( + @javax.annotation.Nullable UUID vpcNetworkRangeId) { + this.vpcNetworkRangeId = vpcNetworkRangeId; + return this; + } + + /** + * Universally Unique Identifier (UUID). + * + * @return vpcNetworkRangeId + */ + @javax.annotation.Nullable public UUID getVpcNetworkRangeId() { + return vpcNetworkRangeId; + } + + public void setVpcNetworkRangeId(@javax.annotation.Nullable UUID vpcNetworkRangeId) { + this.vpcNetworkRangeId = vpcNetworkRangeId; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -176,6 +201,8 @@ public boolean equals(Object o) { return Objects.equals(this.gateway, createNetworkIPv6WithPrefix.gateway) && Objects.equals(this.nameservers, createNetworkIPv6WithPrefix.nameservers) && Objects.equals(this.prefix, createNetworkIPv6WithPrefix.prefix) + && Objects.equals( + this.vpcNetworkRangeId, createNetworkIPv6WithPrefix.vpcNetworkRangeId) && Objects.equals( this.additionalProperties, createNetworkIPv6WithPrefix.additionalProperties); @@ -192,7 +219,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(gateway, nameservers, prefix, additionalProperties); + return Objects.hash(gateway, nameservers, prefix, vpcNetworkRangeId, additionalProperties); } private static int hashCodeNullable(JsonNullable a) { @@ -209,6 +236,9 @@ public String toString() { sb.append(" gateway: ").append(toIndentedString(gateway)).append("\n"); sb.append(" nameservers: ").append(toIndentedString(nameservers)).append("\n"); sb.append(" prefix: ").append(toIndentedString(prefix)).append("\n"); + sb.append(" vpcNetworkRangeId: ") + .append(toIndentedString(vpcNetworkRangeId)) + .append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); @@ -232,7 +262,9 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("gateway", "nameservers", "prefix")); + openapiFields = + new HashSet( + Arrays.asList("gateway", "nameservers", "prefix", "vpcNetworkRangeId")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("prefix")); @@ -294,6 +326,15 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti "Expected the field `prefix` to be a primitive type in the JSON string but got `%s`", jsonObj.get("prefix").toString())); } + if ((jsonObj.get("vpcNetworkRangeId") != null + && !jsonObj.get("vpcNetworkRangeId").isJsonNull()) + && !jsonObj.get("vpcNetworkRangeId").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `vpcNetworkRangeId` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("vpcNetworkRangeId").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/CreateNetworkIPv6WithPrefixLength.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/CreateNetworkIPv6WithPrefixLength.java index 06cc17b8..558908bf 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/CreateNetworkIPv6WithPrefixLength.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/CreateNetworkIPv6WithPrefixLength.java @@ -30,6 +30,7 @@ import java.util.List; import java.util.Map; import java.util.Objects; +import java.util.UUID; /** The create request for an IPv6 network with a wanted prefix length. */ @javax.annotation.Generated( @@ -47,6 +48,11 @@ public class CreateNetworkIPv6WithPrefixLength { @javax.annotation.Nonnull private Long prefixLength; + public static final String SERIALIZED_NAME_VPC_NETWORK_RANGE_ID = "vpcNetworkRangeId"; + + @SerializedName(SERIALIZED_NAME_VPC_NETWORK_RANGE_ID) + @javax.annotation.Nullable private UUID vpcNetworkRangeId; + public CreateNetworkIPv6WithPrefixLength() {} public CreateNetworkIPv6WithPrefixLength nameservers( @@ -96,6 +102,25 @@ public void setPrefixLength(@javax.annotation.Nonnull Long prefixLength) { this.prefixLength = prefixLength; } + public CreateNetworkIPv6WithPrefixLength vpcNetworkRangeId( + @javax.annotation.Nullable UUID vpcNetworkRangeId) { + this.vpcNetworkRangeId = vpcNetworkRangeId; + return this; + } + + /** + * Universally Unique Identifier (UUID). + * + * @return vpcNetworkRangeId + */ + @javax.annotation.Nullable public UUID getVpcNetworkRangeId() { + return vpcNetworkRangeId; + } + + public void setVpcNetworkRangeId(@javax.annotation.Nullable UUID vpcNetworkRangeId) { + this.vpcNetworkRangeId = vpcNetworkRangeId; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -152,6 +177,8 @@ public boolean equals(Object o) { (CreateNetworkIPv6WithPrefixLength) o; return Objects.equals(this.nameservers, createNetworkIPv6WithPrefixLength.nameservers) && Objects.equals(this.prefixLength, createNetworkIPv6WithPrefixLength.prefixLength) + && Objects.equals( + this.vpcNetworkRangeId, createNetworkIPv6WithPrefixLength.vpcNetworkRangeId) && Objects.equals( this.additionalProperties, createNetworkIPv6WithPrefixLength.additionalProperties); @@ -159,7 +186,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(nameservers, prefixLength, additionalProperties); + return Objects.hash(nameservers, prefixLength, vpcNetworkRangeId, additionalProperties); } @Override @@ -168,6 +195,9 @@ public String toString() { sb.append("class CreateNetworkIPv6WithPrefixLength {\n"); sb.append(" nameservers: ").append(toIndentedString(nameservers)).append("\n"); sb.append(" prefixLength: ").append(toIndentedString(prefixLength)).append("\n"); + sb.append(" vpcNetworkRangeId: ") + .append(toIndentedString(vpcNetworkRangeId)) + .append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); @@ -191,7 +221,9 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("nameservers", "prefixLength")); + openapiFields = + new HashSet( + Arrays.asList("nameservers", "prefixLength", "vpcNetworkRangeId")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("prefixLength")); @@ -239,6 +271,15 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti "Expected the field `nameservers` to be an array in the JSON string but got `%s`", jsonObj.get("nameservers").toString())); } + if ((jsonObj.get("vpcNetworkRangeId") != null + && !jsonObj.get("vpcNetworkRangeId").isJsonNull()) + && !jsonObj.get("vpcNetworkRangeId").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `vpcNetworkRangeId` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("vpcNetworkRangeId").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/CreateNetworkPayload.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/CreateNetworkPayload.java index 33d52960..0091543a 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/CreateNetworkPayload.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/CreateNetworkPayload.java @@ -72,6 +72,11 @@ public class CreateNetworkPayload { @SerializedName(SERIALIZED_NAME_ROUTING_TABLE_ID) @javax.annotation.Nullable private UUID routingTableId; + public static final String SERIALIZED_NAME_VPC_ID = "vpcId"; + + @SerializedName(SERIALIZED_NAME_VPC_ID) + @javax.annotation.Nullable private UUID vpcId; + public CreateNetworkPayload() {} public CreateNetworkPayload dhcp(@javax.annotation.Nullable Boolean dhcp) { @@ -205,6 +210,24 @@ public void setRoutingTableId(@javax.annotation.Nullable UUID routingTableId) { this.routingTableId = routingTableId; } + public CreateNetworkPayload vpcId(@javax.annotation.Nullable UUID vpcId) { + this.vpcId = vpcId; + return this; + } + + /** + * The identifier (ID) of a STACKIT VPC. + * + * @return vpcId + */ + @javax.annotation.Nullable public UUID getVpcId() { + return vpcId; + } + + public void setVpcId(@javax.annotation.Nullable UUID vpcId) { + this.vpcId = vpcId; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -265,6 +288,7 @@ public boolean equals(Object o) { && Objects.equals(this.name, createNetworkPayload.name) && Objects.equals(this.routed, createNetworkPayload.routed) && Objects.equals(this.routingTableId, createNetworkPayload.routingTableId) + && Objects.equals(this.vpcId, createNetworkPayload.vpcId) && Objects.equals( this.additionalProperties, createNetworkPayload.additionalProperties); } @@ -272,7 +296,15 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( - dhcp, ipv4, ipv6, labels, name, routed, routingTableId, additionalProperties); + dhcp, + ipv4, + ipv6, + labels, + name, + routed, + routingTableId, + vpcId, + additionalProperties); } @Override @@ -286,6 +318,7 @@ public String toString() { sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" routed: ").append(toIndentedString(routed)).append("\n"); sb.append(" routingTableId: ").append(toIndentedString(routingTableId)).append("\n"); + sb.append(" vpcId: ").append(toIndentedString(vpcId)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); @@ -318,7 +351,8 @@ private String toIndentedString(Object o) { "labels", "name", "routed", - "routingTableId")); + "routingTableId", + "vpcId")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("name")); @@ -377,6 +411,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti "Expected the field `routingTableId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("routingTableId").toString())); } + if ((jsonObj.get("vpcId") != null && !jsonObj.get("vpcId").isJsonNull()) + && !jsonObj.get("vpcId").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `vpcId` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("vpcId").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/CreateServerPayload.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/CreateServerPayload.java index 870b13b5..41e19c74 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/CreateServerPayload.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/CreateServerPayload.java @@ -167,6 +167,11 @@ public class CreateServerPayload { @SerializedName(SERIALIZED_NAME_VOLUMES) @javax.annotation.Nullable private List volumes; + public static final String SERIALIZED_NAME_VTPM = "vtpm"; + + @SerializedName(SERIALIZED_NAME_VTPM) + @javax.annotation.Nullable private ServerVTPM vtpm; + public CreateServerPayload() {} public CreateServerPayload( @@ -611,6 +616,24 @@ public void setVolumes(@javax.annotation.Nullable List volumes) { this.volumes = volumes; } + public CreateServerPayload vtpm(@javax.annotation.Nullable ServerVTPM vtpm) { + this.vtpm = vtpm; + return this; + } + + /** + * Get vtpm + * + * @return vtpm + */ + @javax.annotation.Nullable public ServerVTPM getVtpm() { + return vtpm; + } + + public void setVtpm(@javax.annotation.Nullable ServerVTPM vtpm) { + this.vtpm = vtpm; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -689,6 +712,7 @@ public boolean equals(Object o) { && Objects.equals(this.updatedAt, createServerPayload.updatedAt) && Arrays.equals(this.userData, createServerPayload.userData) && Objects.equals(this.volumes, createServerPayload.volumes) + && Objects.equals(this.vtpm, createServerPayload.vtpm) && Objects.equals( this.additionalProperties, createServerPayload.additionalProperties); } @@ -721,6 +745,7 @@ public int hashCode() { updatedAt, Arrays.hashCode(userData), volumes, + vtpm, additionalProperties); } @@ -757,6 +782,7 @@ public String toString() { sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); sb.append(" userData: ").append(toIndentedString(userData)).append("\n"); sb.append(" volumes: ").append(toIndentedString(volumes)).append("\n"); + sb.append(" vtpm: ").append(toIndentedString(vtpm)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); @@ -807,7 +833,8 @@ private String toIndentedString(Object o) { "status", "updatedAt", "userData", - "volumes")); + "volumes", + "vtpm")); // a set of required properties/fields (JSON key names) openapiRequiredFields = @@ -987,6 +1014,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti "Expected the field `volumes` to be an array in the JSON string but got `%s`", jsonObj.get("volumes").toString())); } + // validate the optional field `vtpm` + if (jsonObj.get("vtpm") != null && !jsonObj.get("vtpm").isJsonNull()) { + ServerVTPM.validateJsonElement(jsonObj.get("vtpm")); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { 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 d939e1e2..4eba4814 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 @@ -37,6 +37,11 @@ value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.19.0") public class CreateSnapshotPayload { + public static final String SERIALIZED_NAME_AVAILABILITY_ZONE = "availabilityZone"; + + @SerializedName(SERIALIZED_NAME_AVAILABILITY_ZONE) + @javax.annotation.Nullable private String availabilityZone; + public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; @SerializedName(SERIALIZED_NAME_CREATED_AT) @@ -86,8 +91,14 @@ public class CreateSnapshotPayload { public CreateSnapshotPayload() {} public CreateSnapshotPayload( - OffsetDateTime createdAt, UUID id, Long size, String status, OffsetDateTime updatedAt) { + String availabilityZone, + OffsetDateTime createdAt, + UUID id, + Long size, + String status, + OffsetDateTime updatedAt) { this(); + this.availabilityZone = availabilityZone; this.createdAt = createdAt; this.id = id; this.size = size; @@ -95,6 +106,15 @@ public CreateSnapshotPayload( this.updatedAt = updatedAt; } + /** + * Object that represents an availability zone. + * + * @return availabilityZone + */ + @javax.annotation.Nullable public String getAvailabilityZone() { + return availabilityZone; + } + /** * Date-time when resource was created. * @@ -272,7 +292,8 @@ public boolean equals(Object o) { return false; } CreateSnapshotPayload createSnapshotPayload = (CreateSnapshotPayload) o; - return Objects.equals(this.createdAt, createSnapshotPayload.createdAt) + return Objects.equals(this.availabilityZone, createSnapshotPayload.availabilityZone) + && Objects.equals(this.createdAt, createSnapshotPayload.createdAt) && Objects.equals(this.description, createSnapshotPayload.description) && Objects.equals(this.id, createSnapshotPayload.id) && Objects.equals(this.labels, createSnapshotPayload.labels) @@ -288,6 +309,7 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( + availabilityZone, createdAt, description, id, @@ -304,6 +326,7 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CreateSnapshotPayload {\n"); + 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(" id: ").append(toIndentedString(id)).append("\n"); @@ -339,6 +362,7 @@ private String toIndentedString(Object o) { openapiFields = new HashSet( Arrays.asList( + "availabilityZone", "createdAt", "description", "id", @@ -383,6 +407,15 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("availabilityZone") != null + && !jsonObj.get("availabilityZone").isJsonNull()) + && !jsonObj.get("availabilityZone").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `availabilityZone` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("availabilityZone").toString())); + } if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { throw new IllegalArgumentException( diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/CreateVolumePayload.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/CreateVolumePayload.java index 93d138b2..ba5ff759 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/CreateVolumePayload.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/CreateVolumePayload.java @@ -361,8 +361,9 @@ public void setSource(@javax.annotation.Nullable VolumeSource source) { * `CREATING`, `DELETED`, `DELETING`, `DETACHING`, * `DOWNLOADING`, `ERROR`, `ERROR_BACKING-UP`, * `ERROR_DELETING`, `ERROR_RESIZING`, `ERROR_RESTORING-BACKUP`, - * `MAINTENANCE`, `RESERVED`, `RESIZING`, - * `RESTORING-BACKUP`, `RETYPING`, `UPLOADING`. + * `ERROR_KMS-ENCRYPTION-PARAMS`, `MAINTENANCE`, `RESERVED`, + * `RESIZING`, `RESTORING-BACKUP`, `RETYPING`, + * `UPLOADING`. * * @return status */ diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/Network.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/Network.java index 242c8537..e74a6321 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/Network.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/Network.java @@ -98,6 +98,11 @@ public class Network { @SerializedName(SERIALIZED_NAME_UPDATED_AT) @javax.annotation.Nullable private OffsetDateTime updatedAt; + public static final String SERIALIZED_NAME_VPC_ID = "vpcId"; + + @SerializedName(SERIALIZED_NAME_VPC_ID) + @javax.annotation.Nullable private UUID vpcId; + public Network() {} public Network(OffsetDateTime createdAt, OffsetDateTime updatedAt) { @@ -295,6 +300,24 @@ public void setStatus(@javax.annotation.Nonnull String status) { return updatedAt; } + public Network vpcId(@javax.annotation.Nullable UUID vpcId) { + this.vpcId = vpcId; + return this; + } + + /** + * The identifier (ID) of a STACKIT VPC. + * + * @return vpcId + */ + @javax.annotation.Nullable public UUID getVpcId() { + return vpcId; + } + + public void setVpcId(@javax.annotation.Nullable UUID vpcId) { + this.vpcId = vpcId; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -359,6 +382,7 @@ public boolean equals(Object o) { && Objects.equals(this.routingTableId, network.routingTableId) && Objects.equals(this.status, network.status) && Objects.equals(this.updatedAt, network.updatedAt) + && Objects.equals(this.vpcId, network.vpcId) && Objects.equals(this.additionalProperties, network.additionalProperties); } @@ -376,6 +400,7 @@ public int hashCode() { routingTableId, status, updatedAt, + vpcId, additionalProperties); } @@ -394,6 +419,7 @@ public String toString() { sb.append(" routingTableId: ").append(toIndentedString(routingTableId)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" vpcId: ").append(toIndentedString(vpcId)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); @@ -430,7 +456,8 @@ private String toIndentedString(Object o) { "routed", "routingTableId", "status", - "updatedAt")); + "updatedAt", + "vpcId")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("id", "name", "status")); @@ -503,6 +530,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti "Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); } + if ((jsonObj.get("vpcId") != null && !jsonObj.get("vpcId").isJsonNull()) + && !jsonObj.get("vpcId").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `vpcId` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("vpcId").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/NetworkIPv4.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/NetworkIPv4.java index f0da0f08..467bcd38 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/NetworkIPv4.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/NetworkIPv4.java @@ -30,6 +30,7 @@ import java.util.List; import java.util.Map; import java.util.Objects; +import java.util.UUID; import org.openapitools.jackson.nullable.JsonNullable; /** Object that represents the IPv4 part of a network. */ @@ -58,6 +59,11 @@ public class NetworkIPv4 { @SerializedName(SERIALIZED_NAME_PUBLIC_IP) @javax.annotation.Nullable private String publicIp; + public static final String SERIALIZED_NAME_VPC_NETWORK_RANGE_ID = "vpcNetworkRangeId"; + + @SerializedName(SERIALIZED_NAME_VPC_NETWORK_RANGE_ID) + @javax.annotation.Nullable private UUID vpcNetworkRangeId; + public NetworkIPv4() {} public NetworkIPv4(String publicIp) { @@ -146,6 +152,24 @@ public void setPrefixes(@javax.annotation.Nonnull List prefixes) { return publicIp; } + public NetworkIPv4 vpcNetworkRangeId(@javax.annotation.Nullable UUID vpcNetworkRangeId) { + this.vpcNetworkRangeId = vpcNetworkRangeId; + return this; + } + + /** + * Universally Unique Identifier (UUID). + * + * @return vpcNetworkRangeId + */ + @javax.annotation.Nullable public UUID getVpcNetworkRangeId() { + return vpcNetworkRangeId; + } + + public void setVpcNetworkRangeId(@javax.annotation.Nullable UUID vpcNetworkRangeId) { + this.vpcNetworkRangeId = vpcNetworkRangeId; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -203,6 +227,7 @@ public boolean equals(Object o) { && Objects.equals(this.nameservers, networkIPv4.nameservers) && Objects.equals(this.prefixes, networkIPv4.prefixes) && Objects.equals(this.publicIp, networkIPv4.publicIp) + && Objects.equals(this.vpcNetworkRangeId, networkIPv4.vpcNetworkRangeId) && Objects.equals(this.additionalProperties, networkIPv4.additionalProperties); } @@ -217,7 +242,8 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(gateway, nameservers, prefixes, publicIp, additionalProperties); + return Objects.hash( + gateway, nameservers, prefixes, publicIp, vpcNetworkRangeId, additionalProperties); } private static int hashCodeNullable(JsonNullable a) { @@ -235,6 +261,9 @@ public String toString() { sb.append(" nameservers: ").append(toIndentedString(nameservers)).append("\n"); sb.append(" prefixes: ").append(toIndentedString(prefixes)).append("\n"); sb.append(" publicIp: ").append(toIndentedString(publicIp)).append("\n"); + sb.append(" vpcNetworkRangeId: ") + .append(toIndentedString(vpcNetworkRangeId)) + .append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); @@ -260,7 +289,12 @@ private String toIndentedString(Object o) { // a set of all properties/fields (JSON key names) openapiFields = new HashSet( - Arrays.asList("gateway", "nameservers", "prefixes", "publicIp")); + Arrays.asList( + "gateway", + "nameservers", + "prefixes", + "publicIp", + "vpcNetworkRangeId")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("prefixes")); @@ -333,6 +367,15 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti "Expected the field `publicIp` to be a primitive type in the JSON string but got `%s`", jsonObj.get("publicIp").toString())); } + if ((jsonObj.get("vpcNetworkRangeId") != null + && !jsonObj.get("vpcNetworkRangeId").isJsonNull()) + && !jsonObj.get("vpcNetworkRangeId").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `vpcNetworkRangeId` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("vpcNetworkRangeId").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/NetworkIPv6.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/NetworkIPv6.java index 73e36606..9631bb67 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/NetworkIPv6.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/NetworkIPv6.java @@ -30,6 +30,7 @@ import java.util.List; import java.util.Map; import java.util.Objects; +import java.util.UUID; import org.openapitools.jackson.nullable.JsonNullable; /** Object that represents the IPv6 part of a network. */ @@ -53,6 +54,11 @@ public class NetworkIPv6 { @javax.annotation.Nonnull private List prefixes = new ArrayList<>(); + public static final String SERIALIZED_NAME_VPC_NETWORK_RANGE_ID = "vpcNetworkRangeId"; + + @SerializedName(SERIALIZED_NAME_VPC_NETWORK_RANGE_ID) + @javax.annotation.Nullable private UUID vpcNetworkRangeId; + public NetworkIPv6() {} public NetworkIPv6 gateway(@javax.annotation.Nullable String gateway) { @@ -127,6 +133,24 @@ public void setPrefixes(@javax.annotation.Nonnull List prefixes) { this.prefixes = prefixes; } + public NetworkIPv6 vpcNetworkRangeId(@javax.annotation.Nullable UUID vpcNetworkRangeId) { + this.vpcNetworkRangeId = vpcNetworkRangeId; + return this; + } + + /** + * Universally Unique Identifier (UUID). + * + * @return vpcNetworkRangeId + */ + @javax.annotation.Nullable public UUID getVpcNetworkRangeId() { + return vpcNetworkRangeId; + } + + public void setVpcNetworkRangeId(@javax.annotation.Nullable UUID vpcNetworkRangeId) { + this.vpcNetworkRangeId = vpcNetworkRangeId; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -183,6 +207,7 @@ public boolean equals(Object o) { return Objects.equals(this.gateway, networkIPv6.gateway) && Objects.equals(this.nameservers, networkIPv6.nameservers) && Objects.equals(this.prefixes, networkIPv6.prefixes) + && Objects.equals(this.vpcNetworkRangeId, networkIPv6.vpcNetworkRangeId) && Objects.equals(this.additionalProperties, networkIPv6.additionalProperties); } @@ -197,7 +222,8 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(gateway, nameservers, prefixes, additionalProperties); + return Objects.hash( + gateway, nameservers, prefixes, vpcNetworkRangeId, additionalProperties); } private static int hashCodeNullable(JsonNullable a) { @@ -214,6 +240,9 @@ public String toString() { sb.append(" gateway: ").append(toIndentedString(gateway)).append("\n"); sb.append(" nameservers: ").append(toIndentedString(nameservers)).append("\n"); sb.append(" prefixes: ").append(toIndentedString(prefixes)).append("\n"); + sb.append(" vpcNetworkRangeId: ") + .append(toIndentedString(vpcNetworkRangeId)) + .append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); @@ -237,7 +266,9 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("gateway", "nameservers", "prefixes")); + openapiFields = + new HashSet( + Arrays.asList("gateway", "nameservers", "prefixes", "vpcNetworkRangeId")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("prefixes")); @@ -302,6 +333,15 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti "Expected the field `prefixes` to be an array in the JSON string but got `%s`", jsonObj.get("prefixes").toString())); } + if ((jsonObj.get("vpcNetworkRangeId") != null + && !jsonObj.get("vpcNetworkRangeId").isJsonNull()) + && !jsonObj.get("vpcNetworkRangeId").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `vpcNetworkRangeId` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("vpcNetworkRangeId").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/NetworkRange.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/NetworkRange.java index 39d9dcef..166283e8 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/NetworkRange.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/NetworkRange.java @@ -32,7 +32,7 @@ import java.util.Objects; import java.util.UUID; -/** Object that represents a network range. */ +/** Object that represents a network range of a network area. */ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.19.0") diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/NetworkRangeListResponse.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/NetworkRangeListResponse.java index ff561579..0a54fd05 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/NetworkRangeListResponse.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/NetworkRangeListResponse.java @@ -32,7 +32,7 @@ import java.util.Map; import java.util.Objects; -/** Network Range list response. */ +/** Network Range list response of a network area. */ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.19.0") @@ -59,7 +59,7 @@ public NetworkRangeListResponse addItemsItem(NetworkRange itemsItem) { } /** - * A list of network ranges. + * A list of network area network ranges. * * @return items */ diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/RegionalAreaIPv4.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/RegionalAreaIPv4.java index 753b053e..c3138495 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/RegionalAreaIPv4.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/RegionalAreaIPv4.java @@ -173,7 +173,7 @@ public RegionalAreaIPv4 addNetworkRangesItem(NetworkRange networkRangesItem) { } /** - * A list of network ranges. + * A list of network area network ranges. * * @return networkRanges */ diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/Request.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/Request.java index dee9d565..bf55c3c8 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/Request.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/Request.java @@ -140,7 +140,8 @@ public Request requestType(@javax.annotation.Nonnull String requestType) { * Object that represents a resource type. Possible values: `BACKUP`, * `IMAGE`, `NETWORK`, `NETWORKAREA`, `NIC`, * `PROJECT`, `ROUTE`, `SERVER`, `SERVICEACCOUNT`, - * `SNAPSHOT`, `VIRTUALIP`, `VOLUME`. + * `SNAPSHOT`, `VIRTUALIP`, `VOLUME`, `VPC`, + * `VPCNETWORKRANGE`. * * @return requestType */ diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/RequestResource.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/RequestResource.java index 1d745c21..dafb444e 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/RequestResource.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/RequestResource.java @@ -105,7 +105,8 @@ public RequestResource type(@javax.annotation.Nonnull String type) { * Object that represents a resource type. Possible values: `BACKUP`, * `IMAGE`, `NETWORK`, `NETWORKAREA`, `NIC`, * `PROJECT`, `ROUTE`, `SERVER`, `SERVICEACCOUNT`, - * `SNAPSHOT`, `VIRTUALIP`, `VOLUME`. + * `SNAPSHOT`, `VIRTUALIP`, `VOLUME`, `VPC`, + * `VPCNETWORKRANGE`. * * @return type */ diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/RoutingTable.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/RoutingTable.java index 6a281393..6aefa265 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/RoutingTable.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/RoutingTable.java @@ -32,7 +32,10 @@ import java.util.Objects; import java.util.UUID; -/** An object representing a routing table. */ +/** + * An object representing a routing table. Filterable Fields: `dynamicRoutes`, + * `systemRoutes`. + */ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.19.0") diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/Server.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/Server.java index afa3f82f..c6cd717d 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/Server.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/Server.java @@ -166,6 +166,11 @@ public class Server { @SerializedName(SERIALIZED_NAME_VOLUMES) @javax.annotation.Nullable private List volumes; + public static final String SERIALIZED_NAME_VTPM = "vtpm"; + + @SerializedName(SERIALIZED_NAME_VTPM) + @javax.annotation.Nullable private ServerVTPM vtpm; + public Server() {} public Server( @@ -604,6 +609,24 @@ public void setVolumes(@javax.annotation.Nullable List volumes) { this.volumes = volumes; } + public Server vtpm(@javax.annotation.Nullable ServerVTPM vtpm) { + this.vtpm = vtpm; + return this; + } + + /** + * Get vtpm + * + * @return vtpm + */ + @javax.annotation.Nullable public ServerVTPM getVtpm() { + return vtpm; + } + + public void setVtpm(@javax.annotation.Nullable ServerVTPM vtpm) { + this.vtpm = vtpm; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -682,6 +705,7 @@ public boolean equals(Object o) { && Objects.equals(this.updatedAt, server.updatedAt) && Arrays.equals(this.userData, server.userData) && Objects.equals(this.volumes, server.volumes) + && Objects.equals(this.vtpm, server.vtpm) && Objects.equals(this.additionalProperties, server.additionalProperties); } @@ -713,6 +737,7 @@ public int hashCode() { updatedAt, Arrays.hashCode(userData), volumes, + vtpm, additionalProperties); } @@ -749,6 +774,7 @@ public String toString() { sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); sb.append(" userData: ").append(toIndentedString(userData)).append("\n"); sb.append(" volumes: ").append(toIndentedString(volumes)).append("\n"); + sb.append(" vtpm: ").append(toIndentedString(vtpm)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); @@ -799,7 +825,8 @@ private String toIndentedString(Object o) { "status", "updatedAt", "userData", - "volumes")); + "volumes", + "vtpm")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("machineType", "name")); @@ -980,6 +1007,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti "Expected the field `volumes` to be an array in the JSON string but got `%s`", jsonObj.get("volumes").toString())); } + // validate the optional field `vtpm` + if (jsonObj.get("vtpm") != null && !jsonObj.get("vtpm").isJsonNull()) { + ServerVTPM.validateJsonElement(jsonObj.get("vtpm")); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/ServerVTPM.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/ServerVTPM.java new file mode 100644 index 00000000..5bcee656 --- /dev/null +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/ServerVTPM.java @@ -0,0 +1,299 @@ +/* + * 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.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; + +/** Configuration for the Virtual Trusted Platform Module (vTPM). */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.19.0") +public class ServerVTPM { + public static final String SERIALIZED_NAME_ENABLED = "enabled"; + + @SerializedName(SERIALIZED_NAME_ENABLED) + @javax.annotation.Nonnull + private Boolean enabled = false; + + public ServerVTPM() {} + + public ServerVTPM enabled(@javax.annotation.Nonnull Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Defines whether the server instance has the Virtual Trusted Platform Module (vTPM) enabled. + * + * @return enabled + */ + @javax.annotation.Nonnull + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(@javax.annotation.Nonnull Boolean enabled) { + this.enabled = enabled; + } + + /** + * 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 ServerVTPM instance itself + */ + public ServerVTPM 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; + } + ServerVTPM serverVTPM = (ServerVTPM) o; + return Objects.equals(this.enabled, serverVTPM.enabled) + && Objects.equals(this.additionalProperties, serverVTPM.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(enabled, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ServerVTPM {\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).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("enabled")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("enabled")); + } + + /** + * 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 ServerVTPM + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ServerVTPM.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 ServerVTPM is not found in the empty JSON string", + ServerVTPM.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ServerVTPM.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(); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ServerVTPM.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ServerVTPM' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ServerVTPM.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ServerVTPM 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 ServerVTPM read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ServerVTPM 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 ServerVTPM given an JSON string + * + * @param jsonString JSON string + * @return An instance of ServerVTPM + * @throws IOException if the JSON string is invalid with respect to ServerVTPM + */ + public static ServerVTPM fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ServerVTPM.class); + } + + /** + * Convert an instance of ServerVTPM 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/Snapshot.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/Snapshot.java index 06cf654f..594c68be 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 @@ -37,6 +37,11 @@ value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.19.0") public class Snapshot { + public static final String SERIALIZED_NAME_AVAILABILITY_ZONE = "availabilityZone"; + + @SerializedName(SERIALIZED_NAME_AVAILABILITY_ZONE) + @javax.annotation.Nullable private String availabilityZone; + public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; @SerializedName(SERIALIZED_NAME_CREATED_AT) @@ -86,8 +91,14 @@ public class Snapshot { public Snapshot() {} public Snapshot( - OffsetDateTime createdAt, UUID id, Long size, String status, OffsetDateTime updatedAt) { + String availabilityZone, + OffsetDateTime createdAt, + UUID id, + Long size, + String status, + OffsetDateTime updatedAt) { this(); + this.availabilityZone = availabilityZone; this.createdAt = createdAt; this.id = id; this.size = size; @@ -95,6 +106,15 @@ public Snapshot( this.updatedAt = updatedAt; } + /** + * Object that represents an availability zone. + * + * @return availabilityZone + */ + @javax.annotation.Nullable public String getAvailabilityZone() { + return availabilityZone; + } + /** * Date-time when resource was created. * @@ -272,7 +292,8 @@ public boolean equals(Object o) { return false; } Snapshot snapshot = (Snapshot) o; - return Objects.equals(this.createdAt, snapshot.createdAt) + return Objects.equals(this.availabilityZone, snapshot.availabilityZone) + && Objects.equals(this.createdAt, snapshot.createdAt) && Objects.equals(this.description, snapshot.description) && Objects.equals(this.id, snapshot.id) && Objects.equals(this.labels, snapshot.labels) @@ -287,6 +308,7 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( + availabilityZone, createdAt, description, id, @@ -303,6 +325,7 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Snapshot {\n"); + 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(" id: ").append(toIndentedString(id)).append("\n"); @@ -338,6 +361,7 @@ private String toIndentedString(Object o) { openapiFields = new HashSet( Arrays.asList( + "availabilityZone", "createdAt", "description", "id", @@ -382,6 +406,15 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("availabilityZone") != null + && !jsonObj.get("availabilityZone").isJsonNull()) + && !jsonObj.get("availabilityZone").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `availabilityZone` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("availabilityZone").toString())); + } if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { throw new IllegalArgumentException( diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/Volume.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/Volume.java index 5969aa45..f74de45c 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/Volume.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2api/model/Volume.java @@ -360,8 +360,9 @@ public void setSource(@javax.annotation.Nullable VolumeSource source) { * `CREATING`, `DELETED`, `DELETING`, `DETACHING`, * `DOWNLOADING`, `ERROR`, `ERROR_BACKING-UP`, * `ERROR_DELETING`, `ERROR_RESIZING`, `ERROR_RESTORING-BACKUP`, - * `MAINTENANCE`, `RESERVED`, `RESIZING`, - * `RESTORING-BACKUP`, `RETYPING`, `UPLOADING`. + * `ERROR_KMS-ENCRYPTION-PARAMS`, `MAINTENANCE`, `RESERVED`, + * `RESIZING`, `RESTORING-BACKUP`, `RETYPING`, + * `UPLOADING`. * * @return status */ 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 c1cd69e2..ecdd2847 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 @@ -468,6 +468,8 @@ private static Class getClassByDiscriminator( gsonBuilder.registerTypeAdapterFactory( new cloud.stackit.sdk.iaas.v2beta1api.model.ServerNetworking .CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory( + new cloud.stackit.sdk.iaas.v2beta1api.model.ServerVTPM.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new cloud.stackit.sdk.iaas.v2beta1api.model.ServiceAccountMailListResponse .CustomTypeAdapterFactory()); @@ -519,7 +521,7 @@ private static Class getClassByDiscriminator( new cloud.stackit.sdk.iaas.v2beta1api.model.UpdateVolumePayload .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( - new cloud.stackit.sdk.iaas.v2beta1api.model.V2beta1ConfigureNetworkAreaRegionPayload + new cloud.stackit.sdk.iaas.v2beta1api.model.V2beta1CreateNetworkAreaRegionPayload .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new cloud.stackit.sdk.iaas.v2beta1api.model.V2beta1CreateSnapshotPayload @@ -531,7 +533,7 @@ private static Class getClassByDiscriminator( new cloud.stackit.sdk.iaas.v2beta1api.model.V2beta1UpdateNetworkAreaRegionPayload .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( - new cloud.stackit.sdk.iaas.v2beta1api.model.V2beta1UpdateRouteOfAreaPayload + new cloud.stackit.sdk.iaas.v2beta1api.model.V2beta1UpdateNetworkAreaRoutePayload .CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory( new cloud.stackit.sdk.iaas.v2beta1api.model.V2beta1UpdateSecurityGroupPayload diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/api/DefaultApi.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/api/DefaultApi.java index 7f9378eb..c09b9cd1 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/api/DefaultApi.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/api/DefaultApi.java @@ -98,11 +98,11 @@ import cloud.stackit.sdk.iaas.v2beta1api.model.UpdateRoutingTableOfAreaPayload; import cloud.stackit.sdk.iaas.v2beta1api.model.UpdateServerPayload; import cloud.stackit.sdk.iaas.v2beta1api.model.UpdateVolumePayload; -import cloud.stackit.sdk.iaas.v2beta1api.model.V2beta1ConfigureNetworkAreaRegionPayload; +import cloud.stackit.sdk.iaas.v2beta1api.model.V2beta1CreateNetworkAreaRegionPayload; import cloud.stackit.sdk.iaas.v2beta1api.model.V2beta1CreateSnapshotPayload; import cloud.stackit.sdk.iaas.v2beta1api.model.V2beta1UpdateBackupPayload; import cloud.stackit.sdk.iaas.v2beta1api.model.V2beta1UpdateNetworkAreaRegionPayload; -import cloud.stackit.sdk.iaas.v2beta1api.model.V2beta1UpdateRouteOfAreaPayload; +import cloud.stackit.sdk.iaas.v2beta1api.model.V2beta1UpdateNetworkAreaRoutePayload; import cloud.stackit.sdk.iaas.v2beta1api.model.V2beta1UpdateSecurityGroupPayload; import cloud.stackit.sdk.iaas.v2beta1api.model.V2beta1UpdateSnapshotPayload; import cloud.stackit.sdk.iaas.v2beta1api.model.Volume; @@ -2395,6 +2395,7 @@ public okhttp3.Call createAffinityGroupAsync( * * * + * * *
Response Details
Status Code Description Response Headers
200 List service accounts. -
200 List service account. -
400 A bad request. -
401 A request which was not authorized. -
403 A request which was forbidden. -
401 A request which was not authorized. -
403 A request which was forbidden. -
404 The object was not found. -
413 The request entity is too large. -
500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. -
*/ @@ -2510,6 +2511,7 @@ private okhttp3.Call createBackupValidateBeforeCall( * 401 A request which was not authorized. - * 403 A request which was forbidden. - * 404 The object was not found. - + * 413 The request entity is too large. - * 500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. - * */ @@ -2542,6 +2544,7 @@ public Backup createBackup( * 401 A request which was not authorized. - * 403 A request which was forbidden. - * 404 The object was not found. - + * 413 The request entity is too large. - * 500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. - * */ @@ -2576,6 +2579,7 @@ public ApiResponse createBackupWithHttpInfo( * 401 A request which was not authorized. - * 403 A request which was forbidden. - * 404 The object was not found. - + * 413 The request entity is too large. - * 500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. - * */ @@ -2611,6 +2615,7 @@ public okhttp3.Call createBackupAsync( * 401 A request which was not authorized. - * 403 A request which was forbidden. - * 404 The object was not found. - + * 413 The request entity is too large. - * 429 Too Many Requests. - * 500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. - * @@ -2727,6 +2732,7 @@ private okhttp3.Call createImageValidateBeforeCall( * 401 A request which was not authorized. - * 403 A request which was forbidden. - * 404 The object was not found. - + * 413 The request entity is too large. - * 429 Too Many Requests. - * 500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. - * @@ -2760,6 +2766,7 @@ public ImageCreateResponse createImage( * 401 A request which was not authorized. - * 403 A request which was forbidden. - * 404 The object was not found. - + * 413 The request entity is too large. - * 429 Too Many Requests. - * 500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. - * @@ -2795,6 +2802,7 @@ public ApiResponse createImageWithHttpInfo( * 401 A request which was not authorized. - * 403 A request which was forbidden. - * 404 The object was not found. - + * 413 The request entity is too large. - * 429 Too Many Requests. - * 500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. - * @@ -5282,6 +5290,8 @@ public okhttp3.Call createServerAsync( * 401 A request which was not authorized. - * 403 A request which was forbidden. - * 404 The object was not found. - + * 409 A conflict has occurred. - + * 413 The request entity is too large. - * 500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. - * */ @@ -5398,6 +5408,8 @@ private okhttp3.Call createVolumeValidateBeforeCall( * 401 A request which was not authorized. - * 403 A request which was forbidden. - * 404 The object was not found. - + * 409 A conflict has occurred. - + * 413 The request entity is too large. - * 500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. - * */ @@ -5431,6 +5443,8 @@ public Volume createVolume( * 401 A request which was not authorized. - * 403 A request which was forbidden. - * 404 The object was not found. - + * 409 A conflict has occurred. - + * 413 The request entity is too large. - * 500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. - * */ @@ -5466,6 +5480,8 @@ public ApiResponse createVolumeWithHttpInfo( * 401 A request which was not authorized. - * 403 A request which was forbidden. - * 404 The object was not found. - + * 409 A conflict has occurred. - + * 413 The request entity is too large. - * 500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. - * */ @@ -27476,12 +27492,12 @@ public okhttp3.Call updateVolumeAsync( } /** - * Build call for v2beta1ConfigureNetworkAreaRegion + * Build call for v2beta1CreateNetworkAreaRegion * * @param organizationId The identifier (ID) of a STACKIT Organization. (required) * @param areaId The identifier (ID) of a STACKIT Network Area. (required) * @param region The STACKIT Region of the resources. (required) - * @param v2beta1ConfigureNetworkAreaRegionPayload Request to add a new regional network area + * @param v2beta1CreateNetworkAreaRegionPayload Request to add a new regional network area * configuration. (required) * @param _callback Callback for upload/download progress * @return Call to execute @@ -27499,13 +27515,12 @@ public okhttp3.Call updateVolumeAsync( * 500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. - * */ - public okhttp3.Call v2beta1ConfigureNetworkAreaRegionCall( + public okhttp3.Call v2beta1CreateNetworkAreaRegionCall( @javax.annotation.Nonnull UUID organizationId, @javax.annotation.Nonnull UUID areaId, @javax.annotation.Nonnull String region, @javax.annotation.Nonnull - V2beta1ConfigureNetworkAreaRegionPayload - v2beta1ConfigureNetworkAreaRegionPayload, + V2beta1CreateNetworkAreaRegionPayload v2beta1CreateNetworkAreaRegionPayload, final ApiCallback _callback) throws ApiException { String basePath = null; @@ -27521,7 +27536,7 @@ public okhttp3.Call v2beta1ConfigureNetworkAreaRegionCall( basePath = null; } - Object localVarPostBody = v2beta1ConfigureNetworkAreaRegionPayload; + Object localVarPostBody = v2beta1CreateNetworkAreaRegionPayload; // create path and map variables String localVarPath = @@ -27571,45 +27586,40 @@ public okhttp3.Call v2beta1ConfigureNetworkAreaRegionCall( } @SuppressWarnings("rawtypes") - private okhttp3.Call v2beta1ConfigureNetworkAreaRegionValidateBeforeCall( + private okhttp3.Call v2beta1CreateNetworkAreaRegionValidateBeforeCall( @javax.annotation.Nonnull UUID organizationId, @javax.annotation.Nonnull UUID areaId, @javax.annotation.Nonnull String region, @javax.annotation.Nonnull - V2beta1ConfigureNetworkAreaRegionPayload - v2beta1ConfigureNetworkAreaRegionPayload, + V2beta1CreateNetworkAreaRegionPayload v2beta1CreateNetworkAreaRegionPayload, final ApiCallback _callback) throws ApiException { // verify the required parameter 'organizationId' is set if (organizationId == null) { throw new ApiException( - "Missing the required parameter 'organizationId' when calling v2beta1ConfigureNetworkAreaRegion(Async)"); + "Missing the required parameter 'organizationId' when calling v2beta1CreateNetworkAreaRegion(Async)"); } // verify the required parameter 'areaId' is set if (areaId == null) { throw new ApiException( - "Missing the required parameter 'areaId' when calling v2beta1ConfigureNetworkAreaRegion(Async)"); + "Missing the required parameter 'areaId' when calling v2beta1CreateNetworkAreaRegion(Async)"); } // verify the required parameter 'region' is set if (region == null) { throw new ApiException( - "Missing the required parameter 'region' when calling v2beta1ConfigureNetworkAreaRegion(Async)"); + "Missing the required parameter 'region' when calling v2beta1CreateNetworkAreaRegion(Async)"); } - // verify the required parameter 'v2beta1ConfigureNetworkAreaRegionPayload' is set - if (v2beta1ConfigureNetworkAreaRegionPayload == null) { + // verify the required parameter 'v2beta1CreateNetworkAreaRegionPayload' is set + if (v2beta1CreateNetworkAreaRegionPayload == null) { throw new ApiException( - "Missing the required parameter 'v2beta1ConfigureNetworkAreaRegionPayload' when calling v2beta1ConfigureNetworkAreaRegion(Async)"); + "Missing the required parameter 'v2beta1CreateNetworkAreaRegionPayload' when calling v2beta1CreateNetworkAreaRegion(Async)"); } - return v2beta1ConfigureNetworkAreaRegionCall( - organizationId, - areaId, - region, - v2beta1ConfigureNetworkAreaRegionPayload, - _callback); + return v2beta1CreateNetworkAreaRegionCall( + organizationId, areaId, region, v2beta1CreateNetworkAreaRegionPayload, _callback); } /** @@ -27618,7 +27628,7 @@ private okhttp3.Call v2beta1ConfigureNetworkAreaRegionValidateBeforeCall( * @param organizationId The identifier (ID) of a STACKIT Organization. (required) * @param areaId The identifier (ID) of a STACKIT Network Area. (required) * @param region The STACKIT Region of the resources. (required) - * @param v2beta1ConfigureNetworkAreaRegionPayload Request to add a new regional network area + * @param v2beta1CreateNetworkAreaRegionPayload Request to add a new regional network area * configuration. (required) * @return RegionalArea * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -27636,17 +27646,16 @@ private okhttp3.Call v2beta1ConfigureNetworkAreaRegionValidateBeforeCall( * 500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. - * */ - public RegionalArea v2beta1ConfigureNetworkAreaRegion( + public RegionalArea v2beta1CreateNetworkAreaRegion( @javax.annotation.Nonnull UUID organizationId, @javax.annotation.Nonnull UUID areaId, @javax.annotation.Nonnull String region, @javax.annotation.Nonnull - V2beta1ConfigureNetworkAreaRegionPayload - v2beta1ConfigureNetworkAreaRegionPayload) + V2beta1CreateNetworkAreaRegionPayload v2beta1CreateNetworkAreaRegionPayload) throws ApiException { ApiResponse localVarResp = - v2beta1ConfigureNetworkAreaRegionWithHttpInfo( - organizationId, areaId, region, v2beta1ConfigureNetworkAreaRegionPayload); + v2beta1CreateNetworkAreaRegionWithHttpInfo( + organizationId, areaId, region, v2beta1CreateNetworkAreaRegionPayload); return localVarResp.getData(); } @@ -27656,7 +27665,7 @@ public RegionalArea v2beta1ConfigureNetworkAreaRegion( * @param organizationId The identifier (ID) of a STACKIT Organization. (required) * @param areaId The identifier (ID) of a STACKIT Network Area. (required) * @param region The STACKIT Region of the resources. (required) - * @param v2beta1ConfigureNetworkAreaRegionPayload Request to add a new regional network area + * @param v2beta1CreateNetworkAreaRegionPayload Request to add a new regional network area * configuration. (required) * @return ApiResponse<RegionalArea> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the @@ -27674,20 +27683,19 @@ public RegionalArea v2beta1ConfigureNetworkAreaRegion( * 500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. - * */ - public ApiResponse v2beta1ConfigureNetworkAreaRegionWithHttpInfo( + public ApiResponse v2beta1CreateNetworkAreaRegionWithHttpInfo( @javax.annotation.Nonnull UUID organizationId, @javax.annotation.Nonnull UUID areaId, @javax.annotation.Nonnull String region, @javax.annotation.Nonnull - V2beta1ConfigureNetworkAreaRegionPayload - v2beta1ConfigureNetworkAreaRegionPayload) + V2beta1CreateNetworkAreaRegionPayload v2beta1CreateNetworkAreaRegionPayload) throws ApiException { okhttp3.Call localVarCall = - v2beta1ConfigureNetworkAreaRegionValidateBeforeCall( + v2beta1CreateNetworkAreaRegionValidateBeforeCall( organizationId, areaId, region, - v2beta1ConfigureNetworkAreaRegionPayload, + v2beta1CreateNetworkAreaRegionPayload, null); Type localVarReturnType = new TypeToken() {}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -27700,7 +27708,7 @@ public ApiResponse v2beta1ConfigureNetworkAreaRegionWithHttpInfo( * @param organizationId The identifier (ID) of a STACKIT Organization. (required) * @param areaId The identifier (ID) of a STACKIT Network Area. (required) * @param region The STACKIT Region of the resources. (required) - * @param v2beta1ConfigureNetworkAreaRegionPayload Request to add a new regional network area + * @param v2beta1CreateNetworkAreaRegionPayload Request to add a new regional network area * configuration. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -27719,22 +27727,21 @@ public ApiResponse v2beta1ConfigureNetworkAreaRegionWithHttpInfo( * 500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. - * */ - public okhttp3.Call v2beta1ConfigureNetworkAreaRegionAsync( + public okhttp3.Call v2beta1CreateNetworkAreaRegionAsync( @javax.annotation.Nonnull UUID organizationId, @javax.annotation.Nonnull UUID areaId, @javax.annotation.Nonnull String region, @javax.annotation.Nonnull - V2beta1ConfigureNetworkAreaRegionPayload - v2beta1ConfigureNetworkAreaRegionPayload, + V2beta1CreateNetworkAreaRegionPayload v2beta1CreateNetworkAreaRegionPayload, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = - v2beta1ConfigureNetworkAreaRegionValidateBeforeCall( + v2beta1CreateNetworkAreaRegionValidateBeforeCall( organizationId, areaId, region, - v2beta1ConfigureNetworkAreaRegionPayload, + v2beta1CreateNetworkAreaRegionPayload, _callback); Type localVarReturnType = new TypeToken() {}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); @@ -27759,6 +27766,8 @@ public okhttp3.Call v2beta1ConfigureNetworkAreaRegionAsync( * 401 A request which was not authorized. - * 403 A request which was forbidden. - * 404 The object was not found. - + * 409 A conflict has occurred. - + * 413 The request entity is too large. - * 500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. - * */ @@ -27874,6 +27883,8 @@ private okhttp3.Call v2beta1CreateSnapshotValidateBeforeCall( * 401 A request which was not authorized. - * 403 A request which was forbidden. - * 404 The object was not found. - + * 409 A conflict has occurred. - + * 413 The request entity is too large. - * 500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. - * */ @@ -27905,6 +27916,8 @@ public Snapshot v2beta1CreateSnapshot( * 401 A request which was not authorized. - * 403 A request which was forbidden. - * 404 The object was not found. - + * 409 A conflict has occurred. - + * 413 The request entity is too large. - * 500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. - * */ @@ -27939,6 +27952,8 @@ public ApiResponse v2beta1CreateSnapshotWithHttpInfo( * 401 A request which was not authorized. - * 403 A request which was forbidden. - * 404 The object was not found. - + * 409 A conflict has occurred. - + * 413 The request entity is too large. - * 500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. - * */ @@ -28389,7 +28404,7 @@ public okhttp3.Call v2beta1DeleteSnapshotAsync( } /** - * Build call for v2beta1GetAreaRegion + * Build call for v2beta1GetNetworkAreaRegion * * @param organizationId The identifier (ID) of a STACKIT Organization. (required) * @param areaId The identifier (ID) of a STACKIT Network Area. (required) @@ -28409,7 +28424,7 @@ public okhttp3.Call v2beta1DeleteSnapshotAsync( * 500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. - * */ - public okhttp3.Call v2beta1GetAreaRegionCall( + public okhttp3.Call v2beta1GetNetworkAreaRegionCall( @javax.annotation.Nonnull UUID organizationId, @javax.annotation.Nonnull UUID areaId, @javax.annotation.Nonnull String region, @@ -28478,7 +28493,7 @@ public okhttp3.Call v2beta1GetAreaRegionCall( } @SuppressWarnings("rawtypes") - private okhttp3.Call v2beta1GetAreaRegionValidateBeforeCall( + private okhttp3.Call v2beta1GetNetworkAreaRegionValidateBeforeCall( @javax.annotation.Nonnull UUID organizationId, @javax.annotation.Nonnull UUID areaId, @javax.annotation.Nonnull String region, @@ -28487,22 +28502,22 @@ private okhttp3.Call v2beta1GetAreaRegionValidateBeforeCall( // verify the required parameter 'organizationId' is set if (organizationId == null) { throw new ApiException( - "Missing the required parameter 'organizationId' when calling v2beta1GetAreaRegion(Async)"); + "Missing the required parameter 'organizationId' when calling v2beta1GetNetworkAreaRegion(Async)"); } // verify the required parameter 'areaId' is set if (areaId == null) { throw new ApiException( - "Missing the required parameter 'areaId' when calling v2beta1GetAreaRegion(Async)"); + "Missing the required parameter 'areaId' when calling v2beta1GetNetworkAreaRegion(Async)"); } // verify the required parameter 'region' is set if (region == null) { throw new ApiException( - "Missing the required parameter 'region' when calling v2beta1GetAreaRegion(Async)"); + "Missing the required parameter 'region' when calling v2beta1GetNetworkAreaRegion(Async)"); } - return v2beta1GetAreaRegionCall(organizationId, areaId, region, _callback); + return v2beta1GetNetworkAreaRegionCall(organizationId, areaId, region, _callback); } /** @@ -28527,13 +28542,13 @@ private okhttp3.Call v2beta1GetAreaRegionValidateBeforeCall( * 500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. - * */ - public RegionalArea v2beta1GetAreaRegion( + public RegionalArea v2beta1GetNetworkAreaRegion( @javax.annotation.Nonnull UUID organizationId, @javax.annotation.Nonnull UUID areaId, @javax.annotation.Nonnull String region) throws ApiException { ApiResponse localVarResp = - v2beta1GetAreaRegionWithHttpInfo(organizationId, areaId, region); + v2beta1GetNetworkAreaRegionWithHttpInfo(organizationId, areaId, region); return localVarResp.getData(); } @@ -28559,13 +28574,13 @@ public RegionalArea v2beta1GetAreaRegion( * 500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. - * */ - public ApiResponse v2beta1GetAreaRegionWithHttpInfo( + public ApiResponse v2beta1GetNetworkAreaRegionWithHttpInfo( @javax.annotation.Nonnull UUID organizationId, @javax.annotation.Nonnull UUID areaId, @javax.annotation.Nonnull String region) throws ApiException { okhttp3.Call localVarCall = - v2beta1GetAreaRegionValidateBeforeCall(organizationId, areaId, region, null); + v2beta1GetNetworkAreaRegionValidateBeforeCall(organizationId, areaId, region, null); Type localVarReturnType = new TypeToken() {}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -28593,7 +28608,7 @@ public ApiResponse v2beta1GetAreaRegionWithHttpInfo( * 500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. - * */ - public okhttp3.Call v2beta1GetAreaRegionAsync( + public okhttp3.Call v2beta1GetNetworkAreaRegionAsync( @javax.annotation.Nonnull UUID organizationId, @javax.annotation.Nonnull UUID areaId, @javax.annotation.Nonnull String region, @@ -28601,7 +28616,8 @@ public okhttp3.Call v2beta1GetAreaRegionAsync( throws ApiException { okhttp3.Call localVarCall = - v2beta1GetAreaRegionValidateBeforeCall(organizationId, areaId, region, _callback); + v2beta1GetNetworkAreaRegionValidateBeforeCall( + organizationId, areaId, region, _callback); Type localVarReturnType = new TypeToken() {}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; @@ -28824,7 +28840,7 @@ public okhttp3.Call v2beta1GetSnapshotAsync( } /** - * Build call for v2beta1ListAreaRegions + * Build call for v2beta1ListNetworkAreaRegions * * @param organizationId The identifier (ID) of a STACKIT Organization. (required) * @param areaId The identifier (ID) of a STACKIT Network Area. (required) @@ -28843,7 +28859,7 @@ public okhttp3.Call v2beta1GetSnapshotAsync( * 500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. - * */ - public okhttp3.Call v2beta1ListAreaRegionsCall( + public okhttp3.Call v2beta1ListNetworkAreaRegionsCall( @javax.annotation.Nonnull UUID organizationId, @javax.annotation.Nonnull UUID areaId, final ApiCallback _callback) @@ -28908,7 +28924,7 @@ public okhttp3.Call v2beta1ListAreaRegionsCall( } @SuppressWarnings("rawtypes") - private okhttp3.Call v2beta1ListAreaRegionsValidateBeforeCall( + private okhttp3.Call v2beta1ListNetworkAreaRegionsValidateBeforeCall( @javax.annotation.Nonnull UUID organizationId, @javax.annotation.Nonnull UUID areaId, final ApiCallback _callback) @@ -28916,16 +28932,16 @@ private okhttp3.Call v2beta1ListAreaRegionsValidateBeforeCall( // verify the required parameter 'organizationId' is set if (organizationId == null) { throw new ApiException( - "Missing the required parameter 'organizationId' when calling v2beta1ListAreaRegions(Async)"); + "Missing the required parameter 'organizationId' when calling v2beta1ListNetworkAreaRegions(Async)"); } // verify the required parameter 'areaId' is set if (areaId == null) { throw new ApiException( - "Missing the required parameter 'areaId' when calling v2beta1ListAreaRegions(Async)"); + "Missing the required parameter 'areaId' when calling v2beta1ListNetworkAreaRegions(Async)"); } - return v2beta1ListAreaRegionsCall(organizationId, areaId, _callback); + return v2beta1ListNetworkAreaRegionsCall(organizationId, areaId, _callback); } /** @@ -28948,11 +28964,11 @@ private okhttp3.Call v2beta1ListAreaRegionsValidateBeforeCall( * 500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. - * */ - public RegionalAreaListResponse v2beta1ListAreaRegions( + public RegionalAreaListResponse v2beta1ListNetworkAreaRegions( @javax.annotation.Nonnull UUID organizationId, @javax.annotation.Nonnull UUID areaId) throws ApiException { ApiResponse localVarResp = - v2beta1ListAreaRegionsWithHttpInfo(organizationId, areaId); + v2beta1ListNetworkAreaRegionsWithHttpInfo(organizationId, areaId); return localVarResp.getData(); } @@ -28976,11 +28992,11 @@ public RegionalAreaListResponse v2beta1ListAreaRegions( * 500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. - * */ - public ApiResponse v2beta1ListAreaRegionsWithHttpInfo( + public ApiResponse v2beta1ListNetworkAreaRegionsWithHttpInfo( @javax.annotation.Nonnull UUID organizationId, @javax.annotation.Nonnull UUID areaId) throws ApiException { okhttp3.Call localVarCall = - v2beta1ListAreaRegionsValidateBeforeCall(organizationId, areaId, null); + v2beta1ListNetworkAreaRegionsValidateBeforeCall(organizationId, areaId, null); Type localVarReturnType = new TypeToken() {}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -29007,21 +29023,21 @@ public ApiResponse v2beta1ListAreaRegionsWithHttpInfo( * 500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. - * */ - public okhttp3.Call v2beta1ListAreaRegionsAsync( + public okhttp3.Call v2beta1ListNetworkAreaRegionsAsync( @javax.annotation.Nonnull UUID organizationId, @javax.annotation.Nonnull UUID areaId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = - v2beta1ListAreaRegionsValidateBeforeCall(organizationId, areaId, _callback); + v2beta1ListNetworkAreaRegionsValidateBeforeCall(organizationId, areaId, _callback); Type localVarReturnType = new TypeToken() {}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** - * Build call for v2beta1ListSnapshotsInProject + * Build call for v2beta1ListSnapshots * * @param projectId The identifier (ID) of a STACKIT Project. (required) * @param region The STACKIT Region of the resources. (required) @@ -29041,7 +29057,7 @@ public okhttp3.Call v2beta1ListAreaRegionsAsync( * 500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. - * */ - public okhttp3.Call v2beta1ListSnapshotsInProjectCall( + public okhttp3.Call v2beta1ListSnapshotsCall( @javax.annotation.Nonnull UUID projectId, @javax.annotation.Nonnull String region, @javax.annotation.Nullable String labelSelector, @@ -29112,7 +29128,7 @@ public okhttp3.Call v2beta1ListSnapshotsInProjectCall( } @SuppressWarnings("rawtypes") - private okhttp3.Call v2beta1ListSnapshotsInProjectValidateBeforeCall( + private okhttp3.Call v2beta1ListSnapshotsValidateBeforeCall( @javax.annotation.Nonnull UUID projectId, @javax.annotation.Nonnull String region, @javax.annotation.Nullable String labelSelector, @@ -29121,16 +29137,16 @@ private okhttp3.Call v2beta1ListSnapshotsInProjectValidateBeforeCall( // verify the required parameter 'projectId' is set if (projectId == null) { throw new ApiException( - "Missing the required parameter 'projectId' when calling v2beta1ListSnapshotsInProject(Async)"); + "Missing the required parameter 'projectId' when calling v2beta1ListSnapshots(Async)"); } // verify the required parameter 'region' is set if (region == null) { throw new ApiException( - "Missing the required parameter 'region' when calling v2beta1ListSnapshotsInProject(Async)"); + "Missing the required parameter 'region' when calling v2beta1ListSnapshots(Async)"); } - return v2beta1ListSnapshotsInProjectCall(projectId, region, labelSelector, _callback); + return v2beta1ListSnapshotsCall(projectId, region, labelSelector, _callback); } /** @@ -29154,13 +29170,13 @@ private okhttp3.Call v2beta1ListSnapshotsInProjectValidateBeforeCall( * 500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. - * */ - public SnapshotListResponse v2beta1ListSnapshotsInProject( + public SnapshotListResponse v2beta1ListSnapshots( @javax.annotation.Nonnull UUID projectId, @javax.annotation.Nonnull String region, @javax.annotation.Nullable String labelSelector) throws ApiException { ApiResponse localVarResp = - v2beta1ListSnapshotsInProjectWithHttpInfo(projectId, region, labelSelector); + v2beta1ListSnapshotsWithHttpInfo(projectId, region, labelSelector); return localVarResp.getData(); } @@ -29185,14 +29201,13 @@ public SnapshotListResponse v2beta1ListSnapshotsInProject( * 500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. - * */ - public ApiResponse v2beta1ListSnapshotsInProjectWithHttpInfo( + public ApiResponse v2beta1ListSnapshotsWithHttpInfo( @javax.annotation.Nonnull UUID projectId, @javax.annotation.Nonnull String region, @javax.annotation.Nullable String labelSelector) throws ApiException { okhttp3.Call localVarCall = - v2beta1ListSnapshotsInProjectValidateBeforeCall( - projectId, region, labelSelector, null); + v2beta1ListSnapshotsValidateBeforeCall(projectId, region, labelSelector, null); Type localVarReturnType = new TypeToken() {}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -29220,7 +29235,7 @@ public ApiResponse v2beta1ListSnapshotsInProjectWithHttpIn * 500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. - * */ - public okhttp3.Call v2beta1ListSnapshotsInProjectAsync( + public okhttp3.Call v2beta1ListSnapshotsAsync( @javax.annotation.Nonnull UUID projectId, @javax.annotation.Nonnull String region, @javax.annotation.Nullable String labelSelector, @@ -29228,8 +29243,7 @@ public okhttp3.Call v2beta1ListSnapshotsInProjectAsync( throws ApiException { okhttp3.Call localVarCall = - v2beta1ListSnapshotsInProjectValidateBeforeCall( - projectId, region, labelSelector, _callback); + v2beta1ListSnapshotsValidateBeforeCall(projectId, region, labelSelector, _callback); Type localVarReturnType = new TypeToken() {}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; @@ -29727,13 +29741,13 @@ public okhttp3.Call v2beta1UpdateNetworkAreaRegionAsync( } /** - * Build call for v2beta1UpdateRouteOfArea + * Build call for v2beta1UpdateNetworkAreaRoute * * @param organizationId The identifier (ID) of a STACKIT Organization. (required) * @param areaId The identifier (ID) of a STACKIT Network Area. (required) * @param region The STACKIT Region of the resources. (required) * @param routeId The identifier (ID) of a STACKIT Route. (required) - * @param v2beta1UpdateRouteOfAreaPayload Request an update of a network route. (required) + * @param v2beta1UpdateNetworkAreaRoutePayload Request an update of a network route. (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -29749,13 +29763,13 @@ public okhttp3.Call v2beta1UpdateNetworkAreaRegionAsync( * 500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. - * */ - public okhttp3.Call v2beta1UpdateRouteOfAreaCall( + public okhttp3.Call v2beta1UpdateNetworkAreaRouteCall( @javax.annotation.Nonnull UUID organizationId, @javax.annotation.Nonnull UUID areaId, @javax.annotation.Nonnull String region, @javax.annotation.Nonnull UUID routeId, @javax.annotation.Nonnull - V2beta1UpdateRouteOfAreaPayload v2beta1UpdateRouteOfAreaPayload, + V2beta1UpdateNetworkAreaRoutePayload v2beta1UpdateNetworkAreaRoutePayload, final ApiCallback _callback) throws ApiException { String basePath = null; @@ -29771,7 +29785,7 @@ public okhttp3.Call v2beta1UpdateRouteOfAreaCall( basePath = null; } - Object localVarPostBody = v2beta1UpdateRouteOfAreaPayload; + Object localVarPostBody = v2beta1UpdateNetworkAreaRoutePayload; // create path and map variables String localVarPath = @@ -29824,51 +29838,51 @@ public okhttp3.Call v2beta1UpdateRouteOfAreaCall( } @SuppressWarnings("rawtypes") - private okhttp3.Call v2beta1UpdateRouteOfAreaValidateBeforeCall( + private okhttp3.Call v2beta1UpdateNetworkAreaRouteValidateBeforeCall( @javax.annotation.Nonnull UUID organizationId, @javax.annotation.Nonnull UUID areaId, @javax.annotation.Nonnull String region, @javax.annotation.Nonnull UUID routeId, @javax.annotation.Nonnull - V2beta1UpdateRouteOfAreaPayload v2beta1UpdateRouteOfAreaPayload, + V2beta1UpdateNetworkAreaRoutePayload v2beta1UpdateNetworkAreaRoutePayload, final ApiCallback _callback) throws ApiException { // verify the required parameter 'organizationId' is set if (organizationId == null) { throw new ApiException( - "Missing the required parameter 'organizationId' when calling v2beta1UpdateRouteOfArea(Async)"); + "Missing the required parameter 'organizationId' when calling v2beta1UpdateNetworkAreaRoute(Async)"); } // verify the required parameter 'areaId' is set if (areaId == null) { throw new ApiException( - "Missing the required parameter 'areaId' when calling v2beta1UpdateRouteOfArea(Async)"); + "Missing the required parameter 'areaId' when calling v2beta1UpdateNetworkAreaRoute(Async)"); } // verify the required parameter 'region' is set if (region == null) { throw new ApiException( - "Missing the required parameter 'region' when calling v2beta1UpdateRouteOfArea(Async)"); + "Missing the required parameter 'region' when calling v2beta1UpdateNetworkAreaRoute(Async)"); } // verify the required parameter 'routeId' is set if (routeId == null) { throw new ApiException( - "Missing the required parameter 'routeId' when calling v2beta1UpdateRouteOfArea(Async)"); + "Missing the required parameter 'routeId' when calling v2beta1UpdateNetworkAreaRoute(Async)"); } - // verify the required parameter 'v2beta1UpdateRouteOfAreaPayload' is set - if (v2beta1UpdateRouteOfAreaPayload == null) { + // verify the required parameter 'v2beta1UpdateNetworkAreaRoutePayload' is set + if (v2beta1UpdateNetworkAreaRoutePayload == null) { throw new ApiException( - "Missing the required parameter 'v2beta1UpdateRouteOfAreaPayload' when calling v2beta1UpdateRouteOfArea(Async)"); + "Missing the required parameter 'v2beta1UpdateNetworkAreaRoutePayload' when calling v2beta1UpdateNetworkAreaRoute(Async)"); } - return v2beta1UpdateRouteOfAreaCall( + return v2beta1UpdateNetworkAreaRouteCall( organizationId, areaId, region, routeId, - v2beta1UpdateRouteOfAreaPayload, + v2beta1UpdateNetworkAreaRoutePayload, _callback); } @@ -29879,7 +29893,7 @@ private okhttp3.Call v2beta1UpdateRouteOfAreaValidateBeforeCall( * @param areaId The identifier (ID) of a STACKIT Network Area. (required) * @param region The STACKIT Region of the resources. (required) * @param routeId The identifier (ID) of a STACKIT Route. (required) - * @param v2beta1UpdateRouteOfAreaPayload Request an update of a network route. (required) + * @param v2beta1UpdateNetworkAreaRoutePayload Request an update of a network route. (required) * @return Route * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -29895,17 +29909,21 @@ private okhttp3.Call v2beta1UpdateRouteOfAreaValidateBeforeCall( * 500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. - * */ - public Route v2beta1UpdateRouteOfArea( + public Route v2beta1UpdateNetworkAreaRoute( @javax.annotation.Nonnull UUID organizationId, @javax.annotation.Nonnull UUID areaId, @javax.annotation.Nonnull String region, @javax.annotation.Nonnull UUID routeId, @javax.annotation.Nonnull - V2beta1UpdateRouteOfAreaPayload v2beta1UpdateRouteOfAreaPayload) + V2beta1UpdateNetworkAreaRoutePayload v2beta1UpdateNetworkAreaRoutePayload) throws ApiException { ApiResponse localVarResp = - v2beta1UpdateRouteOfAreaWithHttpInfo( - organizationId, areaId, region, routeId, v2beta1UpdateRouteOfAreaPayload); + v2beta1UpdateNetworkAreaRouteWithHttpInfo( + organizationId, + areaId, + region, + routeId, + v2beta1UpdateNetworkAreaRoutePayload); return localVarResp.getData(); } @@ -29916,7 +29934,7 @@ public Route v2beta1UpdateRouteOfArea( * @param areaId The identifier (ID) of a STACKIT Network Area. (required) * @param region The STACKIT Region of the resources. (required) * @param routeId The identifier (ID) of a STACKIT Route. (required) - * @param v2beta1UpdateRouteOfAreaPayload Request an update of a network route. (required) + * @param v2beta1UpdateNetworkAreaRoutePayload Request an update of a network route. (required) * @return ApiResponse<Route> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the * response body @@ -29932,21 +29950,21 @@ public Route v2beta1UpdateRouteOfArea( * 500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. - * */ - public ApiResponse v2beta1UpdateRouteOfAreaWithHttpInfo( + public ApiResponse v2beta1UpdateNetworkAreaRouteWithHttpInfo( @javax.annotation.Nonnull UUID organizationId, @javax.annotation.Nonnull UUID areaId, @javax.annotation.Nonnull String region, @javax.annotation.Nonnull UUID routeId, @javax.annotation.Nonnull - V2beta1UpdateRouteOfAreaPayload v2beta1UpdateRouteOfAreaPayload) + V2beta1UpdateNetworkAreaRoutePayload v2beta1UpdateNetworkAreaRoutePayload) throws ApiException { okhttp3.Call localVarCall = - v2beta1UpdateRouteOfAreaValidateBeforeCall( + v2beta1UpdateNetworkAreaRouteValidateBeforeCall( organizationId, areaId, region, routeId, - v2beta1UpdateRouteOfAreaPayload, + v2beta1UpdateNetworkAreaRoutePayload, null); Type localVarReturnType = new TypeToken() {}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -29959,7 +29977,7 @@ public ApiResponse v2beta1UpdateRouteOfAreaWithHttpInfo( * @param areaId The identifier (ID) of a STACKIT Network Area. (required) * @param region The STACKIT Region of the resources. (required) * @param routeId The identifier (ID) of a STACKIT Route. (required) - * @param v2beta1UpdateRouteOfAreaPayload Request an update of a network route. (required) + * @param v2beta1UpdateNetworkAreaRoutePayload Request an update of a network route. (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body @@ -29976,23 +29994,23 @@ public ApiResponse v2beta1UpdateRouteOfAreaWithHttpInfo( * 500 Internal Server Error, returns a 500 if something is broken on IaaS API Side. - * */ - public okhttp3.Call v2beta1UpdateRouteOfAreaAsync( + public okhttp3.Call v2beta1UpdateNetworkAreaRouteAsync( @javax.annotation.Nonnull UUID organizationId, @javax.annotation.Nonnull UUID areaId, @javax.annotation.Nonnull String region, @javax.annotation.Nonnull UUID routeId, @javax.annotation.Nonnull - V2beta1UpdateRouteOfAreaPayload v2beta1UpdateRouteOfAreaPayload, + V2beta1UpdateNetworkAreaRoutePayload v2beta1UpdateNetworkAreaRoutePayload, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = - v2beta1UpdateRouteOfAreaValidateBeforeCall( + v2beta1UpdateNetworkAreaRouteValidateBeforeCall( organizationId, areaId, region, routeId, - v2beta1UpdateRouteOfAreaPayload, + v2beta1UpdateNetworkAreaRoutePayload, _callback); Type localVarReturnType = new TypeToken() {}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/AddRoutingTableToAreaPayload.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/AddRoutingTableToAreaPayload.java index 012110aa..f1a4a9f3 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/AddRoutingTableToAreaPayload.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/AddRoutingTableToAreaPayload.java @@ -32,7 +32,10 @@ import java.util.Objects; import java.util.UUID; -/** An object representing a routing table. */ +/** + * An object representing a routing table. Filterable Fields: `dynamicRoutes`, + * `systemRoutes`. + */ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.19.0") diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/CreateNetworkAreaRangePayload.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/CreateNetworkAreaRangePayload.java index 64f7aec4..ff289778 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/CreateNetworkAreaRangePayload.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/CreateNetworkAreaRangePayload.java @@ -58,7 +58,7 @@ public CreateNetworkAreaRangePayload addIpv4Item(NetworkRange ipv4Item) { } /** - * A list of network ranges. + * A list of network area network ranges. * * @return ipv4 */ diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/CreateNetworkIPv4WithPrefix.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/CreateNetworkIPv4WithPrefix.java index 48460bd5..94eb8d24 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/CreateNetworkIPv4WithPrefix.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/CreateNetworkIPv4WithPrefix.java @@ -30,6 +30,7 @@ import java.util.List; import java.util.Map; import java.util.Objects; +import java.util.UUID; import org.openapitools.jackson.nullable.JsonNullable; /** The create request for an IPv4 network with a specified prefix. */ @@ -53,6 +54,11 @@ public class CreateNetworkIPv4WithPrefix { @javax.annotation.Nonnull private String prefix; + public static final String SERIALIZED_NAME_VPC_NETWORK_RANGE_ID = "vpcNetworkRangeId"; + + @SerializedName(SERIALIZED_NAME_VPC_NETWORK_RANGE_ID) + @javax.annotation.Nullable private UUID vpcNetworkRangeId; + public CreateNetworkIPv4WithPrefix() {} public CreateNetworkIPv4WithPrefix gateway(@javax.annotation.Nullable String gateway) { @@ -120,6 +126,25 @@ public void setPrefix(@javax.annotation.Nonnull String prefix) { this.prefix = prefix; } + public CreateNetworkIPv4WithPrefix vpcNetworkRangeId( + @javax.annotation.Nullable UUID vpcNetworkRangeId) { + this.vpcNetworkRangeId = vpcNetworkRangeId; + return this; + } + + /** + * Universally Unique Identifier (UUID). + * + * @return vpcNetworkRangeId + */ + @javax.annotation.Nullable public UUID getVpcNetworkRangeId() { + return vpcNetworkRangeId; + } + + public void setVpcNetworkRangeId(@javax.annotation.Nullable UUID vpcNetworkRangeId) { + this.vpcNetworkRangeId = vpcNetworkRangeId; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -176,6 +201,8 @@ public boolean equals(Object o) { return Objects.equals(this.gateway, createNetworkIPv4WithPrefix.gateway) && Objects.equals(this.nameservers, createNetworkIPv4WithPrefix.nameservers) && Objects.equals(this.prefix, createNetworkIPv4WithPrefix.prefix) + && Objects.equals( + this.vpcNetworkRangeId, createNetworkIPv4WithPrefix.vpcNetworkRangeId) && Objects.equals( this.additionalProperties, createNetworkIPv4WithPrefix.additionalProperties); @@ -192,7 +219,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(gateway, nameservers, prefix, additionalProperties); + return Objects.hash(gateway, nameservers, prefix, vpcNetworkRangeId, additionalProperties); } private static int hashCodeNullable(JsonNullable a) { @@ -209,6 +236,9 @@ public String toString() { sb.append(" gateway: ").append(toIndentedString(gateway)).append("\n"); sb.append(" nameservers: ").append(toIndentedString(nameservers)).append("\n"); sb.append(" prefix: ").append(toIndentedString(prefix)).append("\n"); + sb.append(" vpcNetworkRangeId: ") + .append(toIndentedString(vpcNetworkRangeId)) + .append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); @@ -232,7 +262,9 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("gateway", "nameservers", "prefix")); + openapiFields = + new HashSet( + Arrays.asList("gateway", "nameservers", "prefix", "vpcNetworkRangeId")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("prefix")); @@ -294,6 +326,15 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti "Expected the field `prefix` to be a primitive type in the JSON string but got `%s`", jsonObj.get("prefix").toString())); } + if ((jsonObj.get("vpcNetworkRangeId") != null + && !jsonObj.get("vpcNetworkRangeId").isJsonNull()) + && !jsonObj.get("vpcNetworkRangeId").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `vpcNetworkRangeId` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("vpcNetworkRangeId").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/CreateNetworkIPv4WithPrefixLength.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/CreateNetworkIPv4WithPrefixLength.java index 7ad59c7a..1faa970b 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/CreateNetworkIPv4WithPrefixLength.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/CreateNetworkIPv4WithPrefixLength.java @@ -30,6 +30,7 @@ import java.util.List; import java.util.Map; import java.util.Objects; +import java.util.UUID; /** The create request for an IPv4 network with a wanted prefix length. */ @javax.annotation.Generated( @@ -47,6 +48,11 @@ public class CreateNetworkIPv4WithPrefixLength { @javax.annotation.Nonnull private Long prefixLength; + public static final String SERIALIZED_NAME_VPC_NETWORK_RANGE_ID = "vpcNetworkRangeId"; + + @SerializedName(SERIALIZED_NAME_VPC_NETWORK_RANGE_ID) + @javax.annotation.Nullable private UUID vpcNetworkRangeId; + public CreateNetworkIPv4WithPrefixLength() {} public CreateNetworkIPv4WithPrefixLength nameservers( @@ -96,6 +102,25 @@ public void setPrefixLength(@javax.annotation.Nonnull Long prefixLength) { this.prefixLength = prefixLength; } + public CreateNetworkIPv4WithPrefixLength vpcNetworkRangeId( + @javax.annotation.Nullable UUID vpcNetworkRangeId) { + this.vpcNetworkRangeId = vpcNetworkRangeId; + return this; + } + + /** + * Universally Unique Identifier (UUID). + * + * @return vpcNetworkRangeId + */ + @javax.annotation.Nullable public UUID getVpcNetworkRangeId() { + return vpcNetworkRangeId; + } + + public void setVpcNetworkRangeId(@javax.annotation.Nullable UUID vpcNetworkRangeId) { + this.vpcNetworkRangeId = vpcNetworkRangeId; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -152,6 +177,8 @@ public boolean equals(Object o) { (CreateNetworkIPv4WithPrefixLength) o; return Objects.equals(this.nameservers, createNetworkIPv4WithPrefixLength.nameservers) && Objects.equals(this.prefixLength, createNetworkIPv4WithPrefixLength.prefixLength) + && Objects.equals( + this.vpcNetworkRangeId, createNetworkIPv4WithPrefixLength.vpcNetworkRangeId) && Objects.equals( this.additionalProperties, createNetworkIPv4WithPrefixLength.additionalProperties); @@ -159,7 +186,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(nameservers, prefixLength, additionalProperties); + return Objects.hash(nameservers, prefixLength, vpcNetworkRangeId, additionalProperties); } @Override @@ -168,6 +195,9 @@ public String toString() { sb.append("class CreateNetworkIPv4WithPrefixLength {\n"); sb.append(" nameservers: ").append(toIndentedString(nameservers)).append("\n"); sb.append(" prefixLength: ").append(toIndentedString(prefixLength)).append("\n"); + sb.append(" vpcNetworkRangeId: ") + .append(toIndentedString(vpcNetworkRangeId)) + .append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); @@ -191,7 +221,9 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("nameservers", "prefixLength")); + openapiFields = + new HashSet( + Arrays.asList("nameservers", "prefixLength", "vpcNetworkRangeId")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("prefixLength")); @@ -239,6 +271,15 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti "Expected the field `nameservers` to be an array in the JSON string but got `%s`", jsonObj.get("nameservers").toString())); } + if ((jsonObj.get("vpcNetworkRangeId") != null + && !jsonObj.get("vpcNetworkRangeId").isJsonNull()) + && !jsonObj.get("vpcNetworkRangeId").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `vpcNetworkRangeId` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("vpcNetworkRangeId").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/CreateNetworkIPv6WithPrefix.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/CreateNetworkIPv6WithPrefix.java index 637ed2ae..30bb784a 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/CreateNetworkIPv6WithPrefix.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/CreateNetworkIPv6WithPrefix.java @@ -30,6 +30,7 @@ import java.util.List; import java.util.Map; import java.util.Objects; +import java.util.UUID; import org.openapitools.jackson.nullable.JsonNullable; /** The create request for an IPv6 network with a specified prefix. */ @@ -53,6 +54,11 @@ public class CreateNetworkIPv6WithPrefix { @javax.annotation.Nonnull private String prefix; + public static final String SERIALIZED_NAME_VPC_NETWORK_RANGE_ID = "vpcNetworkRangeId"; + + @SerializedName(SERIALIZED_NAME_VPC_NETWORK_RANGE_ID) + @javax.annotation.Nullable private UUID vpcNetworkRangeId; + public CreateNetworkIPv6WithPrefix() {} public CreateNetworkIPv6WithPrefix gateway(@javax.annotation.Nullable String gateway) { @@ -120,6 +126,25 @@ public void setPrefix(@javax.annotation.Nonnull String prefix) { this.prefix = prefix; } + public CreateNetworkIPv6WithPrefix vpcNetworkRangeId( + @javax.annotation.Nullable UUID vpcNetworkRangeId) { + this.vpcNetworkRangeId = vpcNetworkRangeId; + return this; + } + + /** + * Universally Unique Identifier (UUID). + * + * @return vpcNetworkRangeId + */ + @javax.annotation.Nullable public UUID getVpcNetworkRangeId() { + return vpcNetworkRangeId; + } + + public void setVpcNetworkRangeId(@javax.annotation.Nullable UUID vpcNetworkRangeId) { + this.vpcNetworkRangeId = vpcNetworkRangeId; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -176,6 +201,8 @@ public boolean equals(Object o) { return Objects.equals(this.gateway, createNetworkIPv6WithPrefix.gateway) && Objects.equals(this.nameservers, createNetworkIPv6WithPrefix.nameservers) && Objects.equals(this.prefix, createNetworkIPv6WithPrefix.prefix) + && Objects.equals( + this.vpcNetworkRangeId, createNetworkIPv6WithPrefix.vpcNetworkRangeId) && Objects.equals( this.additionalProperties, createNetworkIPv6WithPrefix.additionalProperties); @@ -192,7 +219,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(gateway, nameservers, prefix, additionalProperties); + return Objects.hash(gateway, nameservers, prefix, vpcNetworkRangeId, additionalProperties); } private static int hashCodeNullable(JsonNullable a) { @@ -209,6 +236,9 @@ public String toString() { sb.append(" gateway: ").append(toIndentedString(gateway)).append("\n"); sb.append(" nameservers: ").append(toIndentedString(nameservers)).append("\n"); sb.append(" prefix: ").append(toIndentedString(prefix)).append("\n"); + sb.append(" vpcNetworkRangeId: ") + .append(toIndentedString(vpcNetworkRangeId)) + .append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); @@ -232,7 +262,9 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("gateway", "nameservers", "prefix")); + openapiFields = + new HashSet( + Arrays.asList("gateway", "nameservers", "prefix", "vpcNetworkRangeId")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("prefix")); @@ -294,6 +326,15 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti "Expected the field `prefix` to be a primitive type in the JSON string but got `%s`", jsonObj.get("prefix").toString())); } + if ((jsonObj.get("vpcNetworkRangeId") != null + && !jsonObj.get("vpcNetworkRangeId").isJsonNull()) + && !jsonObj.get("vpcNetworkRangeId").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `vpcNetworkRangeId` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("vpcNetworkRangeId").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/CreateNetworkIPv6WithPrefixLength.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/CreateNetworkIPv6WithPrefixLength.java index dd596949..2000cdd1 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/CreateNetworkIPv6WithPrefixLength.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/CreateNetworkIPv6WithPrefixLength.java @@ -30,6 +30,7 @@ import java.util.List; import java.util.Map; import java.util.Objects; +import java.util.UUID; /** The create request for an IPv6 network with a wanted prefix length. */ @javax.annotation.Generated( @@ -47,6 +48,11 @@ public class CreateNetworkIPv6WithPrefixLength { @javax.annotation.Nonnull private Long prefixLength; + public static final String SERIALIZED_NAME_VPC_NETWORK_RANGE_ID = "vpcNetworkRangeId"; + + @SerializedName(SERIALIZED_NAME_VPC_NETWORK_RANGE_ID) + @javax.annotation.Nullable private UUID vpcNetworkRangeId; + public CreateNetworkIPv6WithPrefixLength() {} public CreateNetworkIPv6WithPrefixLength nameservers( @@ -96,6 +102,25 @@ public void setPrefixLength(@javax.annotation.Nonnull Long prefixLength) { this.prefixLength = prefixLength; } + public CreateNetworkIPv6WithPrefixLength vpcNetworkRangeId( + @javax.annotation.Nullable UUID vpcNetworkRangeId) { + this.vpcNetworkRangeId = vpcNetworkRangeId; + return this; + } + + /** + * Universally Unique Identifier (UUID). + * + * @return vpcNetworkRangeId + */ + @javax.annotation.Nullable public UUID getVpcNetworkRangeId() { + return vpcNetworkRangeId; + } + + public void setVpcNetworkRangeId(@javax.annotation.Nullable UUID vpcNetworkRangeId) { + this.vpcNetworkRangeId = vpcNetworkRangeId; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -152,6 +177,8 @@ public boolean equals(Object o) { (CreateNetworkIPv6WithPrefixLength) o; return Objects.equals(this.nameservers, createNetworkIPv6WithPrefixLength.nameservers) && Objects.equals(this.prefixLength, createNetworkIPv6WithPrefixLength.prefixLength) + && Objects.equals( + this.vpcNetworkRangeId, createNetworkIPv6WithPrefixLength.vpcNetworkRangeId) && Objects.equals( this.additionalProperties, createNetworkIPv6WithPrefixLength.additionalProperties); @@ -159,7 +186,7 @@ public boolean equals(Object o) { @Override public int hashCode() { - return Objects.hash(nameservers, prefixLength, additionalProperties); + return Objects.hash(nameservers, prefixLength, vpcNetworkRangeId, additionalProperties); } @Override @@ -168,6 +195,9 @@ public String toString() { sb.append("class CreateNetworkIPv6WithPrefixLength {\n"); sb.append(" nameservers: ").append(toIndentedString(nameservers)).append("\n"); sb.append(" prefixLength: ").append(toIndentedString(prefixLength)).append("\n"); + sb.append(" vpcNetworkRangeId: ") + .append(toIndentedString(vpcNetworkRangeId)) + .append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); @@ -191,7 +221,9 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("nameservers", "prefixLength")); + openapiFields = + new HashSet( + Arrays.asList("nameservers", "prefixLength", "vpcNetworkRangeId")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("prefixLength")); @@ -239,6 +271,15 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti "Expected the field `nameservers` to be an array in the JSON string but got `%s`", jsonObj.get("nameservers").toString())); } + if ((jsonObj.get("vpcNetworkRangeId") != null + && !jsonObj.get("vpcNetworkRangeId").isJsonNull()) + && !jsonObj.get("vpcNetworkRangeId").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `vpcNetworkRangeId` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("vpcNetworkRangeId").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/CreateNetworkPayload.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/CreateNetworkPayload.java index 6d9c03bf..22a63818 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/CreateNetworkPayload.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/CreateNetworkPayload.java @@ -72,6 +72,11 @@ public class CreateNetworkPayload { @SerializedName(SERIALIZED_NAME_ROUTING_TABLE_ID) @javax.annotation.Nullable private UUID routingTableId; + public static final String SERIALIZED_NAME_VPC_ID = "vpcId"; + + @SerializedName(SERIALIZED_NAME_VPC_ID) + @javax.annotation.Nullable private UUID vpcId; + public CreateNetworkPayload() {} public CreateNetworkPayload dhcp(@javax.annotation.Nullable Boolean dhcp) { @@ -205,6 +210,24 @@ public void setRoutingTableId(@javax.annotation.Nullable UUID routingTableId) { this.routingTableId = routingTableId; } + public CreateNetworkPayload vpcId(@javax.annotation.Nullable UUID vpcId) { + this.vpcId = vpcId; + return this; + } + + /** + * The identifier (ID) of a STACKIT VPC. + * + * @return vpcId + */ + @javax.annotation.Nullable public UUID getVpcId() { + return vpcId; + } + + public void setVpcId(@javax.annotation.Nullable UUID vpcId) { + this.vpcId = vpcId; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -265,6 +288,7 @@ public boolean equals(Object o) { && Objects.equals(this.name, createNetworkPayload.name) && Objects.equals(this.routed, createNetworkPayload.routed) && Objects.equals(this.routingTableId, createNetworkPayload.routingTableId) + && Objects.equals(this.vpcId, createNetworkPayload.vpcId) && Objects.equals( this.additionalProperties, createNetworkPayload.additionalProperties); } @@ -272,7 +296,15 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( - dhcp, ipv4, ipv6, labels, name, routed, routingTableId, additionalProperties); + dhcp, + ipv4, + ipv6, + labels, + name, + routed, + routingTableId, + vpcId, + additionalProperties); } @Override @@ -286,6 +318,7 @@ public String toString() { sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" routed: ").append(toIndentedString(routed)).append("\n"); sb.append(" routingTableId: ").append(toIndentedString(routingTableId)).append("\n"); + sb.append(" vpcId: ").append(toIndentedString(vpcId)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); @@ -318,7 +351,8 @@ private String toIndentedString(Object o) { "labels", "name", "routed", - "routingTableId")); + "routingTableId", + "vpcId")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("name")); @@ -377,6 +411,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti "Expected the field `routingTableId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("routingTableId").toString())); } + if ((jsonObj.get("vpcId") != null && !jsonObj.get("vpcId").isJsonNull()) + && !jsonObj.get("vpcId").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `vpcId` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("vpcId").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/CreateServerPayload.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/CreateServerPayload.java index de0c6d8b..be87a997 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/CreateServerPayload.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/CreateServerPayload.java @@ -167,6 +167,11 @@ public class CreateServerPayload { @SerializedName(SERIALIZED_NAME_VOLUMES) @javax.annotation.Nullable private List volumes; + public static final String SERIALIZED_NAME_VTPM = "vtpm"; + + @SerializedName(SERIALIZED_NAME_VTPM) + @javax.annotation.Nullable private ServerVTPM vtpm; + public CreateServerPayload() {} public CreateServerPayload( @@ -611,6 +616,24 @@ public void setVolumes(@javax.annotation.Nullable List volumes) { this.volumes = volumes; } + public CreateServerPayload vtpm(@javax.annotation.Nullable ServerVTPM vtpm) { + this.vtpm = vtpm; + return this; + } + + /** + * Get vtpm + * + * @return vtpm + */ + @javax.annotation.Nullable public ServerVTPM getVtpm() { + return vtpm; + } + + public void setVtpm(@javax.annotation.Nullable ServerVTPM vtpm) { + this.vtpm = vtpm; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -689,6 +712,7 @@ public boolean equals(Object o) { && Objects.equals(this.updatedAt, createServerPayload.updatedAt) && Arrays.equals(this.userData, createServerPayload.userData) && Objects.equals(this.volumes, createServerPayload.volumes) + && Objects.equals(this.vtpm, createServerPayload.vtpm) && Objects.equals( this.additionalProperties, createServerPayload.additionalProperties); } @@ -721,6 +745,7 @@ public int hashCode() { updatedAt, Arrays.hashCode(userData), volumes, + vtpm, additionalProperties); } @@ -757,6 +782,7 @@ public String toString() { sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); sb.append(" userData: ").append(toIndentedString(userData)).append("\n"); sb.append(" volumes: ").append(toIndentedString(volumes)).append("\n"); + sb.append(" vtpm: ").append(toIndentedString(vtpm)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); @@ -807,7 +833,8 @@ private String toIndentedString(Object o) { "status", "updatedAt", "userData", - "volumes")); + "volumes", + "vtpm")); // a set of required properties/fields (JSON key names) openapiRequiredFields = @@ -987,6 +1014,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti "Expected the field `volumes` to be an array in the JSON string but got `%s`", jsonObj.get("volumes").toString())); } + // validate the optional field `vtpm` + if (jsonObj.get("vtpm") != null && !jsonObj.get("vtpm").isJsonNull()) { + ServerVTPM.validateJsonElement(jsonObj.get("vtpm")); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/CreateVolumePayload.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/CreateVolumePayload.java index 9f8b4c4c..d0544f11 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/CreateVolumePayload.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/CreateVolumePayload.java @@ -361,8 +361,9 @@ public void setSource(@javax.annotation.Nullable VolumeSource source) { * `CREATING`, `DELETED`, `DELETING`, `DETACHING`, * `DOWNLOADING`, `ERROR`, `ERROR_BACKING-UP`, * `ERROR_DELETING`, `ERROR_RESIZING`, `ERROR_RESTORING-BACKUP`, - * `MAINTENANCE`, `RESERVED`, `RESIZING`, - * `RESTORING-BACKUP`, `RETYPING`, `UPLOADING`. + * `ERROR_KMS-ENCRYPTION-PARAMS`, `MAINTENANCE`, `RESERVED`, + * `RESIZING`, `RESTORING-BACKUP`, `RETYPING`, + * `UPLOADING`. * * @return status */ diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/Network.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/Network.java index a0196a55..f7c1fb43 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/Network.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/Network.java @@ -98,6 +98,11 @@ public class Network { @SerializedName(SERIALIZED_NAME_UPDATED_AT) @javax.annotation.Nullable private OffsetDateTime updatedAt; + public static final String SERIALIZED_NAME_VPC_ID = "vpcId"; + + @SerializedName(SERIALIZED_NAME_VPC_ID) + @javax.annotation.Nullable private UUID vpcId; + public Network() {} public Network(OffsetDateTime createdAt, OffsetDateTime updatedAt) { @@ -295,6 +300,24 @@ public void setStatus(@javax.annotation.Nonnull String status) { return updatedAt; } + public Network vpcId(@javax.annotation.Nullable UUID vpcId) { + this.vpcId = vpcId; + return this; + } + + /** + * The identifier (ID) of a STACKIT VPC. + * + * @return vpcId + */ + @javax.annotation.Nullable public UUID getVpcId() { + return vpcId; + } + + public void setVpcId(@javax.annotation.Nullable UUID vpcId) { + this.vpcId = vpcId; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -359,6 +382,7 @@ public boolean equals(Object o) { && Objects.equals(this.routingTableId, network.routingTableId) && Objects.equals(this.status, network.status) && Objects.equals(this.updatedAt, network.updatedAt) + && Objects.equals(this.vpcId, network.vpcId) && Objects.equals(this.additionalProperties, network.additionalProperties); } @@ -376,6 +400,7 @@ public int hashCode() { routingTableId, status, updatedAt, + vpcId, additionalProperties); } @@ -394,6 +419,7 @@ public String toString() { sb.append(" routingTableId: ").append(toIndentedString(routingTableId)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" vpcId: ").append(toIndentedString(vpcId)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); @@ -430,7 +456,8 @@ private String toIndentedString(Object o) { "routed", "routingTableId", "status", - "updatedAt")); + "updatedAt", + "vpcId")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("id", "name", "status")); @@ -503,6 +530,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti "Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); } + if ((jsonObj.get("vpcId") != null && !jsonObj.get("vpcId").isJsonNull()) + && !jsonObj.get("vpcId").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `vpcId` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("vpcId").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/NetworkIPv4.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/NetworkIPv4.java index 41d71075..955702b6 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/NetworkIPv4.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/NetworkIPv4.java @@ -30,6 +30,7 @@ import java.util.List; import java.util.Map; import java.util.Objects; +import java.util.UUID; import org.openapitools.jackson.nullable.JsonNullable; /** Object that represents the IPv4 part of a network. */ @@ -58,6 +59,11 @@ public class NetworkIPv4 { @SerializedName(SERIALIZED_NAME_PUBLIC_IP) @javax.annotation.Nullable private String publicIp; + public static final String SERIALIZED_NAME_VPC_NETWORK_RANGE_ID = "vpcNetworkRangeId"; + + @SerializedName(SERIALIZED_NAME_VPC_NETWORK_RANGE_ID) + @javax.annotation.Nullable private UUID vpcNetworkRangeId; + public NetworkIPv4() {} public NetworkIPv4(String publicIp) { @@ -146,6 +152,24 @@ public void setPrefixes(@javax.annotation.Nonnull List prefixes) { return publicIp; } + public NetworkIPv4 vpcNetworkRangeId(@javax.annotation.Nullable UUID vpcNetworkRangeId) { + this.vpcNetworkRangeId = vpcNetworkRangeId; + return this; + } + + /** + * Universally Unique Identifier (UUID). + * + * @return vpcNetworkRangeId + */ + @javax.annotation.Nullable public UUID getVpcNetworkRangeId() { + return vpcNetworkRangeId; + } + + public void setVpcNetworkRangeId(@javax.annotation.Nullable UUID vpcNetworkRangeId) { + this.vpcNetworkRangeId = vpcNetworkRangeId; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -203,6 +227,7 @@ public boolean equals(Object o) { && Objects.equals(this.nameservers, networkIPv4.nameservers) && Objects.equals(this.prefixes, networkIPv4.prefixes) && Objects.equals(this.publicIp, networkIPv4.publicIp) + && Objects.equals(this.vpcNetworkRangeId, networkIPv4.vpcNetworkRangeId) && Objects.equals(this.additionalProperties, networkIPv4.additionalProperties); } @@ -217,7 +242,8 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(gateway, nameservers, prefixes, publicIp, additionalProperties); + return Objects.hash( + gateway, nameservers, prefixes, publicIp, vpcNetworkRangeId, additionalProperties); } private static int hashCodeNullable(JsonNullable a) { @@ -235,6 +261,9 @@ public String toString() { sb.append(" nameservers: ").append(toIndentedString(nameservers)).append("\n"); sb.append(" prefixes: ").append(toIndentedString(prefixes)).append("\n"); sb.append(" publicIp: ").append(toIndentedString(publicIp)).append("\n"); + sb.append(" vpcNetworkRangeId: ") + .append(toIndentedString(vpcNetworkRangeId)) + .append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); @@ -260,7 +289,12 @@ private String toIndentedString(Object o) { // a set of all properties/fields (JSON key names) openapiFields = new HashSet( - Arrays.asList("gateway", "nameservers", "prefixes", "publicIp")); + Arrays.asList( + "gateway", + "nameservers", + "prefixes", + "publicIp", + "vpcNetworkRangeId")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("prefixes")); @@ -333,6 +367,15 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti "Expected the field `publicIp` to be a primitive type in the JSON string but got `%s`", jsonObj.get("publicIp").toString())); } + if ((jsonObj.get("vpcNetworkRangeId") != null + && !jsonObj.get("vpcNetworkRangeId").isJsonNull()) + && !jsonObj.get("vpcNetworkRangeId").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `vpcNetworkRangeId` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("vpcNetworkRangeId").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/NetworkIPv6.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/NetworkIPv6.java index 6240b713..66b053df 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/NetworkIPv6.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/NetworkIPv6.java @@ -30,6 +30,7 @@ import java.util.List; import java.util.Map; import java.util.Objects; +import java.util.UUID; import org.openapitools.jackson.nullable.JsonNullable; /** Object that represents the IPv6 part of a network. */ @@ -53,6 +54,11 @@ public class NetworkIPv6 { @javax.annotation.Nonnull private List prefixes = new ArrayList<>(); + public static final String SERIALIZED_NAME_VPC_NETWORK_RANGE_ID = "vpcNetworkRangeId"; + + @SerializedName(SERIALIZED_NAME_VPC_NETWORK_RANGE_ID) + @javax.annotation.Nullable private UUID vpcNetworkRangeId; + public NetworkIPv6() {} public NetworkIPv6 gateway(@javax.annotation.Nullable String gateway) { @@ -127,6 +133,24 @@ public void setPrefixes(@javax.annotation.Nonnull List prefixes) { this.prefixes = prefixes; } + public NetworkIPv6 vpcNetworkRangeId(@javax.annotation.Nullable UUID vpcNetworkRangeId) { + this.vpcNetworkRangeId = vpcNetworkRangeId; + return this; + } + + /** + * Universally Unique Identifier (UUID). + * + * @return vpcNetworkRangeId + */ + @javax.annotation.Nullable public UUID getVpcNetworkRangeId() { + return vpcNetworkRangeId; + } + + public void setVpcNetworkRangeId(@javax.annotation.Nullable UUID vpcNetworkRangeId) { + this.vpcNetworkRangeId = vpcNetworkRangeId; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -183,6 +207,7 @@ public boolean equals(Object o) { return Objects.equals(this.gateway, networkIPv6.gateway) && Objects.equals(this.nameservers, networkIPv6.nameservers) && Objects.equals(this.prefixes, networkIPv6.prefixes) + && Objects.equals(this.vpcNetworkRangeId, networkIPv6.vpcNetworkRangeId) && Objects.equals(this.additionalProperties, networkIPv6.additionalProperties); } @@ -197,7 +222,8 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(gateway, nameservers, prefixes, additionalProperties); + return Objects.hash( + gateway, nameservers, prefixes, vpcNetworkRangeId, additionalProperties); } private static int hashCodeNullable(JsonNullable a) { @@ -214,6 +240,9 @@ public String toString() { sb.append(" gateway: ").append(toIndentedString(gateway)).append("\n"); sb.append(" nameservers: ").append(toIndentedString(nameservers)).append("\n"); sb.append(" prefixes: ").append(toIndentedString(prefixes)).append("\n"); + sb.append(" vpcNetworkRangeId: ") + .append(toIndentedString(vpcNetworkRangeId)) + .append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); @@ -237,7 +266,9 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("gateway", "nameservers", "prefixes")); + openapiFields = + new HashSet( + Arrays.asList("gateway", "nameservers", "prefixes", "vpcNetworkRangeId")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("prefixes")); @@ -302,6 +333,15 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti "Expected the field `prefixes` to be an array in the JSON string but got `%s`", jsonObj.get("prefixes").toString())); } + if ((jsonObj.get("vpcNetworkRangeId") != null + && !jsonObj.get("vpcNetworkRangeId").isJsonNull()) + && !jsonObj.get("vpcNetworkRangeId").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `vpcNetworkRangeId` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("vpcNetworkRangeId").toString())); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/NetworkRange.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/NetworkRange.java index 5624dd5d..93bfee5f 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/NetworkRange.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/NetworkRange.java @@ -32,7 +32,7 @@ import java.util.Objects; import java.util.UUID; -/** Object that represents a network range. */ +/** Object that represents a network range of a network area. */ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.19.0") diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/NetworkRangeListResponse.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/NetworkRangeListResponse.java index c6ee9f40..a33ebc96 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/NetworkRangeListResponse.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/NetworkRangeListResponse.java @@ -32,7 +32,7 @@ import java.util.Map; import java.util.Objects; -/** Network Range list response. */ +/** Network Range list response of a network area. */ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.19.0") @@ -59,7 +59,7 @@ public NetworkRangeListResponse addItemsItem(NetworkRange itemsItem) { } /** - * A list of network ranges. + * A list of network area network ranges. * * @return items */ diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/RegionalAreaIPv4.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/RegionalAreaIPv4.java index cc71c3a6..e7f9b929 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/RegionalAreaIPv4.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/RegionalAreaIPv4.java @@ -173,7 +173,7 @@ public RegionalAreaIPv4 addNetworkRangesItem(NetworkRange networkRangesItem) { } /** - * A list of network ranges. + * A list of network area network ranges. * * @return networkRanges */ diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/Request.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/Request.java index 8ac6c889..366b9374 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/Request.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/Request.java @@ -140,7 +140,8 @@ public Request requestType(@javax.annotation.Nonnull String requestType) { * Object that represents a resource type. Possible values: `BACKUP`, * `IMAGE`, `NETWORK`, `NETWORKAREA`, `NIC`, * `PROJECT`, `ROUTE`, `SERVER`, `SERVICEACCOUNT`, - * `SNAPSHOT`, `VIRTUALIP`, `VOLUME`. + * `SNAPSHOT`, `VIRTUALIP`, `VOLUME`, `VPC`, + * `VPCNETWORKRANGE`. * * @return requestType */ diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/RequestResource.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/RequestResource.java index 151e9d8f..4db5deb1 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/RequestResource.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/RequestResource.java @@ -105,7 +105,8 @@ public RequestResource type(@javax.annotation.Nonnull String type) { * Object that represents a resource type. Possible values: `BACKUP`, * `IMAGE`, `NETWORK`, `NETWORKAREA`, `NIC`, * `PROJECT`, `ROUTE`, `SERVER`, `SERVICEACCOUNT`, - * `SNAPSHOT`, `VIRTUALIP`, `VOLUME`. + * `SNAPSHOT`, `VIRTUALIP`, `VOLUME`, `VPC`, + * `VPCNETWORKRANGE`. * * @return type */ diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/RoutingTable.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/RoutingTable.java index 1dec0b90..83a96ac3 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/RoutingTable.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/RoutingTable.java @@ -32,7 +32,10 @@ import java.util.Objects; import java.util.UUID; -/** An object representing a routing table. */ +/** + * An object representing a routing table. Filterable Fields: `dynamicRoutes`, + * `systemRoutes`. + */ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.19.0") diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/Server.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/Server.java index 3345721f..8f02f2ed 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/Server.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/Server.java @@ -166,6 +166,11 @@ public class Server { @SerializedName(SERIALIZED_NAME_VOLUMES) @javax.annotation.Nullable private List volumes; + public static final String SERIALIZED_NAME_VTPM = "vtpm"; + + @SerializedName(SERIALIZED_NAME_VTPM) + @javax.annotation.Nullable private ServerVTPM vtpm; + public Server() {} public Server( @@ -604,6 +609,24 @@ public void setVolumes(@javax.annotation.Nullable List volumes) { this.volumes = volumes; } + public Server vtpm(@javax.annotation.Nullable ServerVTPM vtpm) { + this.vtpm = vtpm; + return this; + } + + /** + * Get vtpm + * + * @return vtpm + */ + @javax.annotation.Nullable public ServerVTPM getVtpm() { + return vtpm; + } + + public void setVtpm(@javax.annotation.Nullable ServerVTPM vtpm) { + this.vtpm = vtpm; + } + /** * A container for additional, undeclared properties. This is a holder for any undeclared * properties as specified with the 'additionalProperties' keyword in the OAS document. @@ -682,6 +705,7 @@ public boolean equals(Object o) { && Objects.equals(this.updatedAt, server.updatedAt) && Arrays.equals(this.userData, server.userData) && Objects.equals(this.volumes, server.volumes) + && Objects.equals(this.vtpm, server.vtpm) && Objects.equals(this.additionalProperties, server.additionalProperties); } @@ -713,6 +737,7 @@ public int hashCode() { updatedAt, Arrays.hashCode(userData), volumes, + vtpm, additionalProperties); } @@ -749,6 +774,7 @@ public String toString() { sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); sb.append(" userData: ").append(toIndentedString(userData)).append("\n"); sb.append(" volumes: ").append(toIndentedString(volumes)).append("\n"); + sb.append(" vtpm: ").append(toIndentedString(vtpm)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) .append("\n"); @@ -799,7 +825,8 @@ private String toIndentedString(Object o) { "status", "updatedAt", "userData", - "volumes")); + "volumes", + "vtpm")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("machineType", "name")); @@ -980,6 +1007,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti "Expected the field `volumes` to be an array in the JSON string but got `%s`", jsonObj.get("volumes").toString())); } + // validate the optional field `vtpm` + if (jsonObj.get("vtpm") != null && !jsonObj.get("vtpm").isJsonNull()) { + ServerVTPM.validateJsonElement(jsonObj.get("vtpm")); + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/ServerVTPM.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/ServerVTPM.java new file mode 100644 index 00000000..7b02f6ca --- /dev/null +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/ServerVTPM.java @@ -0,0 +1,299 @@ +/* + * 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.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; + +/** Configuration for the Virtual Trusted Platform Module (vTPM). */ +@javax.annotation.Generated( + value = "org.openapitools.codegen.languages.JavaClientCodegen", + comments = "Generator version: 7.19.0") +public class ServerVTPM { + public static final String SERIALIZED_NAME_ENABLED = "enabled"; + + @SerializedName(SERIALIZED_NAME_ENABLED) + @javax.annotation.Nonnull + private Boolean enabled = false; + + public ServerVTPM() {} + + public ServerVTPM enabled(@javax.annotation.Nonnull Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Defines whether the server instance has the Virtual Trusted Platform Module (vTPM) enabled. + * + * @return enabled + */ + @javax.annotation.Nonnull + public Boolean getEnabled() { + return enabled; + } + + public void setEnabled(@javax.annotation.Nonnull Boolean enabled) { + this.enabled = enabled; + } + + /** + * 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 ServerVTPM instance itself + */ + public ServerVTPM 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; + } + ServerVTPM serverVTPM = (ServerVTPM) o; + return Objects.equals(this.enabled, serverVTPM.enabled) + && Objects.equals(this.additionalProperties, serverVTPM.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(enabled, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ServerVTPM {\n"); + sb.append(" enabled: ").append(toIndentedString(enabled)).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("enabled")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("enabled")); + } + + /** + * 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 ServerVTPM + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!ServerVTPM.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 ServerVTPM is not found in the empty JSON string", + ServerVTPM.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : ServerVTPM.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(); + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!ServerVTPM.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'ServerVTPM' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter = + gson.getDelegateAdapter(this, TypeToken.get(ServerVTPM.class)); + + return (TypeAdapter) + new TypeAdapter() { + @Override + public void write(JsonWriter out, ServerVTPM 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 ServerVTPM read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + ServerVTPM 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 ServerVTPM given an JSON string + * + * @param jsonString JSON string + * @return An instance of ServerVTPM + * @throws IOException if the JSON string is invalid with respect to ServerVTPM + */ + public static ServerVTPM fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, ServerVTPM.class); + } + + /** + * Convert an instance of ServerVTPM 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/Snapshot.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/Snapshot.java index ad31102e..d8f10fee 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 @@ -37,6 +37,11 @@ value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.19.0") public class Snapshot { + public static final String SERIALIZED_NAME_AVAILABILITY_ZONE = "availabilityZone"; + + @SerializedName(SERIALIZED_NAME_AVAILABILITY_ZONE) + @javax.annotation.Nullable private String availabilityZone; + public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; @SerializedName(SERIALIZED_NAME_CREATED_AT) @@ -86,8 +91,14 @@ public class Snapshot { public Snapshot() {} public Snapshot( - OffsetDateTime createdAt, UUID id, Long size, String status, OffsetDateTime updatedAt) { + String availabilityZone, + OffsetDateTime createdAt, + UUID id, + Long size, + String status, + OffsetDateTime updatedAt) { this(); + this.availabilityZone = availabilityZone; this.createdAt = createdAt; this.id = id; this.size = size; @@ -95,6 +106,15 @@ public Snapshot( this.updatedAt = updatedAt; } + /** + * Object that represents an availability zone. + * + * @return availabilityZone + */ + @javax.annotation.Nullable public String getAvailabilityZone() { + return availabilityZone; + } + /** * Date-time when resource was created. * @@ -272,7 +292,8 @@ public boolean equals(Object o) { return false; } Snapshot snapshot = (Snapshot) o; - return Objects.equals(this.createdAt, snapshot.createdAt) + return Objects.equals(this.availabilityZone, snapshot.availabilityZone) + && Objects.equals(this.createdAt, snapshot.createdAt) && Objects.equals(this.description, snapshot.description) && Objects.equals(this.id, snapshot.id) && Objects.equals(this.labels, snapshot.labels) @@ -287,6 +308,7 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( + availabilityZone, createdAt, description, id, @@ -303,6 +325,7 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Snapshot {\n"); + 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(" id: ").append(toIndentedString(id)).append("\n"); @@ -338,6 +361,7 @@ private String toIndentedString(Object o) { openapiFields = new HashSet( Arrays.asList( + "availabilityZone", "createdAt", "description", "id", @@ -382,6 +406,15 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("availabilityZone") != null + && !jsonObj.get("availabilityZone").isJsonNull()) + && !jsonObj.get("availabilityZone").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `availabilityZone` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("availabilityZone").toString())); + } if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { throw new IllegalArgumentException( diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/V2beta1ConfigureNetworkAreaRegionPayload.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/V2beta1CreateNetworkAreaRegionPayload.java similarity index 80% rename from services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/V2beta1ConfigureNetworkAreaRegionPayload.java rename to services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/V2beta1CreateNetworkAreaRegionPayload.java index e460f167..194d7253 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/V2beta1ConfigureNetworkAreaRegionPayload.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/V2beta1CreateNetworkAreaRegionPayload.java @@ -34,7 +34,7 @@ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.19.0") -public class V2beta1ConfigureNetworkAreaRegionPayload { +public class V2beta1CreateNetworkAreaRegionPayload { public static final String SERIALIZED_NAME_IPV4 = "ipv4"; @SerializedName(SERIALIZED_NAME_IPV4) @@ -45,14 +45,14 @@ public class V2beta1ConfigureNetworkAreaRegionPayload { @SerializedName(SERIALIZED_NAME_STATUS) @javax.annotation.Nullable private String status; - public V2beta1ConfigureNetworkAreaRegionPayload() {} + public V2beta1CreateNetworkAreaRegionPayload() {} - public V2beta1ConfigureNetworkAreaRegionPayload(String status) { + public V2beta1CreateNetworkAreaRegionPayload(String status) { this(); this.status = status; } - public V2beta1ConfigureNetworkAreaRegionPayload ipv4( + public V2beta1CreateNetworkAreaRegionPayload ipv4( @javax.annotation.Nullable RegionalAreaIPv4 ipv4) { this.ipv4 = ipv4; return this; @@ -94,10 +94,9 @@ public void setIpv4(@javax.annotation.Nullable RegionalAreaIPv4 ipv4) { * * @param key name of the property * @param value value of the property - * @return the V2beta1ConfigureNetworkAreaRegionPayload instance itself + * @return the V2beta1CreateNetworkAreaRegionPayload instance itself */ - public V2beta1ConfigureNetworkAreaRegionPayload putAdditionalProperty( - String key, Object value) { + public V2beta1CreateNetworkAreaRegionPayload putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -135,13 +134,13 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - V2beta1ConfigureNetworkAreaRegionPayload v2beta1ConfigureNetworkAreaRegionPayload = - (V2beta1ConfigureNetworkAreaRegionPayload) o; - return Objects.equals(this.ipv4, v2beta1ConfigureNetworkAreaRegionPayload.ipv4) - && Objects.equals(this.status, v2beta1ConfigureNetworkAreaRegionPayload.status) + V2beta1CreateNetworkAreaRegionPayload v2beta1CreateNetworkAreaRegionPayload = + (V2beta1CreateNetworkAreaRegionPayload) o; + return Objects.equals(this.ipv4, v2beta1CreateNetworkAreaRegionPayload.ipv4) + && Objects.equals(this.status, v2beta1CreateNetworkAreaRegionPayload.status) && Objects.equals( this.additionalProperties, - v2beta1ConfigureNetworkAreaRegionPayload.additionalProperties); + v2beta1CreateNetworkAreaRegionPayload.additionalProperties); } @Override @@ -152,7 +151,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class V2beta1ConfigureNetworkAreaRegionPayload {\n"); + sb.append("class V2beta1CreateNetworkAreaRegionPayload {\n"); sb.append(" ipv4: ").append(toIndentedString(ipv4)).append("\n"); sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append(" additionalProperties: ") @@ -189,17 +188,17 @@ private String toIndentedString(Object o) { * * @param jsonElement JSON Element * @throws IOException if the JSON Element is invalid with respect to - * V2beta1ConfigureNetworkAreaRegionPayload + * V2beta1CreateNetworkAreaRegionPayload */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!V2beta1ConfigureNetworkAreaRegionPayload.openapiRequiredFields + if (!V2beta1CreateNetworkAreaRegionPayload.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 V2beta1ConfigureNetworkAreaRegionPayload is not found in the empty JSON string", - V2beta1ConfigureNetworkAreaRegionPayload.openapiRequiredFields + "The required field(s) %s in V2beta1CreateNetworkAreaRegionPayload is not found in the empty JSON string", + V2beta1CreateNetworkAreaRegionPayload.openapiRequiredFields .toString())); } } @@ -222,21 +221,20 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!V2beta1ConfigureNetworkAreaRegionPayload.class.isAssignableFrom( - type.getRawType())) { - return null; // this class only serializes - // 'V2beta1ConfigureNetworkAreaRegionPayload' and its subtypes + if (!V2beta1CreateNetworkAreaRegionPayload.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'V2beta1CreateNetworkAreaRegionPayload' + // and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = + final TypeAdapter thisAdapter = gson.getDelegateAdapter( - this, TypeToken.get(V2beta1ConfigureNetworkAreaRegionPayload.class)); + this, TypeToken.get(V2beta1CreateNetworkAreaRegionPayload.class)); return (TypeAdapter) - new TypeAdapter() { + new TypeAdapter() { @Override public void write( - JsonWriter out, V2beta1ConfigureNetworkAreaRegionPayload value) + JsonWriter out, V2beta1CreateNetworkAreaRegionPayload value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); @@ -267,13 +265,13 @@ else if (entry.getValue() instanceof Character) } @Override - public V2beta1ConfigureNetworkAreaRegionPayload read(JsonReader in) + public V2beta1CreateNetworkAreaRegionPayload read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance - V2beta1ConfigureNetworkAreaRegionPayload instance = + V2beta1CreateNetworkAreaRegionPayload instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { @@ -313,20 +311,20 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of V2beta1ConfigureNetworkAreaRegionPayload given an JSON string + * Create an instance of V2beta1CreateNetworkAreaRegionPayload given an JSON string * * @param jsonString JSON string - * @return An instance of V2beta1ConfigureNetworkAreaRegionPayload + * @return An instance of V2beta1CreateNetworkAreaRegionPayload * @throws IOException if the JSON string is invalid with respect to - * V2beta1ConfigureNetworkAreaRegionPayload + * V2beta1CreateNetworkAreaRegionPayload */ - public static V2beta1ConfigureNetworkAreaRegionPayload fromJson(String jsonString) + public static V2beta1CreateNetworkAreaRegionPayload fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, V2beta1ConfigureNetworkAreaRegionPayload.class); + return JSON.getGson().fromJson(jsonString, V2beta1CreateNetworkAreaRegionPayload.class); } /** - * Convert an instance of V2beta1ConfigureNetworkAreaRegionPayload to an JSON string + * Convert an instance of V2beta1CreateNetworkAreaRegionPayload to an JSON string * * @return JSON string */ 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 0ba32807..ed09e332 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 @@ -37,6 +37,11 @@ value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.19.0") public class V2beta1CreateSnapshotPayload { + public static final String SERIALIZED_NAME_AVAILABILITY_ZONE = "availabilityZone"; + + @SerializedName(SERIALIZED_NAME_AVAILABILITY_ZONE) + @javax.annotation.Nullable private String availabilityZone; + public static final String SERIALIZED_NAME_CREATED_AT = "createdAt"; @SerializedName(SERIALIZED_NAME_CREATED_AT) @@ -86,8 +91,14 @@ public class V2beta1CreateSnapshotPayload { public V2beta1CreateSnapshotPayload() {} public V2beta1CreateSnapshotPayload( - OffsetDateTime createdAt, UUID id, Long size, String status, OffsetDateTime updatedAt) { + String availabilityZone, + OffsetDateTime createdAt, + UUID id, + Long size, + String status, + OffsetDateTime updatedAt) { this(); + this.availabilityZone = availabilityZone; this.createdAt = createdAt; this.id = id; this.size = size; @@ -95,6 +106,15 @@ public V2beta1CreateSnapshotPayload( this.updatedAt = updatedAt; } + /** + * Object that represents an availability zone. + * + * @return availabilityZone + */ + @javax.annotation.Nullable public String getAvailabilityZone() { + return availabilityZone; + } + /** * Date-time when resource was created. * @@ -273,7 +293,8 @@ public boolean equals(Object o) { } V2beta1CreateSnapshotPayload v2beta1CreateSnapshotPayload = (V2beta1CreateSnapshotPayload) o; - return Objects.equals(this.createdAt, v2beta1CreateSnapshotPayload.createdAt) + return Objects.equals(this.availabilityZone, v2beta1CreateSnapshotPayload.availabilityZone) + && Objects.equals(this.createdAt, v2beta1CreateSnapshotPayload.createdAt) && Objects.equals(this.description, v2beta1CreateSnapshotPayload.description) && Objects.equals(this.id, v2beta1CreateSnapshotPayload.id) && Objects.equals(this.labels, v2beta1CreateSnapshotPayload.labels) @@ -290,6 +311,7 @@ public boolean equals(Object o) { @Override public int hashCode() { return Objects.hash( + availabilityZone, createdAt, description, id, @@ -306,6 +328,7 @@ public int hashCode() { public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class V2beta1CreateSnapshotPayload {\n"); + 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(" id: ").append(toIndentedString(id)).append("\n"); @@ -341,6 +364,7 @@ private String toIndentedString(Object o) { openapiFields = new HashSet( Arrays.asList( + "availabilityZone", "createdAt", "description", "id", @@ -386,6 +410,15 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("availabilityZone") != null + && !jsonObj.get("availabilityZone").isJsonNull()) + && !jsonObj.get("availabilityZone").isJsonPrimitive()) { + throw new IllegalArgumentException( + String.format( + java.util.Locale.ROOT, + "Expected the field `availabilityZone` to be a primitive type in the JSON string but got `%s`", + jsonObj.get("availabilityZone").toString())); + } if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { throw new IllegalArgumentException( diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/V2beta1UpdateRouteOfAreaPayload.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/V2beta1UpdateNetworkAreaRoutePayload.java similarity index 79% rename from services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/V2beta1UpdateRouteOfAreaPayload.java rename to services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/V2beta1UpdateNetworkAreaRoutePayload.java index 29932990..88203e29 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/V2beta1UpdateRouteOfAreaPayload.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/V2beta1UpdateNetworkAreaRoutePayload.java @@ -34,15 +34,15 @@ @javax.annotation.Generated( value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.19.0") -public class V2beta1UpdateRouteOfAreaPayload { +public class V2beta1UpdateNetworkAreaRoutePayload { public static final String SERIALIZED_NAME_LABELS = "labels"; @SerializedName(SERIALIZED_NAME_LABELS) @javax.annotation.Nullable private Object labels; - public V2beta1UpdateRouteOfAreaPayload() {} + public V2beta1UpdateNetworkAreaRoutePayload() {} - public V2beta1UpdateRouteOfAreaPayload labels(@javax.annotation.Nullable Object labels) { + public V2beta1UpdateNetworkAreaRoutePayload labels(@javax.annotation.Nullable Object labels) { this.labels = labels; return this; } @@ -76,9 +76,9 @@ public void setLabels(@javax.annotation.Nullable Object labels) { * * @param key name of the property * @param value value of the property - * @return the V2beta1UpdateRouteOfAreaPayload instance itself + * @return the V2beta1UpdateNetworkAreaRoutePayload instance itself */ - public V2beta1UpdateRouteOfAreaPayload putAdditionalProperty(String key, Object value) { + public V2beta1UpdateNetworkAreaRoutePayload putAdditionalProperty(String key, Object value) { if (this.additionalProperties == null) { this.additionalProperties = new HashMap(); } @@ -116,12 +116,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) { return false; } - V2beta1UpdateRouteOfAreaPayload v2beta1UpdateRouteOfAreaPayload = - (V2beta1UpdateRouteOfAreaPayload) o; - return Objects.equals(this.labels, v2beta1UpdateRouteOfAreaPayload.labels) + V2beta1UpdateNetworkAreaRoutePayload v2beta1UpdateNetworkAreaRoutePayload = + (V2beta1UpdateNetworkAreaRoutePayload) o; + return Objects.equals(this.labels, v2beta1UpdateNetworkAreaRoutePayload.labels) && Objects.equals( this.additionalProperties, - v2beta1UpdateRouteOfAreaPayload.additionalProperties); + v2beta1UpdateNetworkAreaRoutePayload.additionalProperties); } @Override @@ -132,7 +132,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class V2beta1UpdateRouteOfAreaPayload {\n"); + sb.append("class V2beta1UpdateNetworkAreaRoutePayload {\n"); sb.append(" labels: ").append(toIndentedString(labels)).append("\n"); sb.append(" additionalProperties: ") .append(toIndentedString(additionalProperties)) @@ -168,17 +168,18 @@ private String toIndentedString(Object o) { * * @param jsonElement JSON Element * @throws IOException if the JSON Element is invalid with respect to - * V2beta1UpdateRouteOfAreaPayload + * V2beta1UpdateNetworkAreaRoutePayload */ public static void validateJsonElement(JsonElement jsonElement) throws IOException { if (jsonElement == null) { - if (!V2beta1UpdateRouteOfAreaPayload.openapiRequiredFields + if (!V2beta1UpdateNetworkAreaRoutePayload.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 V2beta1UpdateRouteOfAreaPayload is not found in the empty JSON string", - V2beta1UpdateRouteOfAreaPayload.openapiRequiredFields.toString())); + "The required field(s) %s in V2beta1UpdateNetworkAreaRoutePayload is not found in the empty JSON string", + V2beta1UpdateNetworkAreaRoutePayload.openapiRequiredFields + .toString())); } } JsonObject jsonObj = jsonElement.getAsJsonObject(); @@ -188,19 +189,20 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory { @SuppressWarnings("unchecked") @Override public TypeAdapter create(Gson gson, TypeToken type) { - if (!V2beta1UpdateRouteOfAreaPayload.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'V2beta1UpdateRouteOfAreaPayload' and its - // subtypes + if (!V2beta1UpdateNetworkAreaRoutePayload.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'V2beta1UpdateNetworkAreaRoutePayload' + // and its subtypes } final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter = + final TypeAdapter thisAdapter = gson.getDelegateAdapter( - this, TypeToken.get(V2beta1UpdateRouteOfAreaPayload.class)); + this, TypeToken.get(V2beta1UpdateNetworkAreaRoutePayload.class)); return (TypeAdapter) - new TypeAdapter() { + new TypeAdapter() { @Override - public void write(JsonWriter out, V2beta1UpdateRouteOfAreaPayload value) + public void write( + JsonWriter out, V2beta1UpdateNetworkAreaRoutePayload value) throws IOException { JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); obj.remove("additionalProperties"); @@ -231,13 +233,13 @@ else if (entry.getValue() instanceof Character) } @Override - public V2beta1UpdateRouteOfAreaPayload read(JsonReader in) + public V2beta1UpdateNetworkAreaRoutePayload read(JsonReader in) throws IOException { JsonElement jsonElement = elementAdapter.read(in); validateJsonElement(jsonElement); JsonObject jsonObj = jsonElement.getAsJsonObject(); // store additional fields in the deserialized instance - V2beta1UpdateRouteOfAreaPayload instance = + V2beta1UpdateNetworkAreaRoutePayload instance = thisAdapter.fromJsonTree(jsonObj); for (Map.Entry entry : jsonObj.entrySet()) { if (!openapiFields.contains(entry.getKey())) { @@ -277,19 +279,20 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean()) } /** - * Create an instance of V2beta1UpdateRouteOfAreaPayload given an JSON string + * Create an instance of V2beta1UpdateNetworkAreaRoutePayload given an JSON string * * @param jsonString JSON string - * @return An instance of V2beta1UpdateRouteOfAreaPayload + * @return An instance of V2beta1UpdateNetworkAreaRoutePayload * @throws IOException if the JSON string is invalid with respect to - * V2beta1UpdateRouteOfAreaPayload + * V2beta1UpdateNetworkAreaRoutePayload */ - public static V2beta1UpdateRouteOfAreaPayload fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, V2beta1UpdateRouteOfAreaPayload.class); + public static V2beta1UpdateNetworkAreaRoutePayload fromJson(String jsonString) + throws IOException { + return JSON.getGson().fromJson(jsonString, V2beta1UpdateNetworkAreaRoutePayload.class); } /** - * Convert an instance of V2beta1UpdateRouteOfAreaPayload to an JSON string + * Convert an instance of V2beta1UpdateNetworkAreaRoutePayload to an JSON string * * @return JSON string */ diff --git a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/Volume.java b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/Volume.java index 6acc3cd4..64a79c1d 100644 --- a/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/Volume.java +++ b/services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2beta1api/model/Volume.java @@ -360,8 +360,9 @@ public void setSource(@javax.annotation.Nullable VolumeSource source) { * `CREATING`, `DELETED`, `DELETING`, `DETACHING`, * `DOWNLOADING`, `ERROR`, `ERROR_BACKING-UP`, * `ERROR_DELETING`, `ERROR_RESIZING`, `ERROR_RESTORING-BACKUP`, - * `MAINTENANCE`, `RESERVED`, `RESIZING`, - * `RESTORING-BACKUP`, `RETYPING`, `UPLOADING`. + * `ERROR_KMS-ENCRYPTION-PARAMS`, `MAINTENANCE`, `RESERVED`, + * `RESIZING`, `RESTORING-BACKUP`, `RETYPING`, + * `UPLOADING`. * * @return status */