Skip to content

Commit 736cf2e

Browse files
authored
feat(iaas): update IaaS SDK (#950)
1 parent d63f6ad commit 736cf2e

143 files changed

Lines changed: 9555 additions & 748 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎CHANGELOG.md‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,24 @@
22

33
- `automation`: [v0.1.0](services/automation/CHANGELOG.md#v010)
44
- Initial onboarding of STACKIT Java SDK for Automation service
5+
- `iaas`: [v1.6.0](services/iaas/CHANGELOG.md#v160)
6+
- `v2alpha1api`:
7+
- **Breaking Change:** In `DestinationCIDRv4`, `DestinationCIDRv6`, `NexthopBlackhole`, `NexthopIPv4`, `NexthopIPv6`, and `NexthopInternet`, changed `type` field from `String` to enum `TypeEnum`.
8+
- **Feature:** Add operations to manage prefix lists: `deletePrefixList`, `getPrefixList`, `getPrefixListEntries`, and `listPrefixLists`.
9+
- **Feature:** Add operations `getRouteOfRoutingTable`, `listAllRoutesOfRoutingTable`, and `retypeVolume`.
10+
- **Feature:** Add new models for routes and prefix lists: `AllRouteListResponse`, `AnyRoute`, `AnyRouteDynamic`, `AnyRouteService`, `AnyRouteSource`, `AnyRouteSourceId`, `AnyRouteStatic`, `AnyRouteSystem`, `BaseRoute`, `PrefixEntries`, `PrefixList`, `PrefixListListResponse`, and `RetypeVolumePayload`.
11+
- **Feature:** Add attribute `description` to model `PartialUpdateNetworkPayload`.
12+
- **Docs:** Update documentation for `labels` field constraints across models.
13+
- `v2api`:
14+
- **Breaking Change:** In `DestinationCIDRv4`, `DestinationCIDRv6`, `NexthopBlackhole`, `NexthopIPv4`, `NexthopIPv6`, and `NexthopInternet`, changed `type` field from `String` to enum `TypeEnum`.
15+
- **Feature:** Add attribute `description` to model `PartialUpdateNetworkPayload`.
16+
- **Feature:** Add attributes `projectType` and `vpcId` to model `Project`.
17+
- **Docs:** Update documentation for `labels` field constraints across models.
18+
- `v2beta1api`:
19+
- **Breaking Change:** In `NexthopBlackhole`, `NexthopIPv4`, `NexthopIPv6`, and `NexthopInternet`, changed `type` field from `String` to enum `TypeEnum`.
20+
- **Feature:** Add attribute `description` to model `PartialUpdateNetworkPayload`.
21+
- **Feature:** Add attributes `projectType` and `vpcId` to model `Project`.
22+
- **Docs:** Update documentation for `labels` field constraints across models.
523
- `objectstorage`: [v0.4.0](services/objectstorage/CHANGELOG.md#v040)
624
- `v1api`:
725
- **Feature:** New model class `RateLimitError`

‎examples/iaas/src/main/java/cloud/stackit/sdk/iaas/examples/IaaSVPCExample.java‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,11 +211,14 @@ public static void main(String[] args) throws IOException {
211211
.destination(
212212
new AddVPCStaticRoutePayloadDestination(
213213
new DestinationCIDRv4()
214-
.type("cidrv4")
214+
.type(DestinationCIDRv4.TypeEnum.CIDRV4)
215215
.value("0.0.0.0/0")))
216216
.nexthop(
217217
new AddVPCStaticRoutePayloadNexthop(
218-
new NexthopInternet().type("internet"))));
218+
new NexthopInternet()
219+
.type(
220+
NexthopInternet.TypeEnum
221+
.INTERNET))));
219222
System.out.println("static route created: " + r.staticRoute.getId());
220223

221224
// create a network range

‎services/iaas/CHANGELOG.md‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
## v1.6.0
2+
- `v2alpha1api`:
3+
- **Breaking Change:** In `DestinationCIDRv4`, `DestinationCIDRv6`, `NexthopBlackhole`, `NexthopIPv4`, `NexthopIPv6`, and `NexthopInternet`, changed `type` field from `String` to enum `TypeEnum`.
4+
- **Feature:** Add operations to manage prefix lists: `deletePrefixList`, `getPrefixList`, `getPrefixListEntries`, and `listPrefixLists`.
5+
- **Feature:** Add operations `getRouteOfRoutingTable`, `listAllRoutesOfRoutingTable`, and `retypeVolume`.
6+
- **Feature:** Add new models for routes and prefix lists: `AllRouteListResponse`, `AnyRoute`, `AnyRouteDynamic`, `AnyRouteService`, `AnyRouteSource`, `AnyRouteSourceId`, `AnyRouteStatic`, `AnyRouteSystem`, `BaseRoute`, `PrefixEntries`, `PrefixList`, `PrefixListListResponse`, and `RetypeVolumePayload`.
7+
- **Feature:** Add attribute `description` to model `PartialUpdateNetworkPayload`.
8+
- **Docs:** Update documentation for `labels` field constraints across models.
9+
- `v2api`:
10+
- **Breaking Change:** In `DestinationCIDRv4`, `DestinationCIDRv6`, `NexthopBlackhole`, `NexthopIPv4`, `NexthopIPv6`, and `NexthopInternet`, changed `type` field from `String` to enum `TypeEnum`.
11+
- **Feature:** Add attribute `description` to model `PartialUpdateNetworkPayload`.
12+
- **Feature:** Add attributes `projectType` and `vpcId` to model `Project`.
13+
- **Docs:** Update documentation for `labels` field constraints across models.
14+
- `v2beta1api`:
15+
- **Breaking Change:** In `NexthopBlackhole`, `NexthopIPv4`, `NexthopIPv6`, and `NexthopInternet`, changed `type` field from `String` to enum `TypeEnum`.
16+
- **Feature:** Add attribute `description` to model `PartialUpdateNetworkPayload`.
17+
- **Feature:** Add attributes `projectType` and `vpcId` to model `Project`.
18+
- **Docs:** Update documentation for `labels` field constraints across models.
19+
120
## v1.5.0
221
- **Breaking Change:** Removed the `ServerVTPM` class and the corresponding `vtpm` field from the `Server` model, as this functionality was unintentionally released and non-functional.
322

‎services/iaas/VERSION‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.5.0
1+
1.6.0

‎services/iaas/src/main/java/cloud/stackit/sdk/iaas/v2alpha1api/JSON.java‎

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,43 @@ public static GsonBuilder createGson() {
129129
getDiscriminatorValue(readElement, "type"));
130130
}
131131
})
132+
.registerTypeSelector(
133+
cloud.stackit.sdk.iaas.v2alpha1api.model.AnyRoute.class,
134+
new TypeSelector<
135+
cloud.stackit.sdk.iaas.v2alpha1api.model.AnyRoute>() {
136+
@Override
137+
public Class<
138+
? extends
139+
cloud.stackit.sdk.iaas.v2alpha1api.model
140+
.AnyRoute>
141+
getClassForElement(JsonElement readElement) {
142+
Map<String, Class> classByDiscriminatorValue =
143+
new HashMap<String, Class>();
144+
classByDiscriminatorValue.put(
145+
"dynamic",
146+
cloud.stackit.sdk.iaas.v2alpha1api.model
147+
.AnyRouteDynamic.class);
148+
classByDiscriminatorValue.put(
149+
"service",
150+
cloud.stackit.sdk.iaas.v2alpha1api.model
151+
.AnyRouteService.class);
152+
classByDiscriminatorValue.put(
153+
"static",
154+
cloud.stackit.sdk.iaas.v2alpha1api.model
155+
.AnyRouteStatic.class);
156+
classByDiscriminatorValue.put(
157+
"system",
158+
cloud.stackit.sdk.iaas.v2alpha1api.model
159+
.AnyRouteSystem.class);
160+
classByDiscriminatorValue.put(
161+
"AnyRoute",
162+
cloud.stackit.sdk.iaas.v2alpha1api.model.AnyRoute
163+
.class);
164+
return getClassByDiscriminator(
165+
classByDiscriminatorValue,
166+
getDiscriminatorValue(readElement, "type"));
167+
}
168+
})
132169
.registerTypeSelector(
133170
cloud.stackit.sdk.iaas.v2alpha1api.model
134171
.CreateVPCNetworkRangePayload.class,
@@ -337,6 +374,31 @@ private static Class getClassByDiscriminator(
337374
gsonBuilder.registerTypeAdapterFactory(
338375
new cloud.stackit.sdk.iaas.v2alpha1api.model.AddVPCStaticRoutePayloadNexthop
339376
.CustomTypeAdapterFactory());
377+
gsonBuilder.registerTypeAdapterFactory(
378+
new cloud.stackit.sdk.iaas.v2alpha1api.model.AllRouteListResponse
379+
.CustomTypeAdapterFactory());
380+
gsonBuilder.registerTypeAdapterFactory(
381+
new cloud.stackit.sdk.iaas.v2alpha1api.model.AnyRoute.CustomTypeAdapterFactory());
382+
gsonBuilder.registerTypeAdapterFactory(
383+
new cloud.stackit.sdk.iaas.v2alpha1api.model.AnyRouteDynamic
384+
.CustomTypeAdapterFactory());
385+
gsonBuilder.registerTypeAdapterFactory(
386+
new cloud.stackit.sdk.iaas.v2alpha1api.model.AnyRouteService
387+
.CustomTypeAdapterFactory());
388+
gsonBuilder.registerTypeAdapterFactory(
389+
new cloud.stackit.sdk.iaas.v2alpha1api.model.AnyRouteSource
390+
.CustomTypeAdapterFactory());
391+
gsonBuilder.registerTypeAdapterFactory(
392+
new cloud.stackit.sdk.iaas.v2alpha1api.model.AnyRouteSourceId
393+
.CustomTypeAdapterFactory());
394+
gsonBuilder.registerTypeAdapterFactory(
395+
new cloud.stackit.sdk.iaas.v2alpha1api.model.AnyRouteStatic
396+
.CustomTypeAdapterFactory());
397+
gsonBuilder.registerTypeAdapterFactory(
398+
new cloud.stackit.sdk.iaas.v2alpha1api.model.AnyRouteSystem
399+
.CustomTypeAdapterFactory());
400+
gsonBuilder.registerTypeAdapterFactory(
401+
new cloud.stackit.sdk.iaas.v2alpha1api.model.BaseRoute.CustomTypeAdapterFactory());
340402
gsonBuilder.registerTypeAdapterFactory(
341403
new cloud.stackit.sdk.iaas.v2alpha1api.model.CreateNetworkIPv4
342404
.CustomTypeAdapterFactory());
@@ -407,6 +469,14 @@ private static Class getClassByDiscriminator(
407469
gsonBuilder.registerTypeAdapterFactory(
408470
new cloud.stackit.sdk.iaas.v2alpha1api.model.PartialUpdateVPCPayload
409471
.CustomTypeAdapterFactory());
472+
gsonBuilder.registerTypeAdapterFactory(
473+
new cloud.stackit.sdk.iaas.v2alpha1api.model.PrefixEntries
474+
.CustomTypeAdapterFactory());
475+
gsonBuilder.registerTypeAdapterFactory(
476+
new cloud.stackit.sdk.iaas.v2alpha1api.model.PrefixList.CustomTypeAdapterFactory());
477+
gsonBuilder.registerTypeAdapterFactory(
478+
new cloud.stackit.sdk.iaas.v2alpha1api.model.PrefixListListResponse
479+
.CustomTypeAdapterFactory());
410480
gsonBuilder.registerTypeAdapterFactory(
411481
new cloud.stackit.sdk.iaas.v2alpha1api.model.RegionalVPC
412482
.CustomTypeAdapterFactory());
@@ -416,6 +486,9 @@ private static Class getClassByDiscriminator(
416486
gsonBuilder.registerTypeAdapterFactory(
417487
new cloud.stackit.sdk.iaas.v2alpha1api.model.RegionalVPCList
418488
.CustomTypeAdapterFactory());
489+
gsonBuilder.registerTypeAdapterFactory(
490+
new cloud.stackit.sdk.iaas.v2alpha1api.model.RetypeVolumePayload
491+
.CustomTypeAdapterFactory());
419492
gsonBuilder.registerTypeAdapterFactory(
420493
new cloud.stackit.sdk.iaas.v2alpha1api.model.Route.CustomTypeAdapterFactory());
421494
gsonBuilder.registerTypeAdapterFactory(

0 commit comments

Comments
 (0)