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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion services/iaas/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# STACKIT Java SDK for IaaS-API

- API version: 1
- API version: 2

This API allows you to create and modify IaaS resources.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* IaaS-API
* This API allows you to create and modify IaaS resources.
*
* The version of the OpenAPI document: 1
* The version of the OpenAPI document: 2
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* IaaS-API
* This API allows you to create and modify IaaS resources.
*
* The version of the OpenAPI document: 1
* The version of the OpenAPI document: 2
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down Expand Up @@ -52,22 +52,21 @@
/** ApiClient class. */
public class ApiClient {

protected String basePath = "https://iaas.api.eu01.stackit.cloud";
protected String basePath = "https://iaas.api.stackit.cloud";
protected List<ServerConfiguration> servers =
new ArrayList<ServerConfiguration>(
Arrays.asList(
new ServerConfiguration(
"https://iaas.api.{region}stackit.cloud",
"https://iaas.api.stackit.cloud",
"No description provided",
new HashMap<String, ServerVariable>() {
{
put(
"region",
new ServerVariable(
"No description provided",
"eu01.",
new HashSet<String>(
Arrays.asList("eu01."))));
"global",
new HashSet<String>()));
}
})));
protected Integer serverIndex = 0;
Expand Down Expand Up @@ -190,7 +189,7 @@ public String getBasePath() {
/**
* Set base path
*
* @param basePath Base path of the URL (e.g https://iaas.api.eu01.stackit.cloud
* @param basePath Base path of the URL (e.g https://iaas.api.stackit.cloud
* @return An instance of OkHttpClient
*/
public ApiClient setBasePath(String basePath) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* IaaS-API
* This API allows you to create and modify IaaS resources.
*
* The version of the OpenAPI document: 1
* The version of the OpenAPI document: 2
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* IaaS-API
* This API allows you to create and modify IaaS resources.
*
* The version of the OpenAPI document: 1
* The version of the OpenAPI document: 2
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
159 changes: 132 additions & 27 deletions services/iaas/src/main/java/cloud/stackit/sdk/iaas/JSON.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* IaaS-API
* This API allows you to create and modify IaaS resources.
*
* The version of the OpenAPI document: 1
* The version of the OpenAPI document: 2
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand All @@ -21,6 +21,7 @@
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.gsonfire.GsonFireBuilder;
import io.gsonfire.TypeSelector;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
Expand All @@ -34,6 +35,7 @@
import java.time.OffsetDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import okio.ByteString;

Expand All @@ -55,7 +57,68 @@ public class JSON {

@SuppressWarnings("unchecked")
public static GsonBuilder createGson() {
GsonFireBuilder fireBuilder = new GsonFireBuilder();
GsonFireBuilder fireBuilder =
new GsonFireBuilder()
.registerTypeSelector(
cloud.stackit.sdk.iaas.model.RouteDestination.class,
new TypeSelector<cloud.stackit.sdk.iaas.model.RouteDestination>() {
@Override
public Class<
? extends
cloud.stackit.sdk.iaas.model
.RouteDestination>
getClassForElement(JsonElement readElement) {
Map<String, Class> classByDiscriminatorValue =
new HashMap<String, Class>();
classByDiscriminatorValue.put(
"cidrv4",
cloud.stackit.sdk.iaas.model.DestinationCIDRv4
.class);
classByDiscriminatorValue.put(
"cidrv6",
cloud.stackit.sdk.iaas.model.DestinationCIDRv6
.class);
classByDiscriminatorValue.put(
"Route_destination",
cloud.stackit.sdk.iaas.model.RouteDestination
.class);
return getClassByDiscriminator(
classByDiscriminatorValue,
getDiscriminatorValue(readElement, "type"));
}
})
.registerTypeSelector(
cloud.stackit.sdk.iaas.model.RouteNexthop.class,
new TypeSelector<cloud.stackit.sdk.iaas.model.RouteNexthop>() {
@Override
public Class<
? extends
cloud.stackit.sdk.iaas.model
.RouteNexthop>
getClassForElement(JsonElement readElement) {
Map<String, Class> classByDiscriminatorValue =
new HashMap<String, Class>();
classByDiscriminatorValue.put(
"blackhole",
cloud.stackit.sdk.iaas.model.NexthopBlackhole
.class);
classByDiscriminatorValue.put(
"internet",
cloud.stackit.sdk.iaas.model.NexthopInternet.class);
classByDiscriminatorValue.put(
"ipv4",
cloud.stackit.sdk.iaas.model.NexthopIPv4.class);
classByDiscriminatorValue.put(
"ipv6",
cloud.stackit.sdk.iaas.model.NexthopIPv6.class);
classByDiscriminatorValue.put(
"Route_nexthop",
cloud.stackit.sdk.iaas.model.RouteNexthop.class);
return getClassByDiscriminator(
classByDiscriminatorValue,
getDiscriminatorValue(readElement, "type"));
}
});
GsonBuilder builder = fireBuilder.createGsonBuilder();
return builder;
}
Expand Down Expand Up @@ -95,6 +158,12 @@ private static Class getClassByDiscriminator(
gsonBuilder.registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter);
gsonBuilder.registerTypeAdapter(LocalDate.class, localDateTypeAdapter);
gsonBuilder.registerTypeAdapter(byte[].class, byteArrayAdapter);
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.AddRoutesToRoutingTablePayload
.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.AddRoutingTableToAreaPayload
.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.AddVolumeToServerPayload
.CustomTypeAdapterFactory());
Expand All @@ -105,14 +174,8 @@ private static Class getClassByDiscriminator(
.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.AllowedAddressesInner.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.Area.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.AreaConfig.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.AreaId.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.AreaPrefixConfigIPv4.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.AvailabilityZoneListResponse
.CustomTypeAdapterFactory());
Expand All @@ -131,33 +194,40 @@ private static Class getClassByDiscriminator(
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.CreateAffinityGroupPayload
.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.CreateAreaAddressFamily
.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.CreateAreaIPv4.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.CreateBackupPayload.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.CreateImagePayload.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.CreateKeyPairPayload.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.CreateNetworkAddressFamily
.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.CreateNetworkAreaPayload
.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.CreateNetworkAreaRangePayload
.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.CreateNetworkAreaRegionPayload
.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.CreateNetworkAreaRoutePayload
.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.CreateNetworkIPv4Body.CustomTypeAdapterFactory());
new cloud.stackit.sdk.iaas.model.CreateNetworkIPv4.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.CreateNetworkIPv4WithPrefix
.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.CreateNetworkIPv4WithPrefixLength
.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.CreateNetworkIPv6.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.CreateNetworkIPv6Body.CustomTypeAdapterFactory());
new cloud.stackit.sdk.iaas.model.CreateNetworkIPv6WithPrefix
.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.CreateNetworkIPv6WithPrefixLength
.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.CreateNetworkPayload.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
Expand All @@ -183,12 +253,16 @@ private static Class getClassByDiscriminator(
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.CreateServerPayload.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.CreateServerPayloadNetworking
new cloud.stackit.sdk.iaas.model.CreateServerPayloadAllOfNetworking
.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.CreateSnapshotPayload.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.CreateVolumePayload.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.DestinationCIDRv4.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.DestinationCIDRv6.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.Error.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
Expand Down Expand Up @@ -229,18 +303,28 @@ private static Class getClassByDiscriminator(
new cloud.stackit.sdk.iaas.model.Network.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.NetworkArea.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.NetworkAreaIPv4.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.NetworkAreaListResponse
.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.NetworkIPv4.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.NetworkIPv6.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.NetworkListResponse.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.NetworkRange.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.NetworkRangeListResponse
.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.NexthopBlackhole.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.NexthopIPv4.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.NexthopIPv6.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.NexthopInternet.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.PartialUpdateNetworkAreaPayload
.CustomTypeAdapterFactory());
Expand Down Expand Up @@ -270,6 +354,13 @@ private static Class getClassByDiscriminator(
new cloud.stackit.sdk.iaas.model.QuotaList.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.QuotaListResponse.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.RegionalArea.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.RegionalAreaIPv4.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.RegionalAreaListResponse
.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.Request.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
Expand All @@ -282,8 +373,17 @@ private static Class getClassByDiscriminator(
new cloud.stackit.sdk.iaas.model.ResizeVolumePayload.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.Route.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.RouteDestination.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.RouteListResponse.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.RouteNexthop.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.RoutingTable.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.RoutingTableListResponse
.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.SecurityGroup.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
Expand All @@ -309,6 +409,8 @@ private static Class getClassByDiscriminator(
new cloud.stackit.sdk.iaas.model.ServerMaintenance.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.ServerNetwork.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.ServerNetworking.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.ServiceAccountMailListResponse
.CustomTypeAdapterFactory());
Expand All @@ -318,11 +420,6 @@ private static Class getClassByDiscriminator(
new cloud.stackit.sdk.iaas.model.Snapshot.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.SnapshotListResponse.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.UpdateAreaAddressFamily
.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.UpdateAreaIPv4.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.UpdateAttachedVolumePayload
.CustomTypeAdapterFactory());
Expand All @@ -336,7 +433,7 @@ private static Class getClassByDiscriminator(
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.UpdateKeyPairPayload.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.UpdateNetworkAddressFamily
new cloud.stackit.sdk.iaas.model.UpdateNetworkAreaRegionPayload
.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.UpdateNetworkAreaRoutePayload
Expand All @@ -349,6 +446,14 @@ private static Class getClassByDiscriminator(
new cloud.stackit.sdk.iaas.model.UpdateNicPayload.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.UpdatePublicIPPayload.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.UpdateRegionalAreaIPv4.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.UpdateRouteOfRoutingTablePayload
.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.UpdateRoutingTableOfAreaPayload
.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.iaas.model.UpdateSecurityGroupPayload
.CustomTypeAdapterFactory());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* IaaS-API
* This API allows you to create and modify IaaS resources.
*
* The version of the OpenAPI document: 1
* The version of the OpenAPI document: 2
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* IaaS-API
* This API allows you to create and modify IaaS resources.
*
* The version of the OpenAPI document: 1
* The version of the OpenAPI document: 2
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand Down
Loading
Loading