Skip to content

Commit 820353f

Browse files
Generator: Update SDK /services/iaas (#37)
Co-authored-by: Ruben Hoenle <Ruben.Hoenle@stackit.cloud>
1 parent 00da8d6 commit 820353f

Some content is hidden

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

44 files changed

+615
-126
lines changed

CHANGELOG.md

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,19 @@
88
- Marked `KeyFlowInterceptor` class as deprecated, use `KeyFlowAuthenticator` instead
99
- Marked `SetupAuth` constructors and methods `SetupAuth.init()` and `SetupAuth.getAuthHandler()` as deprecated
1010
- all other methods of `SetupAuth` are marked as `static` now, only these will remain in the future
11-
- `iaas`: [v0.2.0](services/iaas/CHANGELOG.md#v020)
12-
- **Feature:** Support for passing custom OkHttpClient objects
13-
- `ApiClient`
14-
- Added constructors with `OkHttpClient` param (recommended for production use)
15-
- Use new `KeyFlowAuthenticator` `okhttp3.Authenticator` implementation instead of request interceptor for authentication
16-
- `DefaultApi`: Added constructors with `OkHttpClient` param (recommended for production use)
17-
- `IaasApi`: Added constructors with `OkHttpClient` param (recommended for production use)
11+
- `iaas`:
12+
- [v0.3.0](services/iaas/CHANGELOG.md#v030)
13+
- **Feature:** Add `createdAt` and `updatedAt` attributes to `SecurityGroupRule`, `BaseSecurityGroupRule`, `CreateSecurityGroupRulePayload` model classes
14+
- **Feature:** Add `description` attribute to `CreateNicPayload`, `NIC`, `UpdateNicPayload` model classes
15+
- **Feature:** New model class `ServerAgent`
16+
- **Feature:** Add `agent` attribute to `Server`, `CreateServerPayload` model classes
17+
- [v0.2.0](services/iaas/CHANGELOG.md#v020)
18+
- **Feature:** Support for passing custom OkHttpClient objects
19+
- `ApiClient`
20+
- Added constructors with `OkHttpClient` param (recommended for production use)
21+
- Use new `KeyFlowAuthenticator` `okhttp3.Authenticator` implementation instead of request interceptor for authentication
22+
- `DefaultApi`: Added constructors with `OkHttpClient` param (recommended for production use)
23+
- `IaasApi`: Added constructors with `OkHttpClient` param (recommended for production use)
1824
- `resourcemanager`: [v0.2.0](services/resourcemanager/CHANGELOG.md#v020)
1925
- **Feature:** Support for passing custom OkHttpClient objects
2026
- `ApiClient`

services/iaas/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## v0.3.0
2+
- **Feature:** Add `createdAt` and `updatedAt` attributes to `SecurityGroupRule`, `BaseSecurityGroupRule`, `CreateSecurityGroupRulePayload` model classes
3+
- **Feature:** Add `description` attribute to `CreateNicPayload`, `NIC`, `UpdateNicPayload` model classes
4+
- **Feature:** New model class `ServerAgent`
5+
- **Feature:** Add `agent` attribute to `Server`, `CreateServerPayload` model classes
6+
17
## v0.2.0
28
- **Feature:** Support for passing custom OkHttpClient objects
39
- `ApiClient`

services/iaas/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.2.0
1+
0.3.0

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,8 @@ private static Class getClassByDiscriminator(
299299
.CustomTypeAdapterFactory());
300300
gsonBuilder.registerTypeAdapterFactory(
301301
new cloud.stackit.sdk.iaas.model.Server.CustomTypeAdapterFactory());
302+
gsonBuilder.registerTypeAdapterFactory(
303+
new cloud.stackit.sdk.iaas.model.ServerAgent.CustomTypeAdapterFactory());
302304
gsonBuilder.registerTypeAdapterFactory(
303305
new cloud.stackit.sdk.iaas.model.ServerConsoleUrl.CustomTypeAdapterFactory());
304306
gsonBuilder.registerTypeAdapterFactory(

services/iaas/src/main/java/cloud/stackit/sdk/iaas/model/Backup.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,9 @@ public Backup labels(@javax.annotation.Nullable Object labels) {
142142

143143
/**
144144
* Object that represents the labels of an object. Regex for keys:
145-
* &#x60;^[a-z]((-|_|[a-z0-9])){0,62}$&#x60;. Regex for values:
146-
* &#x60;^(-|_|[a-z0-9]){0,63}$&#x60;. Providing a &#x60;null&#x60; value for a key will remove
147-
* that key.
145+
* &#x60;^(?&#x3D;.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$&#x60;. Regex for values:
146+
* &#x60;^(?&#x3D;.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$&#x60;. Providing a
147+
* &#x60;null&#x60; value for a key will remove that key.
148148
*
149149
* @return labels
150150
*/

services/iaas/src/main/java/cloud/stackit/sdk/iaas/model/BaseSecurityGroupRule.java

Lines changed: 45 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import com.google.gson.stream.JsonReader;
2424
import com.google.gson.stream.JsonWriter;
2525
import java.io.IOException;
26+
import java.time.OffsetDateTime;
2627
import java.util.Arrays;
2728
import java.util.HashSet;
2829
import java.util.Map;
@@ -35,6 +36,11 @@
3536
value = "org.openapitools.codegen.languages.JavaClientCodegen",
3637
comments = "Generator version: 7.15.0")
3738
public class BaseSecurityGroupRule {
39+
public static final String SERIALIZED_NAME_CREATED_AT = "createdAt";
40+
41+
@SerializedName(SERIALIZED_NAME_CREATED_AT)
42+
@javax.annotation.Nullable private OffsetDateTime createdAt;
43+
3844
public static final String SERIALIZED_NAME_DESCRIPTION = "description";
3945

4046
@SerializedName(SERIALIZED_NAME_DESCRIPTION)
@@ -81,12 +87,29 @@ public class BaseSecurityGroupRule {
8187
@SerializedName(SERIALIZED_NAME_SECURITY_GROUP_ID)
8288
@javax.annotation.Nullable private UUID securityGroupId;
8389

90+
public static final String SERIALIZED_NAME_UPDATED_AT = "updatedAt";
91+
92+
@SerializedName(SERIALIZED_NAME_UPDATED_AT)
93+
@javax.annotation.Nullable private OffsetDateTime updatedAt;
94+
8495
public BaseSecurityGroupRule() {}
8596

86-
public BaseSecurityGroupRule(UUID id, UUID securityGroupId) {
97+
public BaseSecurityGroupRule(
98+
OffsetDateTime createdAt, UUID id, UUID securityGroupId, OffsetDateTime updatedAt) {
8799
this();
100+
this.createdAt = createdAt;
88101
this.id = id;
89102
this.securityGroupId = securityGroupId;
103+
this.updatedAt = updatedAt;
104+
}
105+
106+
/**
107+
* Date-time when resource was created.
108+
*
109+
* @return createdAt
110+
*/
111+
@javax.annotation.Nullable public OffsetDateTime getCreatedAt() {
112+
return createdAt;
90113
}
91114

92115
public BaseSecurityGroupRule description(@javax.annotation.Nullable String description) {
@@ -238,6 +261,15 @@ public void setRemoteSecurityGroupId(@javax.annotation.Nullable UUID remoteSecur
238261
return securityGroupId;
239262
}
240263

264+
/**
265+
* Date-time when resource was last updated.
266+
*
267+
* @return updatedAt
268+
*/
269+
@javax.annotation.Nullable public OffsetDateTime getUpdatedAt() {
270+
return updatedAt;
271+
}
272+
241273
@Override
242274
public boolean equals(Object o) {
243275
if (this == o) {
@@ -247,7 +279,8 @@ public boolean equals(Object o) {
247279
return false;
248280
}
249281
BaseSecurityGroupRule baseSecurityGroupRule = (BaseSecurityGroupRule) o;
250-
return Objects.equals(this.description, baseSecurityGroupRule.description)
282+
return Objects.equals(this.createdAt, baseSecurityGroupRule.createdAt)
283+
&& Objects.equals(this.description, baseSecurityGroupRule.description)
251284
&& Objects.equals(this.direction, baseSecurityGroupRule.direction)
252285
&& Objects.equals(this.ethertype, baseSecurityGroupRule.ethertype)
253286
&& Objects.equals(this.icmpParameters, baseSecurityGroupRule.icmpParameters)
@@ -256,12 +289,14 @@ public boolean equals(Object o) {
256289
&& Objects.equals(this.portRange, baseSecurityGroupRule.portRange)
257290
&& Objects.equals(
258291
this.remoteSecurityGroupId, baseSecurityGroupRule.remoteSecurityGroupId)
259-
&& Objects.equals(this.securityGroupId, baseSecurityGroupRule.securityGroupId);
292+
&& Objects.equals(this.securityGroupId, baseSecurityGroupRule.securityGroupId)
293+
&& Objects.equals(this.updatedAt, baseSecurityGroupRule.updatedAt);
260294
}
261295

262296
@Override
263297
public int hashCode() {
264298
return Objects.hash(
299+
createdAt,
265300
description,
266301
direction,
267302
ethertype,
@@ -270,13 +305,15 @@ public int hashCode() {
270305
ipRange,
271306
portRange,
272307
remoteSecurityGroupId,
273-
securityGroupId);
308+
securityGroupId,
309+
updatedAt);
274310
}
275311

276312
@Override
277313
public String toString() {
278314
StringBuilder sb = new StringBuilder();
279315
sb.append("class BaseSecurityGroupRule {\n");
316+
sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
280317
sb.append(" description: ").append(toIndentedString(description)).append("\n");
281318
sb.append(" direction: ").append(toIndentedString(direction)).append("\n");
282319
sb.append(" ethertype: ").append(toIndentedString(ethertype)).append("\n");
@@ -288,6 +325,7 @@ public String toString() {
288325
.append(toIndentedString(remoteSecurityGroupId))
289326
.append("\n");
290327
sb.append(" securityGroupId: ").append(toIndentedString(securityGroupId)).append("\n");
328+
sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n");
291329
sb.append("}");
292330
return sb.toString();
293331
}
@@ -311,6 +349,7 @@ private String toIndentedString(Object o) {
311349
openapiFields =
312350
new HashSet<String>(
313351
Arrays.asList(
352+
"createdAt",
314353
"description",
315354
"direction",
316355
"ethertype",
@@ -319,7 +358,8 @@ private String toIndentedString(Object o) {
319358
"ipRange",
320359
"portRange",
321360
"remoteSecurityGroupId",
322-
"securityGroupId"));
361+
"securityGroupId",
362+
"updatedAt"));
323363

324364
// a set of required properties/fields (JSON key names)
325365
openapiRequiredFields = new HashSet<String>(Arrays.asList("direction"));

services/iaas/src/main/java/cloud/stackit/sdk/iaas/model/CreateBackupPayload.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ public CreateBackupPayload labels(@javax.annotation.Nullable Object labels) {
5959

6060
/**
6161
* Object that represents the labels of an object. Regex for keys:
62-
* &#x60;^[a-z]((-|_|[a-z0-9])){0,62}$&#x60;. Regex for values:
63-
* &#x60;^(-|_|[a-z0-9]){0,63}$&#x60;. Providing a &#x60;null&#x60; value for a key will remove
64-
* that key.
62+
* &#x60;^(?&#x3D;.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$&#x60;. Regex for values:
63+
* &#x60;^(?&#x3D;.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$&#x60;. Providing a
64+
* &#x60;null&#x60; value for a key will remove that key.
6565
*
6666
* @return labels
6767
*/

services/iaas/src/main/java/cloud/stackit/sdk/iaas/model/CreateImagePayload.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -232,9 +232,9 @@ public CreateImagePayload labels(@javax.annotation.Nullable Object labels) {
232232

233233
/**
234234
* Object that represents the labels of an object. Regex for keys:
235-
* &#x60;^[a-z]((-|_|[a-z0-9])){0,62}$&#x60;. Regex for values:
236-
* &#x60;^(-|_|[a-z0-9]){0,63}$&#x60;. Providing a &#x60;null&#x60; value for a key will remove
237-
* that key.
235+
* &#x60;^(?&#x3D;.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$&#x60;. Regex for values:
236+
* &#x60;^(?&#x3D;.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$&#x60;. Providing a
237+
* &#x60;null&#x60; value for a key will remove that key.
238238
*
239239
* @return labels
240240
*/

services/iaas/src/main/java/cloud/stackit/sdk/iaas/model/CreateKeyPairPayload.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,9 @@ public CreateKeyPairPayload labels(@javax.annotation.Nullable Object labels) {
101101

102102
/**
103103
* Object that represents the labels of an object. Regex for keys:
104-
* &#x60;^[a-z]((-|_|[a-z0-9])){0,62}$&#x60;. Regex for values:
105-
* &#x60;^(-|_|[a-z0-9]){0,63}$&#x60;. Providing a &#x60;null&#x60; value for a key will remove
106-
* that key.
104+
* &#x60;^(?&#x3D;.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$&#x60;. Regex for values:
105+
* &#x60;^(?&#x3D;.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$&#x60;. Providing a
106+
* &#x60;null&#x60; value for a key will remove that key.
107107
*
108108
* @return labels
109109
*/

services/iaas/src/main/java/cloud/stackit/sdk/iaas/model/CreateNetworkAreaPayload.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ public CreateNetworkAreaPayload labels(@javax.annotation.Nullable Object labels)
8080

8181
/**
8282
* Object that represents the labels of an object. Regex for keys:
83-
* &#x60;^[a-z]((-|_|[a-z0-9])){0,62}$&#x60;. Regex for values:
84-
* &#x60;^(-|_|[a-z0-9]){0,63}$&#x60;. Providing a &#x60;null&#x60; value for a key will remove
85-
* that key.
83+
* &#x60;^(?&#x3D;.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$&#x60;. Regex for values:
84+
* &#x60;^(?&#x3D;.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$&#x60;. Providing a
85+
* &#x60;null&#x60; value for a key will remove that key.
8686
*
8787
* @return labels
8888
*/

0 commit comments

Comments
 (0)