diff --git a/services/sfs/README.md b/services/sfs/README.md
index 31524398..b1b405ff 100644
--- a/services/sfs/README.md
+++ b/services/sfs/README.md
@@ -1,5 +1,10 @@
# STACKIT Java SDK for STACKIT File Storage (SFS)
+- API version: 1.0.0
+
+API used to create and manage NFS Shares.
+
+
This package is part of the STACKIT Java SDK. For additional information, please visit the [GitHub repository](https://github.com/stackitcloud/stackit-sdk-java) of the SDK.
## Installation from Maven Central (recommended)
diff --git a/services/sfs/oas_commit b/services/sfs/oas_commit
index e86c7db2..d95cb336 100644
--- a/services/sfs/oas_commit
+++ b/services/sfs/oas_commit
@@ -1 +1 @@
-9356c10747db357b4ec533ec97231f1af5530ca0
+57752d1e917248b5b47a9cefdeae49703477a6f2
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/ApiCallback.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/ApiCallback.java
similarity index 97%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/ApiCallback.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/ApiCallback.java
index 2a04735b..5f28ded0 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/ApiCallback.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/ApiCallback.java
@@ -10,7 +10,7 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api;
+package cloud.stackit.sdk.sfs;
import cloud.stackit.sdk.core.exception.ApiException;
import java.util.List;
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/ApiClient.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/ApiClient.java
similarity index 99%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/ApiClient.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/ApiClient.java
index e6b7e9a7..3490abdc 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/ApiClient.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/ApiClient.java
@@ -10,7 +10,7 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api;
+package cloud.stackit.sdk.sfs;
import cloud.stackit.sdk.core.KeyFlowAuthenticator;
import cloud.stackit.sdk.core.config.CoreConfiguration;
@@ -357,7 +357,7 @@ public DateFormat getDateFormat() {
* Setter for the field dateFormat.
*
* @param dateFormat a {@link java.text.DateFormat} object
- * @return a {@link cloud.stackit.sdk.sfs.v1api.ApiClient} object
+ * @return a {@link cloud.stackit.sdk.sfs.ApiClient} object
*/
public ApiClient setDateFormat(DateFormat dateFormat) {
JSON.setDateFormat(dateFormat);
@@ -368,7 +368,7 @@ public ApiClient setDateFormat(DateFormat dateFormat) {
* Set SqlDateFormat.
*
* @param dateFormat a {@link java.text.DateFormat} object
- * @return a {@link cloud.stackit.sdk.sfs.v1api.ApiClient} object
+ * @return a {@link cloud.stackit.sdk.sfs.ApiClient} object
*/
public ApiClient setSqlDateFormat(DateFormat dateFormat) {
JSON.setSqlDateFormat(dateFormat);
@@ -379,7 +379,7 @@ public ApiClient setSqlDateFormat(DateFormat dateFormat) {
* Set OffsetDateTimeFormat.
*
* @param dateFormat a {@link java.time.format.DateTimeFormatter} object
- * @return a {@link cloud.stackit.sdk.sfs.v1api.ApiClient} object
+ * @return a {@link cloud.stackit.sdk.sfs.ApiClient} object
*/
public ApiClient setOffsetDateTimeFormat(DateTimeFormatter dateFormat) {
JSON.setOffsetDateTimeFormat(dateFormat);
@@ -390,7 +390,7 @@ public ApiClient setOffsetDateTimeFormat(DateTimeFormatter dateFormat) {
* Set LocalDateFormat.
*
* @param dateFormat a {@link java.time.format.DateTimeFormatter} object
- * @return a {@link cloud.stackit.sdk.sfs.v1api.ApiClient} object
+ * @return a {@link cloud.stackit.sdk.sfs.ApiClient} object
*/
public ApiClient setLocalDateFormat(DateTimeFormatter dateFormat) {
JSON.setLocalDateFormat(dateFormat);
@@ -401,7 +401,7 @@ public ApiClient setLocalDateFormat(DateTimeFormatter dateFormat) {
* Set LenientOnJson.
*
* @param lenientOnJson a boolean
- * @return a {@link cloud.stackit.sdk.sfs.v1api.ApiClient} object
+ * @return a {@link cloud.stackit.sdk.sfs.ApiClient} object
*/
public ApiClient setLenientOnJson(boolean lenientOnJson) {
JSON.setLenientOnJson(lenientOnJson);
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/ApiResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/ApiResponse.java
similarity index 97%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/ApiResponse.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/ApiResponse.java
index f24ed7c1..66efae55 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/ApiResponse.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/ApiResponse.java
@@ -10,7 +10,7 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api;
+package cloud.stackit.sdk.sfs;
import java.util.List;
import java.util.Map;
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/GzipRequestInterceptor.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/GzipRequestInterceptor.java
similarity index 98%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/GzipRequestInterceptor.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/GzipRequestInterceptor.java
index 7519983a..bfa1a594 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/GzipRequestInterceptor.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/GzipRequestInterceptor.java
@@ -10,7 +10,7 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api;
+package cloud.stackit.sdk.sfs;
import java.io.IOException;
import okhttp3.*;
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/JSON.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/JSON.java
similarity index 78%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/JSON.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/JSON.java
index 376c0a93..654116c2 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/JSON.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/JSON.java
@@ -10,7 +10,7 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api;
+package cloud.stackit.sdk.sfs;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
@@ -96,142 +96,132 @@ private static Class getClassByDiscriminator(
gsonBuilder.registerTypeAdapter(LocalDate.class, localDateTypeAdapter);
gsonBuilder.registerTypeAdapter(byte[].class, byteArrayAdapter);
gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1api.model.CreateResourcePoolPayload
+ new cloud.stackit.sdk.sfs.model.CreateResourcePoolPayload
.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1api.model.CreateResourcePoolResponse
+ new cloud.stackit.sdk.sfs.model.CreateResourcePoolResponse
.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1api.model.CreateResourcePoolSnapshotPayload
+ new cloud.stackit.sdk.sfs.model.CreateResourcePoolSnapshotPayload
.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1api.model.CreateResourcePoolSnapshotResponse
+ new cloud.stackit.sdk.sfs.model.CreateResourcePoolSnapshotResponse
.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1api.model.CreateShareExportPolicyPayload
+ new cloud.stackit.sdk.sfs.model.CreateShareExportPolicyPayload
.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1api.model.CreateShareExportPolicyRequestRule
+ new cloud.stackit.sdk.sfs.model.CreateShareExportPolicyRequestRule
.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1api.model.CreateShareExportPolicyResponse
+ new cloud.stackit.sdk.sfs.model.CreateShareExportPolicyResponse
.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1api.model.CreateSharePayload
- .CustomTypeAdapterFactory());
+ new cloud.stackit.sdk.sfs.model.CreateSharePayload.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1api.model.CreateShareResponse
- .CustomTypeAdapterFactory());
+ new cloud.stackit.sdk.sfs.model.CreateShareResponse.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1api.model.EnableLockResponse
- .CustomTypeAdapterFactory());
+ new cloud.stackit.sdk.sfs.model.EnableLockResponse.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1api.model.Error.CustomTypeAdapterFactory());
+ new cloud.stackit.sdk.sfs.model.Error.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1api.model.GetLockResponse.CustomTypeAdapterFactory());
+ new cloud.stackit.sdk.sfs.model.GetLockResponse.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1api.model.GetResourcePoolResponse
- .CustomTypeAdapterFactory());
+ new cloud.stackit.sdk.sfs.model.GetResourcePoolResponse.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1api.model.GetResourcePoolSnapshotResponse
+ new cloud.stackit.sdk.sfs.model.GetResourcePoolSnapshotResponse
.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1api.model.GetScheduleResponse
- .CustomTypeAdapterFactory());
+ new cloud.stackit.sdk.sfs.model.GetScheduleResponse.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1api.model.GetShareExportPolicyResponse
+ new cloud.stackit.sdk.sfs.model.GetShareExportPolicyResponse
.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1api.model.GetShareResponse.CustomTypeAdapterFactory());
+ new cloud.stackit.sdk.sfs.model.GetShareResponse.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1api.model.GetSnapshotPolicyResponse
+ new cloud.stackit.sdk.sfs.model.GetSnapshotPolicyResponse
.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1api.model.GoogleProtobufAny.CustomTypeAdapterFactory());
+ new cloud.stackit.sdk.sfs.model.GoogleProtobufAny.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1api.model.ListPerformanceClassesResponse
+ new cloud.stackit.sdk.sfs.model.ListPerformanceClassesResponse
.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1api.model.ListResourcePoolSnapshotsResponse
+ new cloud.stackit.sdk.sfs.model.ListResourcePoolSnapshotsResponse
.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1api.model.ListResourcePoolsResponse
+ new cloud.stackit.sdk.sfs.model.ListResourcePoolsResponse
.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1api.model.ListSchedulesResponse
- .CustomTypeAdapterFactory());
+ new cloud.stackit.sdk.sfs.model.ListSchedulesResponse.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1api.model.ListShareExportPoliciesResponse
+ new cloud.stackit.sdk.sfs.model.ListShareExportPoliciesResponse
.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1api.model.ListSharesResponse
- .CustomTypeAdapterFactory());
+ new cloud.stackit.sdk.sfs.model.ListSharesResponse.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1api.model.ListSnapshotPoliciesResponse
+ new cloud.stackit.sdk.sfs.model.ListSnapshotPoliciesResponse
.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1api.model.PerformanceClass.CustomTypeAdapterFactory());
+ new cloud.stackit.sdk.sfs.model.PerformanceClass.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1api.model.ResourcePool.CustomTypeAdapterFactory());
+ new cloud.stackit.sdk.sfs.model.ResourcePool.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1api.model.ResourcePoolPerformanceClass
+ new cloud.stackit.sdk.sfs.model.ResourcePoolPerformanceClass
.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1api.model.ResourcePoolSnapshot
- .CustomTypeAdapterFactory());
+ new cloud.stackit.sdk.sfs.model.ResourcePoolSnapshot.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1api.model.ResourcePoolSnapshotPolicy
+ new cloud.stackit.sdk.sfs.model.ResourcePoolSnapshotPolicy
.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1api.model.ResourcePoolSpace.CustomTypeAdapterFactory());
+ new cloud.stackit.sdk.sfs.model.ResourcePoolSpace.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1api.model.Schedule.CustomTypeAdapterFactory());
+ new cloud.stackit.sdk.sfs.model.Schedule.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1api.model.Share.CustomTypeAdapterFactory());
+ new cloud.stackit.sdk.sfs.model.Share.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1api.model.ShareExportPolicy.CustomTypeAdapterFactory());
+ new cloud.stackit.sdk.sfs.model.ShareExportPolicy.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1api.model.ShareExportPolicyRule
- .CustomTypeAdapterFactory());
+ new cloud.stackit.sdk.sfs.model.ShareExportPolicyRule.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(
+ new cloud.stackit.sdk.sfs.model.SnapshotPolicy.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1api.model.SnapshotPolicy.CustomTypeAdapterFactory());
+ new cloud.stackit.sdk.sfs.model.SnapshotPolicySchedule.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1api.model.SnapshotPolicySchedule
+ new cloud.stackit.sdk.sfs.model.SnapshotPolicySnapshotPolicySchedule
.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1api.model.Status.CustomTypeAdapterFactory());
+ new cloud.stackit.sdk.sfs.model.Status.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1api.model.UpdateResourcePoolPayload
+ new cloud.stackit.sdk.sfs.model.UpdateResourcePoolPayload
.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1api.model.UpdateResourcePoolResponse
+ new cloud.stackit.sdk.sfs.model.UpdateResourcePoolResponse
.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1api.model.UpdateResourcePoolSnapshotPayload
+ new cloud.stackit.sdk.sfs.model.UpdateResourcePoolSnapshotPayload
.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1api.model.UpdateResourcePoolSnapshotResponse
+ new cloud.stackit.sdk.sfs.model.UpdateResourcePoolSnapshotResponse
.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1api.model.UpdateShareExportPolicyBodyRule
+ new cloud.stackit.sdk.sfs.model.UpdateShareExportPolicyBodyRule
.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1api.model.UpdateShareExportPolicyPayload
+ new cloud.stackit.sdk.sfs.model.UpdateShareExportPolicyPayload
.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1api.model.UpdateShareExportPolicyResponse
+ new cloud.stackit.sdk.sfs.model.UpdateShareExportPolicyResponse
.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1api.model.UpdateSharePayload
- .CustomTypeAdapterFactory());
+ new cloud.stackit.sdk.sfs.model.UpdateSharePayload.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1api.model.UpdateShareResponse
- .CustomTypeAdapterFactory());
+ new cloud.stackit.sdk.sfs.model.UpdateShareResponse.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1api.model.ValidationError.CustomTypeAdapterFactory());
+ new cloud.stackit.sdk.sfs.model.ValidationError.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1api.model.ValidationErrorField
- .CustomTypeAdapterFactory());
+ new cloud.stackit.sdk.sfs.model.ValidationErrorField.CustomTypeAdapterFactory());
gson = gsonBuilder.create();
}
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/Pair.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/Pair.java
similarity index 95%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/Pair.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/Pair.java
index 6cc019b7..68c226ad 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/Pair.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/Pair.java
@@ -10,7 +10,7 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api;
+package cloud.stackit.sdk.sfs;
@javax.annotation.Generated(
value = "org.openapitools.codegen.languages.JavaClientCodegen",
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/ProgressRequestBody.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/ProgressRequestBody.java
similarity index 97%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/ProgressRequestBody.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/ProgressRequestBody.java
index 6b7e273b..5a1c5612 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/ProgressRequestBody.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/ProgressRequestBody.java
@@ -10,7 +10,7 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api;
+package cloud.stackit.sdk.sfs;
import java.io.IOException;
import okhttp3.MediaType;
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/ProgressResponseBody.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/ProgressResponseBody.java
similarity index 97%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/ProgressResponseBody.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/ProgressResponseBody.java
index a063681a..70d63833 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/ProgressResponseBody.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/ProgressResponseBody.java
@@ -10,7 +10,7 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api;
+package cloud.stackit.sdk.sfs;
import java.io.IOException;
import okhttp3.MediaType;
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/ServerConfiguration.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/ServerConfiguration.java
similarity index 98%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/ServerConfiguration.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/ServerConfiguration.java
index 3594f3ec..7a0e0a7d 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/ServerConfiguration.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/ServerConfiguration.java
@@ -10,7 +10,7 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api;
+package cloud.stackit.sdk.sfs;
import java.util.Map;
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/ServerVariable.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/ServerVariable.java
similarity index 96%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/ServerVariable.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/ServerVariable.java
index 81a9f2d7..c14d3ccc 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/ServerVariable.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/ServerVariable.java
@@ -10,7 +10,7 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api;
+package cloud.stackit.sdk.sfs;
import java.util.HashSet;
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/StringUtil.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/StringUtil.java
similarity index 98%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/StringUtil.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/StringUtil.java
index d8048250..35436467 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/StringUtil.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/StringUtil.java
@@ -10,7 +10,7 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api;
+package cloud.stackit.sdk.sfs;
import java.util.Collection;
import java.util.Iterator;
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/api/DefaultApi.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/api/DefaultApi.java
similarity index 99%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/api/DefaultApi.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/api/DefaultApi.java
index 281d58a6..6d4cb418 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/api/DefaultApi.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/api/DefaultApi.java
@@ -10,45 +10,45 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api.api;
+package cloud.stackit.sdk.sfs.api;
import cloud.stackit.sdk.core.config.CoreConfiguration;
import cloud.stackit.sdk.core.exception.ApiException;
-import cloud.stackit.sdk.sfs.v1api.ApiCallback;
-import cloud.stackit.sdk.sfs.v1api.ApiClient;
-import cloud.stackit.sdk.sfs.v1api.ApiResponse;
-import cloud.stackit.sdk.sfs.v1api.Pair;
-import cloud.stackit.sdk.sfs.v1api.model.CreateResourcePoolPayload;
-import cloud.stackit.sdk.sfs.v1api.model.CreateResourcePoolResponse;
-import cloud.stackit.sdk.sfs.v1api.model.CreateResourcePoolSnapshotPayload;
-import cloud.stackit.sdk.sfs.v1api.model.CreateResourcePoolSnapshotResponse;
-import cloud.stackit.sdk.sfs.v1api.model.CreateShareExportPolicyPayload;
-import cloud.stackit.sdk.sfs.v1api.model.CreateShareExportPolicyResponse;
-import cloud.stackit.sdk.sfs.v1api.model.CreateSharePayload;
-import cloud.stackit.sdk.sfs.v1api.model.CreateShareResponse;
-import cloud.stackit.sdk.sfs.v1api.model.EnableLockResponse;
-import cloud.stackit.sdk.sfs.v1api.model.GetLockResponse;
-import cloud.stackit.sdk.sfs.v1api.model.GetResourcePoolResponse;
-import cloud.stackit.sdk.sfs.v1api.model.GetResourcePoolSnapshotResponse;
-import cloud.stackit.sdk.sfs.v1api.model.GetScheduleResponse;
-import cloud.stackit.sdk.sfs.v1api.model.GetShareExportPolicyResponse;
-import cloud.stackit.sdk.sfs.v1api.model.GetShareResponse;
-import cloud.stackit.sdk.sfs.v1api.model.GetSnapshotPolicyResponse;
-import cloud.stackit.sdk.sfs.v1api.model.ListPerformanceClassesResponse;
-import cloud.stackit.sdk.sfs.v1api.model.ListResourcePoolSnapshotsResponse;
-import cloud.stackit.sdk.sfs.v1api.model.ListResourcePoolsResponse;
-import cloud.stackit.sdk.sfs.v1api.model.ListSchedulesResponse;
-import cloud.stackit.sdk.sfs.v1api.model.ListShareExportPoliciesResponse;
-import cloud.stackit.sdk.sfs.v1api.model.ListSharesResponse;
-import cloud.stackit.sdk.sfs.v1api.model.ListSnapshotPoliciesResponse;
-import cloud.stackit.sdk.sfs.v1api.model.UpdateResourcePoolPayload;
-import cloud.stackit.sdk.sfs.v1api.model.UpdateResourcePoolResponse;
-import cloud.stackit.sdk.sfs.v1api.model.UpdateResourcePoolSnapshotPayload;
-import cloud.stackit.sdk.sfs.v1api.model.UpdateResourcePoolSnapshotResponse;
-import cloud.stackit.sdk.sfs.v1api.model.UpdateShareExportPolicyPayload;
-import cloud.stackit.sdk.sfs.v1api.model.UpdateShareExportPolicyResponse;
-import cloud.stackit.sdk.sfs.v1api.model.UpdateSharePayload;
-import cloud.stackit.sdk.sfs.v1api.model.UpdateShareResponse;
+import cloud.stackit.sdk.sfs.ApiCallback;
+import cloud.stackit.sdk.sfs.ApiClient;
+import cloud.stackit.sdk.sfs.ApiResponse;
+import cloud.stackit.sdk.sfs.Pair;
+import cloud.stackit.sdk.sfs.model.CreateResourcePoolPayload;
+import cloud.stackit.sdk.sfs.model.CreateResourcePoolResponse;
+import cloud.stackit.sdk.sfs.model.CreateResourcePoolSnapshotPayload;
+import cloud.stackit.sdk.sfs.model.CreateResourcePoolSnapshotResponse;
+import cloud.stackit.sdk.sfs.model.CreateShareExportPolicyPayload;
+import cloud.stackit.sdk.sfs.model.CreateShareExportPolicyResponse;
+import cloud.stackit.sdk.sfs.model.CreateSharePayload;
+import cloud.stackit.sdk.sfs.model.CreateShareResponse;
+import cloud.stackit.sdk.sfs.model.EnableLockResponse;
+import cloud.stackit.sdk.sfs.model.GetLockResponse;
+import cloud.stackit.sdk.sfs.model.GetResourcePoolResponse;
+import cloud.stackit.sdk.sfs.model.GetResourcePoolSnapshotResponse;
+import cloud.stackit.sdk.sfs.model.GetScheduleResponse;
+import cloud.stackit.sdk.sfs.model.GetShareExportPolicyResponse;
+import cloud.stackit.sdk.sfs.model.GetShareResponse;
+import cloud.stackit.sdk.sfs.model.GetSnapshotPolicyResponse;
+import cloud.stackit.sdk.sfs.model.ListPerformanceClassesResponse;
+import cloud.stackit.sdk.sfs.model.ListResourcePoolSnapshotsResponse;
+import cloud.stackit.sdk.sfs.model.ListResourcePoolsResponse;
+import cloud.stackit.sdk.sfs.model.ListSchedulesResponse;
+import cloud.stackit.sdk.sfs.model.ListShareExportPoliciesResponse;
+import cloud.stackit.sdk.sfs.model.ListSharesResponse;
+import cloud.stackit.sdk.sfs.model.ListSnapshotPoliciesResponse;
+import cloud.stackit.sdk.sfs.model.UpdateResourcePoolPayload;
+import cloud.stackit.sdk.sfs.model.UpdateResourcePoolResponse;
+import cloud.stackit.sdk.sfs.model.UpdateResourcePoolSnapshotPayload;
+import cloud.stackit.sdk.sfs.model.UpdateResourcePoolSnapshotResponse;
+import cloud.stackit.sdk.sfs.model.UpdateShareExportPolicyPayload;
+import cloud.stackit.sdk.sfs.model.UpdateShareExportPolicyResponse;
+import cloud.stackit.sdk.sfs.model.UpdateSharePayload;
+import cloud.stackit.sdk.sfs.model.UpdateShareResponse;
import com.google.gson.reflect.TypeToken;
import java.io.IOException;
import java.lang.reflect.Type;
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/api/SfsApi.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/api/SfsApi.java
similarity index 93%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/api/SfsApi.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/api/SfsApi.java
index 41766833..0bf6ba0b 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/api/SfsApi.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/api/SfsApi.java
@@ -10,7 +10,7 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api.api;
+package cloud.stackit.sdk.sfs.api;
import cloud.stackit.sdk.core.config.CoreConfiguration;
import java.io.IOException;
@@ -33,7 +33,7 @@ public SfsApi() throws IOException {
*
*
For production use consider using the constructor with the OkHttpClient parameter.
*
- * @param configuration your STACKIT SDK CoreConfiguration
+ * @param config your STACKIT SDK CoreConfiguration
* @throws IOException
*/
public SfsApi(CoreConfiguration configuration) throws IOException {
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/AbstractOpenApiSchema.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/AbstractOpenApiSchema.java
similarity index 98%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/AbstractOpenApiSchema.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/AbstractOpenApiSchema.java
index 3f03bf75..d325c54e 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/AbstractOpenApiSchema.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/AbstractOpenApiSchema.java
@@ -10,7 +10,7 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api.model;
+package cloud.stackit.sdk.sfs.model;
import java.util.Map;
import java.util.Objects;
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateResourcePoolPayload.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/CreateResourcePoolPayload.java
similarity index 99%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateResourcePoolPayload.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/CreateResourcePoolPayload.java
index 8c5b85b9..e4e78771 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateResourcePoolPayload.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/CreateResourcePoolPayload.java
@@ -10,9 +10,9 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api.model;
+package cloud.stackit.sdk.sfs.model;
-import cloud.stackit.sdk.sfs.v1api.JSON;
+import cloud.stackit.sdk.sfs.JSON;
import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateResourcePoolResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/CreateResourcePoolResponse.java
similarity index 99%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateResourcePoolResponse.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/CreateResourcePoolResponse.java
index 03d2b0a8..5ae69f78 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateResourcePoolResponse.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/CreateResourcePoolResponse.java
@@ -10,9 +10,9 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api.model;
+package cloud.stackit.sdk.sfs.model;
-import cloud.stackit.sdk.sfs.v1api.JSON;
+import cloud.stackit.sdk.sfs.JSON;
import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateResourcePoolSnapshotPayload.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/CreateResourcePoolSnapshotPayload.java
similarity index 99%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateResourcePoolSnapshotPayload.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/CreateResourcePoolSnapshotPayload.java
index b7084352..4279beca 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateResourcePoolSnapshotPayload.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/CreateResourcePoolSnapshotPayload.java
@@ -10,9 +10,9 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api.model;
+package cloud.stackit.sdk.sfs.model;
-import cloud.stackit.sdk.sfs.v1api.JSON;
+import cloud.stackit.sdk.sfs.JSON;
import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateResourcePoolSnapshotResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/CreateResourcePoolSnapshotResponse.java
similarity index 99%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateResourcePoolSnapshotResponse.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/CreateResourcePoolSnapshotResponse.java
index 955c8b78..956ccb32 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateResourcePoolSnapshotResponse.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/CreateResourcePoolSnapshotResponse.java
@@ -10,9 +10,9 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api.model;
+package cloud.stackit.sdk.sfs.model;
-import cloud.stackit.sdk.sfs.v1api.JSON;
+import cloud.stackit.sdk.sfs.JSON;
import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateShareExportPolicyPayload.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/CreateShareExportPolicyPayload.java
similarity index 99%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateShareExportPolicyPayload.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/CreateShareExportPolicyPayload.java
index 70fca96d..9099fec9 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateShareExportPolicyPayload.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/CreateShareExportPolicyPayload.java
@@ -10,9 +10,9 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api.model;
+package cloud.stackit.sdk.sfs.model;
-import cloud.stackit.sdk.sfs.v1api.JSON;
+import cloud.stackit.sdk.sfs.JSON;
import com.google.gson.Gson;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateShareExportPolicyRequestRule.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/CreateShareExportPolicyRequestRule.java
similarity index 99%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateShareExportPolicyRequestRule.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/CreateShareExportPolicyRequestRule.java
index 303e213a..198228a2 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateShareExportPolicyRequestRule.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/CreateShareExportPolicyRequestRule.java
@@ -10,9 +10,9 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api.model;
+package cloud.stackit.sdk.sfs.model;
-import cloud.stackit.sdk.sfs.v1api.JSON;
+import cloud.stackit.sdk.sfs.JSON;
import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateShareExportPolicyResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/CreateShareExportPolicyResponse.java
similarity index 99%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateShareExportPolicyResponse.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/CreateShareExportPolicyResponse.java
index 17717276..4c9811ff 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateShareExportPolicyResponse.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/CreateShareExportPolicyResponse.java
@@ -10,9 +10,9 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api.model;
+package cloud.stackit.sdk.sfs.model;
-import cloud.stackit.sdk.sfs.v1api.JSON;
+import cloud.stackit.sdk.sfs.JSON;
import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateSharePayload.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/CreateSharePayload.java
similarity index 99%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateSharePayload.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/CreateSharePayload.java
index 5c404e88..28971b3a 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateSharePayload.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/CreateSharePayload.java
@@ -10,9 +10,9 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api.model;
+package cloud.stackit.sdk.sfs.model;
-import cloud.stackit.sdk.sfs.v1api.JSON;
+import cloud.stackit.sdk.sfs.JSON;
import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateShareResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/CreateShareResponse.java
similarity index 99%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateShareResponse.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/CreateShareResponse.java
index 85d8600d..6774fada 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/CreateShareResponse.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/CreateShareResponse.java
@@ -10,9 +10,9 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api.model;
+package cloud.stackit.sdk.sfs.model;
-import cloud.stackit.sdk.sfs.v1api.JSON;
+import cloud.stackit.sdk.sfs.JSON;
import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/EnableLockResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/EnableLockResponse.java
similarity index 99%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/EnableLockResponse.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/EnableLockResponse.java
index 824a2ebf..7976c148 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/EnableLockResponse.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/EnableLockResponse.java
@@ -10,9 +10,9 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api.model;
+package cloud.stackit.sdk.sfs.model;
-import cloud.stackit.sdk.sfs.v1api.JSON;
+import cloud.stackit.sdk.sfs.JSON;
import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/Error.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/Error.java
similarity index 99%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/Error.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/Error.java
index 4b2afef4..0483fbec 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/Error.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/Error.java
@@ -10,9 +10,9 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api.model;
+package cloud.stackit.sdk.sfs.model;
-import cloud.stackit.sdk.sfs.v1api.JSON;
+import cloud.stackit.sdk.sfs.JSON;
import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/GetLockResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/GetLockResponse.java
similarity index 99%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/GetLockResponse.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/GetLockResponse.java
index 9a789fae..caa79f59 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/GetLockResponse.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/GetLockResponse.java
@@ -10,9 +10,9 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api.model;
+package cloud.stackit.sdk.sfs.model;
-import cloud.stackit.sdk.sfs.v1api.JSON;
+import cloud.stackit.sdk.sfs.JSON;
import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/GetResourcePoolResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/GetResourcePoolResponse.java
similarity index 99%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/GetResourcePoolResponse.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/GetResourcePoolResponse.java
index 2e8688ab..9961ff2f 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/GetResourcePoolResponse.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/GetResourcePoolResponse.java
@@ -10,9 +10,9 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api.model;
+package cloud.stackit.sdk.sfs.model;
-import cloud.stackit.sdk.sfs.v1api.JSON;
+import cloud.stackit.sdk.sfs.JSON;
import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/GetResourcePoolSnapshotResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/GetResourcePoolSnapshotResponse.java
similarity index 99%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/GetResourcePoolSnapshotResponse.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/GetResourcePoolSnapshotResponse.java
index c4121117..c5d42a08 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/GetResourcePoolSnapshotResponse.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/GetResourcePoolSnapshotResponse.java
@@ -10,9 +10,9 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api.model;
+package cloud.stackit.sdk.sfs.model;
-import cloud.stackit.sdk.sfs.v1api.JSON;
+import cloud.stackit.sdk.sfs.JSON;
import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/GetScheduleResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/GetScheduleResponse.java
similarity index 99%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/GetScheduleResponse.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/GetScheduleResponse.java
index a66d9ca6..219c073a 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/GetScheduleResponse.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/GetScheduleResponse.java
@@ -10,9 +10,9 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api.model;
+package cloud.stackit.sdk.sfs.model;
-import cloud.stackit.sdk.sfs.v1api.JSON;
+import cloud.stackit.sdk.sfs.JSON;
import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/GetShareExportPolicyResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/GetShareExportPolicyResponse.java
similarity index 99%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/GetShareExportPolicyResponse.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/GetShareExportPolicyResponse.java
index 4a138d96..f2b104ad 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/GetShareExportPolicyResponse.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/GetShareExportPolicyResponse.java
@@ -10,9 +10,9 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api.model;
+package cloud.stackit.sdk.sfs.model;
-import cloud.stackit.sdk.sfs.v1api.JSON;
+import cloud.stackit.sdk.sfs.JSON;
import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/GetShareResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/GetShareResponse.java
similarity index 99%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/GetShareResponse.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/GetShareResponse.java
index 54dca160..d4fc4c22 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/GetShareResponse.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/GetShareResponse.java
@@ -10,9 +10,9 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api.model;
+package cloud.stackit.sdk.sfs.model;
-import cloud.stackit.sdk.sfs.v1api.JSON;
+import cloud.stackit.sdk.sfs.JSON;
import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/GetSnapshotPolicyResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/GetSnapshotPolicyResponse.java
similarity index 99%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/GetSnapshotPolicyResponse.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/GetSnapshotPolicyResponse.java
index d21ae715..c93ad5cb 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/GetSnapshotPolicyResponse.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/GetSnapshotPolicyResponse.java
@@ -10,9 +10,9 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api.model;
+package cloud.stackit.sdk.sfs.model;
-import cloud.stackit.sdk.sfs.v1api.JSON;
+import cloud.stackit.sdk.sfs.JSON;
import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/GoogleProtobufAny.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/GoogleProtobufAny.java
similarity index 99%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/GoogleProtobufAny.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/GoogleProtobufAny.java
index 6d2b4f0d..a806fa67 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/GoogleProtobufAny.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/GoogleProtobufAny.java
@@ -10,9 +10,9 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api.model;
+package cloud.stackit.sdk.sfs.model;
-import cloud.stackit.sdk.sfs.v1api.JSON;
+import cloud.stackit.sdk.sfs.JSON;
import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ListPerformanceClassesResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/ListPerformanceClassesResponse.java
similarity index 99%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ListPerformanceClassesResponse.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/ListPerformanceClassesResponse.java
index e521dd64..23b93241 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ListPerformanceClassesResponse.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/ListPerformanceClassesResponse.java
@@ -10,9 +10,9 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api.model;
+package cloud.stackit.sdk.sfs.model;
-import cloud.stackit.sdk.sfs.v1api.JSON;
+import cloud.stackit.sdk.sfs.JSON;
import com.google.gson.Gson;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ListResourcePoolSnapshotsResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/ListResourcePoolSnapshotsResponse.java
similarity index 99%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ListResourcePoolSnapshotsResponse.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/ListResourcePoolSnapshotsResponse.java
index 21b698a5..51e8de59 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ListResourcePoolSnapshotsResponse.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/ListResourcePoolSnapshotsResponse.java
@@ -10,9 +10,9 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api.model;
+package cloud.stackit.sdk.sfs.model;
-import cloud.stackit.sdk.sfs.v1api.JSON;
+import cloud.stackit.sdk.sfs.JSON;
import com.google.gson.Gson;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ListResourcePoolsResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/ListResourcePoolsResponse.java
similarity index 99%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ListResourcePoolsResponse.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/ListResourcePoolsResponse.java
index 07dcfc75..eb37c69f 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ListResourcePoolsResponse.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/ListResourcePoolsResponse.java
@@ -10,9 +10,9 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api.model;
+package cloud.stackit.sdk.sfs.model;
-import cloud.stackit.sdk.sfs.v1api.JSON;
+import cloud.stackit.sdk.sfs.JSON;
import com.google.gson.Gson;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ListSchedulesResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/ListSchedulesResponse.java
similarity index 99%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ListSchedulesResponse.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/ListSchedulesResponse.java
index 7161feec..eda1ee6c 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ListSchedulesResponse.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/ListSchedulesResponse.java
@@ -10,9 +10,9 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api.model;
+package cloud.stackit.sdk.sfs.model;
-import cloud.stackit.sdk.sfs.v1api.JSON;
+import cloud.stackit.sdk.sfs.JSON;
import com.google.gson.Gson;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ListShareExportPoliciesResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/ListShareExportPoliciesResponse.java
similarity index 99%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ListShareExportPoliciesResponse.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/ListShareExportPoliciesResponse.java
index 454c521e..25b0c7a9 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ListShareExportPoliciesResponse.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/ListShareExportPoliciesResponse.java
@@ -10,9 +10,9 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api.model;
+package cloud.stackit.sdk.sfs.model;
-import cloud.stackit.sdk.sfs.v1api.JSON;
+import cloud.stackit.sdk.sfs.JSON;
import com.google.gson.Gson;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ListSharesResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/ListSharesResponse.java
similarity index 99%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ListSharesResponse.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/ListSharesResponse.java
index cd9e9938..30192f33 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ListSharesResponse.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/ListSharesResponse.java
@@ -10,9 +10,9 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api.model;
+package cloud.stackit.sdk.sfs.model;
-import cloud.stackit.sdk.sfs.v1api.JSON;
+import cloud.stackit.sdk.sfs.JSON;
import com.google.gson.Gson;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ListSnapshotPoliciesResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/ListSnapshotPoliciesResponse.java
similarity index 99%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ListSnapshotPoliciesResponse.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/ListSnapshotPoliciesResponse.java
index 336ceb48..748c6274 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ListSnapshotPoliciesResponse.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/ListSnapshotPoliciesResponse.java
@@ -10,9 +10,9 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api.model;
+package cloud.stackit.sdk.sfs.model;
-import cloud.stackit.sdk.sfs.v1api.JSON;
+import cloud.stackit.sdk.sfs.JSON;
import com.google.gson.Gson;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/PerformanceClass.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/PerformanceClass.java
similarity index 99%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/PerformanceClass.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/PerformanceClass.java
index 6028b585..54301684 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/PerformanceClass.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/PerformanceClass.java
@@ -10,9 +10,9 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api.model;
+package cloud.stackit.sdk.sfs.model;
-import cloud.stackit.sdk.sfs.v1api.JSON;
+import cloud.stackit.sdk.sfs.JSON;
import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ResourcePool.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/ResourcePool.java
similarity index 99%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ResourcePool.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/ResourcePool.java
index 9ed97375..2201eaca 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ResourcePool.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/ResourcePool.java
@@ -10,9 +10,9 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api.model;
+package cloud.stackit.sdk.sfs.model;
-import cloud.stackit.sdk.sfs.v1api.JSON;
+import cloud.stackit.sdk.sfs.JSON;
import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ResourcePoolPerformanceClass.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/ResourcePoolPerformanceClass.java
similarity index 99%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ResourcePoolPerformanceClass.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/ResourcePoolPerformanceClass.java
index 637d8d70..04c5edaa 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ResourcePoolPerformanceClass.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/ResourcePoolPerformanceClass.java
@@ -10,9 +10,9 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api.model;
+package cloud.stackit.sdk.sfs.model;
-import cloud.stackit.sdk.sfs.v1api.JSON;
+import cloud.stackit.sdk.sfs.JSON;
import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ResourcePoolSnapshot.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/ResourcePoolSnapshot.java
similarity index 99%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ResourcePoolSnapshot.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/ResourcePoolSnapshot.java
index 4ce72239..2da1efd6 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ResourcePoolSnapshot.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/ResourcePoolSnapshot.java
@@ -10,9 +10,9 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api.model;
+package cloud.stackit.sdk.sfs.model;
-import cloud.stackit.sdk.sfs.v1api.JSON;
+import cloud.stackit.sdk.sfs.JSON;
import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ResourcePoolSnapshotPolicy.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/ResourcePoolSnapshotPolicy.java
similarity index 99%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ResourcePoolSnapshotPolicy.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/ResourcePoolSnapshotPolicy.java
index 430e28bc..ac54f471 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ResourcePoolSnapshotPolicy.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/ResourcePoolSnapshotPolicy.java
@@ -10,9 +10,9 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api.model;
+package cloud.stackit.sdk.sfs.model;
-import cloud.stackit.sdk.sfs.v1api.JSON;
+import cloud.stackit.sdk.sfs.JSON;
import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ResourcePoolSpace.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/ResourcePoolSpace.java
similarity index 99%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ResourcePoolSpace.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/ResourcePoolSpace.java
index 2c1048f5..400a2db5 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ResourcePoolSpace.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/ResourcePoolSpace.java
@@ -10,9 +10,9 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api.model;
+package cloud.stackit.sdk.sfs.model;
-import cloud.stackit.sdk.sfs.v1api.JSON;
+import cloud.stackit.sdk.sfs.JSON;
import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/Schedule.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/Schedule.java
similarity index 99%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/Schedule.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/Schedule.java
index 9b1dc096..2978c2dc 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/Schedule.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/Schedule.java
@@ -10,9 +10,9 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api.model;
+package cloud.stackit.sdk.sfs.model;
-import cloud.stackit.sdk.sfs.v1api.JSON;
+import cloud.stackit.sdk.sfs.JSON;
import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/Share.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/Share.java
similarity index 99%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/Share.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/Share.java
index da039f37..1b9da8bb 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/Share.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/Share.java
@@ -10,9 +10,9 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api.model;
+package cloud.stackit.sdk.sfs.model;
-import cloud.stackit.sdk.sfs.v1api.JSON;
+import cloud.stackit.sdk.sfs.JSON;
import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ShareExportPolicy.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/ShareExportPolicy.java
similarity index 99%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ShareExportPolicy.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/ShareExportPolicy.java
index 9346ed9c..9f1c31aa 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ShareExportPolicy.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/ShareExportPolicy.java
@@ -10,9 +10,9 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api.model;
+package cloud.stackit.sdk.sfs.model;
-import cloud.stackit.sdk.sfs.v1api.JSON;
+import cloud.stackit.sdk.sfs.JSON;
import com.google.gson.Gson;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ShareExportPolicyRule.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/ShareExportPolicyRule.java
similarity index 99%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ShareExportPolicyRule.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/ShareExportPolicyRule.java
index 305591cd..29607512 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ShareExportPolicyRule.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/ShareExportPolicyRule.java
@@ -10,9 +10,9 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api.model;
+package cloud.stackit.sdk.sfs.model;
-import cloud.stackit.sdk.sfs.v1api.JSON;
+import cloud.stackit.sdk.sfs.JSON;
import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/SnapshotPolicy.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/SnapshotPolicy.java
similarity index 85%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/SnapshotPolicy.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/SnapshotPolicy.java
index 4adddbfe..4b953b74 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/SnapshotPolicy.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/SnapshotPolicy.java
@@ -10,9 +10,9 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api.model;
+package cloud.stackit.sdk.sfs.model;
-import cloud.stackit.sdk.sfs.v1api.JSON;
+import cloud.stackit.sdk.sfs.JSON;
import com.google.gson.Gson;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
@@ -65,9 +65,15 @@ public class SnapshotPolicy {
public static final String SERIALIZED_NAME_SCHEDULES = "schedules";
+ @Deprecated
@SerializedName(SERIALIZED_NAME_SCHEDULES)
@javax.annotation.Nullable private List schedules = new ArrayList<>();
+ public static final String SERIALIZED_NAME_SNAPSHOT_SCHEDULES = "snapshotSchedules";
+
+ @SerializedName(SERIALIZED_NAME_SNAPSHOT_SCHEDULES)
+ @javax.annotation.Nullable private List snapshotSchedules = new ArrayList<>();
+
public SnapshotPolicy() {}
public SnapshotPolicy comment(@javax.annotation.Nullable String comment) {
@@ -160,6 +166,7 @@ public void setName(@javax.annotation.Nullable String name) {
this.name = name;
}
+ @Deprecated
public SnapshotPolicy schedules(
@javax.annotation.Nullable List schedules) {
this.schedules = schedules;
@@ -175,18 +182,50 @@ public SnapshotPolicy addSchedulesItem(SnapshotPolicySchedule schedulesItem) {
}
/**
- * associated schedules
+ * (deprecated) associated schedules
*
* @return schedules
+ * @deprecated
*/
+ @Deprecated
@javax.annotation.Nullable public List getSchedules() {
return schedules;
}
+ @Deprecated
public void setSchedules(@javax.annotation.Nullable List schedules) {
this.schedules = schedules;
}
+ public SnapshotPolicy snapshotSchedules(
+ @javax.annotation.Nullable List snapshotSchedules) {
+ this.snapshotSchedules = snapshotSchedules;
+ return this;
+ }
+
+ public SnapshotPolicy addSnapshotSchedulesItem(
+ SnapshotPolicySnapshotPolicySchedule snapshotSchedulesItem) {
+ if (this.snapshotSchedules == null) {
+ this.snapshotSchedules = new ArrayList<>();
+ }
+ this.snapshotSchedules.add(snapshotSchedulesItem);
+ return this;
+ }
+
+ /**
+ * associated schedules
+ *
+ * @return snapshotSchedules
+ */
+ @javax.annotation.Nullable public List getSnapshotSchedules() {
+ return snapshotSchedules;
+ }
+
+ public void setSnapshotSchedules(
+ @javax.annotation.Nullable List snapshotSchedules) {
+ this.snapshotSchedules = snapshotSchedules;
+ }
+
/**
* A container for additional, undeclared properties. This is a holder for any undeclared
* properties as specified with the 'additionalProperties' keyword in the OAS document.
@@ -246,12 +285,21 @@ public boolean equals(Object o) {
&& Objects.equals(this.id, snapshotPolicy.id)
&& Objects.equals(this.name, snapshotPolicy.name)
&& Objects.equals(this.schedules, snapshotPolicy.schedules)
+ && Objects.equals(this.snapshotSchedules, snapshotPolicy.snapshotSchedules)
&& Objects.equals(this.additionalProperties, snapshotPolicy.additionalProperties);
}
@Override
public int hashCode() {
- return Objects.hash(comment, createdAt, enabled, id, name, schedules, additionalProperties);
+ return Objects.hash(
+ comment,
+ createdAt,
+ enabled,
+ id,
+ name,
+ schedules,
+ snapshotSchedules,
+ additionalProperties);
}
@Override
@@ -264,6 +312,9 @@ public String toString() {
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" schedules: ").append(toIndentedString(schedules)).append("\n");
+ sb.append(" snapshotSchedules: ")
+ .append(toIndentedString(snapshotSchedules))
+ .append("\n");
sb.append(" additionalProperties: ")
.append(toIndentedString(additionalProperties))
.append("\n");
@@ -290,7 +341,13 @@ private String toIndentedString(Object o) {
openapiFields =
new HashSet(
Arrays.asList(
- "comment", "createdAt", "enabled", "id", "name", "schedules"));
+ "comment",
+ "createdAt",
+ "enabled",
+ "id",
+ "name",
+ "schedules",
+ "snapshotSchedules"));
// a set of required properties/fields (JSON key names)
openapiRequiredFields = new HashSet(0);
@@ -357,6 +414,27 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
;
}
}
+ if (jsonObj.get("snapshotSchedules") != null
+ && !jsonObj.get("snapshotSchedules").isJsonNull()) {
+ JsonArray jsonArraysnapshotSchedules = jsonObj.getAsJsonArray("snapshotSchedules");
+ if (jsonArraysnapshotSchedules != null) {
+ // ensure the json data is an array
+ if (!jsonObj.get("snapshotSchedules").isJsonArray()) {
+ throw new IllegalArgumentException(
+ String.format(
+ java.util.Locale.ROOT,
+ "Expected the field `snapshotSchedules` to be an array in the JSON string but got `%s`",
+ jsonObj.get("snapshotSchedules").toString()));
+ }
+
+ // validate the optional field `snapshotSchedules` (array)
+ for (int i = 0; i < jsonArraysnapshotSchedules.size(); i++) {
+ SnapshotPolicySnapshotPolicySchedule.validateJsonElement(
+ jsonArraysnapshotSchedules.get(i));
+ }
+ ;
+ }
+ }
}
public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/SnapshotPolicySchedule.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/SnapshotPolicySchedule.java
similarity index 89%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/SnapshotPolicySchedule.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/SnapshotPolicySchedule.java
index 4e13f1fe..21c18574 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/SnapshotPolicySchedule.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/SnapshotPolicySchedule.java
@@ -10,9 +10,9 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api.model;
+package cloud.stackit.sdk.sfs.model;
-import cloud.stackit.sdk.sfs.v1api.JSON;
+import cloud.stackit.sdk.sfs.JSON;
import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
@@ -40,6 +40,11 @@ public class SnapshotPolicySchedule {
@SerializedName(SERIALIZED_NAME_COUNT)
@javax.annotation.Nullable private Integer count;
+ public static final String SERIALIZED_NAME_INTERVAL = "interval";
+
+ @SerializedName(SERIALIZED_NAME_INTERVAL)
+ @javax.annotation.Nullable private String interval;
+
public static final String SERIALIZED_NAME_PREFIX = "prefix";
@SerializedName(SERIALIZED_NAME_PREFIX)
@@ -63,7 +68,7 @@ public SnapshotPolicySchedule count(@javax.annotation.Nullable Integer count) {
}
/**
- * Get count
+ * Retention Count
*
* @return count
*/
@@ -75,13 +80,31 @@ public void setCount(@javax.annotation.Nullable Integer count) {
this.count = count;
}
+ public SnapshotPolicySchedule interval(@javax.annotation.Nullable String interval) {
+ this.interval = interval;
+ return this;
+ }
+
+ /**
+ * Interval of the Schedule (follows the cron schedule expression in Unix-like systems)
+ *
+ * @return interval
+ */
+ @javax.annotation.Nullable public String getInterval() {
+ return interval;
+ }
+
+ public void setInterval(@javax.annotation.Nullable String interval) {
+ this.interval = interval;
+ }
+
public SnapshotPolicySchedule prefix(@javax.annotation.Nullable String prefix) {
this.prefix = prefix;
return this;
}
/**
- * Get prefix
+ * Prefix used for the snapshots created by this policy
*
* @return prefix
*/
@@ -100,7 +123,7 @@ public SnapshotPolicySchedule retentionPeriod(
}
/**
- * Get retentionPeriod
+ * Retention Period (ISO 8601 format or \"infinite\")
*
* @return retentionPeriod
*/
@@ -118,7 +141,7 @@ public SnapshotPolicySchedule scheduleId(@javax.annotation.Nullable String sched
}
/**
- * Get scheduleId
+ * ID of the Schedule
*
* @return scheduleId
*/
@@ -184,6 +207,7 @@ public boolean equals(Object o) {
}
SnapshotPolicySchedule snapshotPolicySchedule = (SnapshotPolicySchedule) o;
return Objects.equals(this.count, snapshotPolicySchedule.count)
+ && Objects.equals(this.interval, snapshotPolicySchedule.interval)
&& Objects.equals(this.prefix, snapshotPolicySchedule.prefix)
&& Objects.equals(this.retentionPeriod, snapshotPolicySchedule.retentionPeriod)
&& Objects.equals(this.scheduleId, snapshotPolicySchedule.scheduleId)
@@ -193,7 +217,8 @@ public boolean equals(Object o) {
@Override
public int hashCode() {
- return Objects.hash(count, prefix, retentionPeriod, scheduleId, additionalProperties);
+ return Objects.hash(
+ count, interval, prefix, retentionPeriod, scheduleId, additionalProperties);
}
@Override
@@ -201,6 +226,7 @@ public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class SnapshotPolicySchedule {\n");
sb.append(" count: ").append(toIndentedString(count)).append("\n");
+ sb.append(" interval: ").append(toIndentedString(interval)).append("\n");
sb.append(" prefix: ").append(toIndentedString(prefix)).append("\n");
sb.append(" retentionPeriod: ").append(toIndentedString(retentionPeriod)).append("\n");
sb.append(" scheduleId: ").append(toIndentedString(scheduleId)).append("\n");
@@ -229,7 +255,8 @@ private String toIndentedString(Object o) {
// a set of all properties/fields (JSON key names)
openapiFields =
new HashSet(
- Arrays.asList("count", "prefix", "retentionPeriod", "scheduleId"));
+ Arrays.asList(
+ "count", "interval", "prefix", "retentionPeriod", "scheduleId"));
// a set of required properties/fields (JSON key names)
openapiRequiredFields = new HashSet(0);
@@ -253,6 +280,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
}
}
JsonObject jsonObj = jsonElement.getAsJsonObject();
+ if ((jsonObj.get("interval") != null && !jsonObj.get("interval").isJsonNull())
+ && !jsonObj.get("interval").isJsonPrimitive()) {
+ throw new IllegalArgumentException(
+ String.format(
+ java.util.Locale.ROOT,
+ "Expected the field `interval` to be a primitive type in the JSON string but got `%s`",
+ jsonObj.get("interval").toString()));
+ }
if ((jsonObj.get("prefix") != null && !jsonObj.get("prefix").isJsonNull())
&& !jsonObj.get("prefix").isJsonPrimitive()) {
throw new IllegalArgumentException(
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/ShareExportPolicy.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/SnapshotPolicySnapshotPolicySchedule.java
similarity index 57%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/ShareExportPolicy.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/SnapshotPolicySnapshotPolicySchedule.java
index dc115c42..d3f4bfbb 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/model/ShareExportPolicy.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/SnapshotPolicySnapshotPolicySchedule.java
@@ -2,7 +2,7 @@
* STACKIT File Storage (SFS)
* API used to create and manage NFS Shares.
*
- * The version of the OpenAPI document: 1beta.0.0
+ * The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -10,11 +10,10 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1betaapi.model;
+package cloud.stackit.sdk.sfs.model;
-import cloud.stackit.sdk.sfs.v1betaapi.JSON;
+import cloud.stackit.sdk.sfs.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;
@@ -25,7 +24,6 @@
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;
@@ -33,11 +31,11 @@
import java.util.Map;
import java.util.Objects;
-/** ShareExportPolicy */
+/** SnapshotPolicySnapshotPolicySchedule */
@javax.annotation.Generated(
value = "org.openapitools.codegen.languages.JavaClientCodegen",
comments = "Generator version: 7.19.0")
-public class ShareExportPolicy {
+public class SnapshotPolicySnapshotPolicySchedule {
public static final String SERIALIZED_NAME_CREATED_AT = "createdAt";
@SerializedName(SERIALIZED_NAME_CREATED_AT)
@@ -48,30 +46,35 @@ public class ShareExportPolicy {
@SerializedName(SERIALIZED_NAME_ID)
@javax.annotation.Nullable private String id;
- public static final String SERIALIZED_NAME_LABELS = "labels";
+ public static final String SERIALIZED_NAME_INTERVAL = "interval";
- @SerializedName(SERIALIZED_NAME_LABELS)
- @javax.annotation.Nullable private Map labels = new HashMap<>();
+ @SerializedName(SERIALIZED_NAME_INTERVAL)
+ @javax.annotation.Nullable private String interval;
public static final String SERIALIZED_NAME_NAME = "name";
@SerializedName(SERIALIZED_NAME_NAME)
@javax.annotation.Nullable private String name;
- public static final String SERIALIZED_NAME_RULES = "rules";
+ public static final String SERIALIZED_NAME_PREFIX = "prefix";
- @SerializedName(SERIALIZED_NAME_RULES)
- @javax.annotation.Nullable private List rules = new ArrayList<>();
+ @SerializedName(SERIALIZED_NAME_PREFIX)
+ @javax.annotation.Nullable private String prefix;
- public static final String SERIALIZED_NAME_SHARES_USING_EXPORT_POLICY =
- "sharesUsingExportPolicy";
+ public static final String SERIALIZED_NAME_RETENTION_COUNT = "retentionCount";
- @SerializedName(SERIALIZED_NAME_SHARES_USING_EXPORT_POLICY)
- @javax.annotation.Nullable private Integer sharesUsingExportPolicy;
+ @SerializedName(SERIALIZED_NAME_RETENTION_COUNT)
+ @javax.annotation.Nullable private Integer retentionCount;
- public ShareExportPolicy() {}
+ public static final String SERIALIZED_NAME_RETENTION_PERIOD = "retentionPeriod";
- public ShareExportPolicy createdAt(@javax.annotation.Nullable OffsetDateTime createdAt) {
+ @SerializedName(SERIALIZED_NAME_RETENTION_PERIOD)
+ @javax.annotation.Nullable private String retentionPeriod;
+
+ public SnapshotPolicySnapshotPolicySchedule() {}
+
+ public SnapshotPolicySnapshotPolicySchedule createdAt(
+ @javax.annotation.Nullable OffsetDateTime createdAt) {
this.createdAt = createdAt;
return this;
}
@@ -89,13 +92,13 @@ public void setCreatedAt(@javax.annotation.Nullable OffsetDateTime createdAt) {
this.createdAt = createdAt;
}
- public ShareExportPolicy id(@javax.annotation.Nullable String id) {
+ public SnapshotPolicySnapshotPolicySchedule id(@javax.annotation.Nullable String id) {
this.id = id;
return this;
}
/**
- * ID of the Share Export Policy
+ * ID of the Schedule
*
* @return id
*/
@@ -107,42 +110,32 @@ public void setId(@javax.annotation.Nullable String id) {
this.id = id;
}
- public ShareExportPolicy labels(@javax.annotation.Nullable Map labels) {
- this.labels = labels;
- return this;
- }
-
- public ShareExportPolicy putLabelsItem(String key, String labelsItem) {
- if (this.labels == null) {
- this.labels = new HashMap<>();
- }
- this.labels.put(key, labelsItem);
+ public SnapshotPolicySnapshotPolicySchedule interval(
+ @javax.annotation.Nullable String interval) {
+ this.interval = interval;
return this;
}
/**
- * An optional object that represents the labels associated with the share export policy keys
- * are validated using the following regex '^[\\\\p{Ll}][\\\\p{Ll}\\\\p{N}_-]*$' and
- * cannot be empty values are validated using the following regex
- * '^[\\\\p{Ll}\\\\p{N}_-]*$'
+ * Interval of the Schedule (follows the cron schedule expression in Unix-like systems)
*
- * @return labels
+ * @return interval
*/
- @javax.annotation.Nullable public Map getLabels() {
- return labels;
+ @javax.annotation.Nullable public String getInterval() {
+ return interval;
}
- public void setLabels(@javax.annotation.Nullable Map labels) {
- this.labels = labels;
+ public void setInterval(@javax.annotation.Nullable String interval) {
+ this.interval = interval;
}
- public ShareExportPolicy name(@javax.annotation.Nullable String name) {
+ public SnapshotPolicySnapshotPolicySchedule name(@javax.annotation.Nullable String name) {
this.name = name;
return this;
}
/**
- * Name of the Share Export Policy
+ * Name of the Schedule
*
* @return name
*/
@@ -154,51 +147,60 @@ public void setName(@javax.annotation.Nullable String name) {
this.name = name;
}
- public ShareExportPolicy rules(@javax.annotation.Nullable List rules) {
- this.rules = rules;
+ public SnapshotPolicySnapshotPolicySchedule prefix(@javax.annotation.Nullable String prefix) {
+ this.prefix = prefix;
return this;
}
- public ShareExportPolicy addRulesItem(ShareExportPolicyRule rulesItem) {
- if (this.rules == null) {
- this.rules = new ArrayList<>();
- }
- this.rules.add(rulesItem);
+ /**
+ * Prefix used for the snapshots created by this policy
+ *
+ * @return prefix
+ */
+ @javax.annotation.Nullable public String getPrefix() {
+ return prefix;
+ }
+
+ public void setPrefix(@javax.annotation.Nullable String prefix) {
+ this.prefix = prefix;
+ }
+
+ public SnapshotPolicySnapshotPolicySchedule retentionCount(
+ @javax.annotation.Nullable Integer retentionCount) {
+ this.retentionCount = retentionCount;
return this;
}
/**
- * List of rules of the Share Export Policy. The order of the rules within the array does not
- * matter - what matters is the field \"order\" within each rule
+ * Retention Count
*
- * @return rules
+ * @return retentionCount
*/
- @javax.annotation.Nullable public List getRules() {
- return rules;
+ @javax.annotation.Nullable public Integer getRetentionCount() {
+ return retentionCount;
}
- public void setRules(@javax.annotation.Nullable List rules) {
- this.rules = rules;
+ public void setRetentionCount(@javax.annotation.Nullable Integer retentionCount) {
+ this.retentionCount = retentionCount;
}
- public ShareExportPolicy sharesUsingExportPolicy(
- @javax.annotation.Nullable Integer sharesUsingExportPolicy) {
- this.sharesUsingExportPolicy = sharesUsingExportPolicy;
+ public SnapshotPolicySnapshotPolicySchedule retentionPeriod(
+ @javax.annotation.Nullable String retentionPeriod) {
+ this.retentionPeriod = retentionPeriod;
return this;
}
/**
- * Number of Shares using this Share Export Policy
+ * Retention Period (ISO 8601 format or \"infinite\")
*
- * @return sharesUsingExportPolicy
+ * @return retentionPeriod
*/
- @javax.annotation.Nullable public Integer getSharesUsingExportPolicy() {
- return sharesUsingExportPolicy;
+ @javax.annotation.Nullable public String getRetentionPeriod() {
+ return retentionPeriod;
}
- public void setSharesUsingExportPolicy(
- @javax.annotation.Nullable Integer sharesUsingExportPolicy) {
- this.sharesUsingExportPolicy = sharesUsingExportPolicy;
+ public void setRetentionPeriod(@javax.annotation.Nullable String retentionPeriod) {
+ this.retentionPeriod = retentionPeriod;
}
/**
@@ -213,9 +215,9 @@ public void setSharesUsingExportPolicy(
*
* @param key name of the property
* @param value value of the property
- * @return the ShareExportPolicy instance itself
+ * @return the SnapshotPolicySnapshotPolicySchedule instance itself
*/
- public ShareExportPolicy putAdditionalProperty(String key, Object value) {
+ public SnapshotPolicySnapshotPolicySchedule putAdditionalProperty(String key, Object value) {
if (this.additionalProperties == null) {
this.additionalProperties = new HashMap();
}
@@ -253,36 +255,46 @@ public boolean equals(Object o) {
if (o == null || getClass() != o.getClass()) {
return false;
}
- ShareExportPolicy shareExportPolicy = (ShareExportPolicy) o;
- return Objects.equals(this.createdAt, shareExportPolicy.createdAt)
- && Objects.equals(this.id, shareExportPolicy.id)
- && Objects.equals(this.labels, shareExportPolicy.labels)
- && Objects.equals(this.name, shareExportPolicy.name)
- && Objects.equals(this.rules, shareExportPolicy.rules)
+ SnapshotPolicySnapshotPolicySchedule snapshotPolicySnapshotPolicySchedule =
+ (SnapshotPolicySnapshotPolicySchedule) o;
+ return Objects.equals(this.createdAt, snapshotPolicySnapshotPolicySchedule.createdAt)
+ && Objects.equals(this.id, snapshotPolicySnapshotPolicySchedule.id)
+ && Objects.equals(this.interval, snapshotPolicySnapshotPolicySchedule.interval)
+ && Objects.equals(this.name, snapshotPolicySnapshotPolicySchedule.name)
+ && Objects.equals(this.prefix, snapshotPolicySnapshotPolicySchedule.prefix)
+ && Objects.equals(
+ this.retentionCount, snapshotPolicySnapshotPolicySchedule.retentionCount)
&& Objects.equals(
- this.sharesUsingExportPolicy, shareExportPolicy.sharesUsingExportPolicy)
+ this.retentionPeriod, snapshotPolicySnapshotPolicySchedule.retentionPeriod)
&& Objects.equals(
- this.additionalProperties, shareExportPolicy.additionalProperties);
+ this.additionalProperties,
+ snapshotPolicySnapshotPolicySchedule.additionalProperties);
}
@Override
public int hashCode() {
return Objects.hash(
- createdAt, id, labels, name, rules, sharesUsingExportPolicy, additionalProperties);
+ createdAt,
+ id,
+ interval,
+ name,
+ prefix,
+ retentionCount,
+ retentionPeriod,
+ additionalProperties);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
- sb.append("class ShareExportPolicy {\n");
+ sb.append("class SnapshotPolicySnapshotPolicySchedule {\n");
sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
- sb.append(" labels: ").append(toIndentedString(labels)).append("\n");
+ sb.append(" interval: ").append(toIndentedString(interval)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
- sb.append(" rules: ").append(toIndentedString(rules)).append("\n");
- sb.append(" sharesUsingExportPolicy: ")
- .append(toIndentedString(sharesUsingExportPolicy))
- .append("\n");
+ sb.append(" prefix: ").append(toIndentedString(prefix)).append("\n");
+ sb.append(" retentionCount: ").append(toIndentedString(retentionCount)).append("\n");
+ sb.append(" retentionPeriod: ").append(toIndentedString(retentionPeriod)).append("\n");
sb.append(" additionalProperties: ")
.append(toIndentedString(additionalProperties))
.append("\n");
@@ -311,10 +323,11 @@ private String toIndentedString(Object o) {
Arrays.asList(
"createdAt",
"id",
- "labels",
+ "interval",
"name",
- "rules",
- "sharesUsingExportPolicy"));
+ "prefix",
+ "retentionCount",
+ "retentionPeriod"));
// a set of required properties/fields (JSON key names)
openapiRequiredFields = new HashSet(0);
@@ -324,17 +337,19 @@ private String toIndentedString(Object o) {
* 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 ShareExportPolicy
+ * @throws IOException if the JSON Element is invalid with respect to
+ * SnapshotPolicySnapshotPolicySchedule
*/
public static void validateJsonElement(JsonElement jsonElement) throws IOException {
if (jsonElement == null) {
- if (!ShareExportPolicy.openapiRequiredFields
+ if (!SnapshotPolicySnapshotPolicySchedule.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 ShareExportPolicy is not found in the empty JSON string",
- ShareExportPolicy.openapiRequiredFields.toString()));
+ "The required field(s) %s in SnapshotPolicySnapshotPolicySchedule is not found in the empty JSON string",
+ SnapshotPolicySnapshotPolicySchedule.openapiRequiredFields
+ .toString()));
}
}
JsonObject jsonObj = jsonElement.getAsJsonObject();
@@ -346,6 +361,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
"Expected the field `id` to be a primitive type in the JSON string but got `%s`",
jsonObj.get("id").toString()));
}
+ if ((jsonObj.get("interval") != null && !jsonObj.get("interval").isJsonNull())
+ && !jsonObj.get("interval").isJsonPrimitive()) {
+ throw new IllegalArgumentException(
+ String.format(
+ java.util.Locale.ROOT,
+ "Expected the field `interval` to be a primitive type in the JSON string but got `%s`",
+ jsonObj.get("interval").toString()));
+ }
if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull())
&& !jsonObj.get("name").isJsonPrimitive()) {
throw new IllegalArgumentException(
@@ -354,24 +377,21 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
"Expected the field `name` to be a primitive type in the JSON string but got `%s`",
jsonObj.get("name").toString()));
}
- if (jsonObj.get("rules") != null && !jsonObj.get("rules").isJsonNull()) {
- JsonArray jsonArrayrules = jsonObj.getAsJsonArray("rules");
- if (jsonArrayrules != null) {
- // ensure the json data is an array
- if (!jsonObj.get("rules").isJsonArray()) {
- throw new IllegalArgumentException(
- String.format(
- java.util.Locale.ROOT,
- "Expected the field `rules` to be an array in the JSON string but got `%s`",
- jsonObj.get("rules").toString()));
- }
-
- // validate the optional field `rules` (array)
- for (int i = 0; i < jsonArrayrules.size(); i++) {
- ShareExportPolicyRule.validateJsonElement(jsonArrayrules.get(i));
- }
- ;
- }
+ if ((jsonObj.get("prefix") != null && !jsonObj.get("prefix").isJsonNull())
+ && !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()));
+ }
+ if ((jsonObj.get("retentionPeriod") != null && !jsonObj.get("retentionPeriod").isJsonNull())
+ && !jsonObj.get("retentionPeriod").isJsonPrimitive()) {
+ throw new IllegalArgumentException(
+ String.format(
+ java.util.Locale.ROOT,
+ "Expected the field `retentionPeriod` to be a primitive type in the JSON string but got `%s`",
+ jsonObj.get("retentionPeriod").toString()));
}
}
@@ -379,17 +399,20 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
@SuppressWarnings("unchecked")
@Override
public TypeAdapter create(Gson gson, TypeToken type) {
- if (!ShareExportPolicy.class.isAssignableFrom(type.getRawType())) {
- return null; // this class only serializes 'ShareExportPolicy' and its subtypes
+ if (!SnapshotPolicySnapshotPolicySchedule.class.isAssignableFrom(type.getRawType())) {
+ return null; // this class only serializes 'SnapshotPolicySnapshotPolicySchedule'
+ // and its subtypes
}
final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
- final TypeAdapter thisAdapter =
- gson.getDelegateAdapter(this, TypeToken.get(ShareExportPolicy.class));
+ final TypeAdapter thisAdapter =
+ gson.getDelegateAdapter(
+ this, TypeToken.get(SnapshotPolicySnapshotPolicySchedule.class));
return (TypeAdapter)
- new TypeAdapter() {
+ new TypeAdapter() {
@Override
- public void write(JsonWriter out, ShareExportPolicy value)
+ public void write(
+ JsonWriter out, SnapshotPolicySnapshotPolicySchedule value)
throws IOException {
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
obj.remove("additionalProperties");
@@ -420,12 +443,14 @@ else if (entry.getValue() instanceof Character)
}
@Override
- public ShareExportPolicy read(JsonReader in) throws IOException {
+ public SnapshotPolicySnapshotPolicySchedule read(JsonReader in)
+ throws IOException {
JsonElement jsonElement = elementAdapter.read(in);
validateJsonElement(jsonElement);
JsonObject jsonObj = jsonElement.getAsJsonObject();
// store additional fields in the deserialized instance
- ShareExportPolicy instance = thisAdapter.fromJsonTree(jsonObj);
+ SnapshotPolicySnapshotPolicySchedule instance =
+ thisAdapter.fromJsonTree(jsonObj);
for (Map.Entry entry : jsonObj.entrySet()) {
if (!openapiFields.contains(entry.getKey())) {
if (entry.getValue().isJsonPrimitive()) { // primitive type
@@ -464,18 +489,20 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean())
}
/**
- * Create an instance of ShareExportPolicy given an JSON string
+ * Create an instance of SnapshotPolicySnapshotPolicySchedule given an JSON string
*
* @param jsonString JSON string
- * @return An instance of ShareExportPolicy
- * @throws IOException if the JSON string is invalid with respect to ShareExportPolicy
+ * @return An instance of SnapshotPolicySnapshotPolicySchedule
+ * @throws IOException if the JSON string is invalid with respect to
+ * SnapshotPolicySnapshotPolicySchedule
*/
- public static ShareExportPolicy fromJson(String jsonString) throws IOException {
- return JSON.getGson().fromJson(jsonString, ShareExportPolicy.class);
+ public static SnapshotPolicySnapshotPolicySchedule fromJson(String jsonString)
+ throws IOException {
+ return JSON.getGson().fromJson(jsonString, SnapshotPolicySnapshotPolicySchedule.class);
}
/**
- * Convert an instance of ShareExportPolicy to an JSON string
+ * Convert an instance of SnapshotPolicySnapshotPolicySchedule to an JSON string
*
* @return JSON string
*/
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/Status.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/Status.java
similarity index 99%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/Status.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/Status.java
index 5dfb607f..7b1684a8 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/Status.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/Status.java
@@ -10,9 +10,9 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api.model;
+package cloud.stackit.sdk.sfs.model;
-import cloud.stackit.sdk.sfs.v1api.JSON;
+import cloud.stackit.sdk.sfs.JSON;
import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateResourcePoolPayload.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/UpdateResourcePoolPayload.java
similarity index 99%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateResourcePoolPayload.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/UpdateResourcePoolPayload.java
index 6f798f44..33674717 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateResourcePoolPayload.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/UpdateResourcePoolPayload.java
@@ -10,9 +10,9 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api.model;
+package cloud.stackit.sdk.sfs.model;
-import cloud.stackit.sdk.sfs.v1api.JSON;
+import cloud.stackit.sdk.sfs.JSON;
import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateResourcePoolResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/UpdateResourcePoolResponse.java
similarity index 99%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateResourcePoolResponse.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/UpdateResourcePoolResponse.java
index 8dddaa7b..33ff8d73 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateResourcePoolResponse.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/UpdateResourcePoolResponse.java
@@ -10,9 +10,9 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api.model;
+package cloud.stackit.sdk.sfs.model;
-import cloud.stackit.sdk.sfs.v1api.JSON;
+import cloud.stackit.sdk.sfs.JSON;
import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateResourcePoolSnapshotPayload.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/UpdateResourcePoolSnapshotPayload.java
similarity index 99%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateResourcePoolSnapshotPayload.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/UpdateResourcePoolSnapshotPayload.java
index ea62b9f6..9b449719 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateResourcePoolSnapshotPayload.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/UpdateResourcePoolSnapshotPayload.java
@@ -10,9 +10,9 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api.model;
+package cloud.stackit.sdk.sfs.model;
-import cloud.stackit.sdk.sfs.v1api.JSON;
+import cloud.stackit.sdk.sfs.JSON;
import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateResourcePoolSnapshotResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/UpdateResourcePoolSnapshotResponse.java
similarity index 99%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateResourcePoolSnapshotResponse.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/UpdateResourcePoolSnapshotResponse.java
index a3f6da8f..500d182f 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateResourcePoolSnapshotResponse.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/UpdateResourcePoolSnapshotResponse.java
@@ -10,9 +10,9 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api.model;
+package cloud.stackit.sdk.sfs.model;
-import cloud.stackit.sdk.sfs.v1api.JSON;
+import cloud.stackit.sdk.sfs.JSON;
import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateShareExportPolicyBodyRule.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/UpdateShareExportPolicyBodyRule.java
similarity index 99%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateShareExportPolicyBodyRule.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/UpdateShareExportPolicyBodyRule.java
index 79233d00..2e728773 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateShareExportPolicyBodyRule.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/UpdateShareExportPolicyBodyRule.java
@@ -10,9 +10,9 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api.model;
+package cloud.stackit.sdk.sfs.model;
-import cloud.stackit.sdk.sfs.v1api.JSON;
+import cloud.stackit.sdk.sfs.JSON;
import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateShareExportPolicyPayload.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/UpdateShareExportPolicyPayload.java
similarity index 99%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateShareExportPolicyPayload.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/UpdateShareExportPolicyPayload.java
index ecbc87c6..dd415dd9 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateShareExportPolicyPayload.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/UpdateShareExportPolicyPayload.java
@@ -10,9 +10,9 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api.model;
+package cloud.stackit.sdk.sfs.model;
-import cloud.stackit.sdk.sfs.v1api.JSON;
+import cloud.stackit.sdk.sfs.JSON;
import com.google.gson.Gson;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateShareExportPolicyResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/UpdateShareExportPolicyResponse.java
similarity index 99%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateShareExportPolicyResponse.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/UpdateShareExportPolicyResponse.java
index ecfad5e0..0c381424 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateShareExportPolicyResponse.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/UpdateShareExportPolicyResponse.java
@@ -10,9 +10,9 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api.model;
+package cloud.stackit.sdk.sfs.model;
-import cloud.stackit.sdk.sfs.v1api.JSON;
+import cloud.stackit.sdk.sfs.JSON;
import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateSharePayload.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/UpdateSharePayload.java
similarity index 99%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateSharePayload.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/UpdateSharePayload.java
index ce2b5179..427e5bbd 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateSharePayload.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/UpdateSharePayload.java
@@ -10,9 +10,9 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api.model;
+package cloud.stackit.sdk.sfs.model;
-import cloud.stackit.sdk.sfs.v1api.JSON;
+import cloud.stackit.sdk.sfs.JSON;
import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateShareResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/UpdateShareResponse.java
similarity index 99%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateShareResponse.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/UpdateShareResponse.java
index a9219379..fefab35c 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/UpdateShareResponse.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/UpdateShareResponse.java
@@ -10,9 +10,9 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api.model;
+package cloud.stackit.sdk.sfs.model;
-import cloud.stackit.sdk.sfs.v1api.JSON;
+import cloud.stackit.sdk.sfs.JSON;
import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ValidationError.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/ValidationError.java
similarity index 99%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ValidationError.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/ValidationError.java
index 552bf82c..aad54a2d 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ValidationError.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/ValidationError.java
@@ -10,9 +10,9 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api.model;
+package cloud.stackit.sdk.sfs.model;
-import cloud.stackit.sdk.sfs.v1api.JSON;
+import cloud.stackit.sdk.sfs.JSON;
import com.google.gson.Gson;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ValidationErrorField.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/ValidationErrorField.java
similarity index 99%
rename from services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ValidationErrorField.java
rename to services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/ValidationErrorField.java
index 1230b19f..ae47a56f 100644
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1api/model/ValidationErrorField.java
+++ b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/model/ValidationErrorField.java
@@ -10,9 +10,9 @@
* Do not edit the class manually.
*/
-package cloud.stackit.sdk.sfs.v1api.model;
+package cloud.stackit.sdk.sfs.model;
-import cloud.stackit.sdk.sfs.v1api.JSON;
+import cloud.stackit.sdk.sfs.JSON;
import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/ApiCallback.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/ApiCallback.java
deleted file mode 100644
index 5993db99..00000000
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/ApiCallback.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * STACKIT File Storage (SFS)
- * API used to create and manage NFS Shares.
- *
- * The version of the OpenAPI document: 1beta.0.0
- *
- *
- * 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.sfs.v1betaapi;
-
-import cloud.stackit.sdk.core.exception.ApiException;
-import java.util.List;
-import java.util.Map;
-
-/**
- * Callback for asynchronous API call.
- *
- * @param The return type
- */
-public interface ApiCallback {
- /**
- * This is called when the API call fails.
- *
- * @param e The exception causing the failure
- * @param statusCode Status code of the response if available, otherwise it would be 0
- * @param responseHeaders Headers of the response if available, otherwise it would be null
- */
- void onFailure(ApiException e, int statusCode, Map> responseHeaders);
-
- /**
- * This is called when the API call succeeded.
- *
- * @param result The result deserialized from response
- * @param statusCode Status code of the response
- * @param responseHeaders Headers of the response
- */
- void onSuccess(T result, int statusCode, Map> responseHeaders);
-
- /**
- * This is called when the API upload processing.
- *
- * @param bytesWritten bytes Written
- * @param contentLength content length of request body
- * @param done write end
- */
- void onUploadProgress(long bytesWritten, long contentLength, boolean done);
-
- /**
- * This is called when the API download processing.
- *
- * @param bytesRead bytes Read
- * @param contentLength content length of the response
- * @param done Read end
- */
- void onDownloadProgress(long bytesRead, long contentLength, boolean done);
-}
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/ApiClient.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/ApiClient.java
deleted file mode 100644
index 092471fc..00000000
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/ApiClient.java
+++ /dev/null
@@ -1,1600 +0,0 @@
-/*
- * STACKIT File Storage (SFS)
- * API used to create and manage NFS Shares.
- *
- * The version of the OpenAPI document: 1beta.0.0
- *
- *
- * 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.sfs.v1betaapi;
-
-import cloud.stackit.sdk.core.KeyFlowAuthenticator;
-import cloud.stackit.sdk.core.config.CoreConfiguration;
-import cloud.stackit.sdk.core.exception.ApiException;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.UnsupportedEncodingException;
-import java.lang.reflect.Type;
-import java.net.URLConnection;
-import java.net.URLEncoder;
-import java.nio.file.Files;
-import java.nio.file.Paths;
-import java.security.GeneralSecurityException;
-import java.security.KeyStore;
-import java.security.SecureRandom;
-import java.security.cert.Certificate;
-import java.security.cert.CertificateException;
-import java.security.cert.CertificateFactory;
-import java.text.DateFormat;
-import java.time.LocalDate;
-import java.time.OffsetDateTime;
-import java.time.format.DateTimeFormatter;
-import java.util.*;
-import java.util.Map.Entry;
-import java.util.concurrent.TimeUnit;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-import javax.net.ssl.*;
-import okhttp3.*;
-import okhttp3.internal.http.HttpMethod;
-import okhttp3.internal.tls.OkHostnameVerifier;
-import okhttp3.logging.HttpLoggingInterceptor;
-import okhttp3.logging.HttpLoggingInterceptor.Level;
-import okio.Buffer;
-import okio.BufferedSink;
-import okio.Okio;
-
-/** ApiClient class. */
-public class ApiClient {
-
- protected String basePath = "https://sfs.api.stackit.cloud";
- protected List servers =
- new ArrayList(
- Arrays.asList(
- new ServerConfiguration(
- "https://sfs.api.stackit.cloud",
- "No description provided",
- new HashMap() {
- {
- put(
- "region",
- new ServerVariable(
- "No description provided",
- "global",
- new HashSet()));
- }
- })));
- protected Integer serverIndex = 0;
- protected Map serverVariables = null;
- protected boolean debugging = false;
- protected Map defaultHeaderMap = new HashMap();
- protected Map defaultCookieMap = new HashMap();
- protected String tempFolderPath = null;
-
- protected DateFormat dateFormat;
- protected DateFormat datetimeFormat;
- protected boolean lenientDatetimeFormat;
- protected int dateLength;
-
- protected InputStream sslCaCert;
- protected boolean verifyingSsl;
- protected KeyManager[] keyManagers;
- protected String tlsServerName;
-
- protected OkHttpClient httpClient;
- protected JSON json;
-
- protected HttpLoggingInterceptor loggingInterceptor;
-
- protected CoreConfiguration configuration;
-
- /**
- * Basic constructor for ApiClient.
- *
- *
Not recommended for production use, use the one with the OkHttpClient parameter instead.
- *
- * @throws IOException thrown when a file can not be found
- */
- public ApiClient() throws IOException {
- this(null, new CoreConfiguration());
- }
-
- /**
- * Basic constructor for ApiClient
- *
- *
Not recommended for production use, use the one with the OkHttpClient parameter instead.
- *
- * @param config a {@link cloud.stackit.sdk.core.config.CoreConfiguration} object
- * @throws IOException thrown when a file can not be found
- */
- public ApiClient(CoreConfiguration config) throws IOException {
- this(null, config);
- }
-
- /**
- * Constructor for ApiClient with OkHttpClient parameter. Recommended for production use.
- *
- * @param httpClient a OkHttpClient object
- * @throws IOException thrown when a file can not be found
- */
- public ApiClient(OkHttpClient httpClient) throws IOException {
- this(httpClient, new CoreConfiguration());
- }
-
- /**
- * Constructor for ApiClient with OkHttpClient parameter. Recommended for production use.
- *
- * @param httpClient a OkHttpClient object
- * @param config a {@link cloud.stackit.sdk.core.config.CoreConfiguration} object
- * @throws IOException thrown when a file can not be found
- */
- public ApiClient(OkHttpClient httpClient, CoreConfiguration config) throws IOException {
- init();
-
- if (config.getCustomEndpoint() != null && !config.getCustomEndpoint().trim().isEmpty()) {
- basePath = config.getCustomEndpoint();
- }
- if (config.getDefaultHeader() != null) {
- defaultHeaderMap = config.getDefaultHeader();
- }
- this.configuration = config;
-
- if (httpClient == null) {
- initHttpClient();
- KeyFlowAuthenticator authenticator = new KeyFlowAuthenticator(this.httpClient, config);
- this.httpClient = this.httpClient.newBuilder().authenticator(authenticator).build();
- } else {
- // Authorization has to be configured manually in case a custom http client object is
- // passed
- this.httpClient = httpClient;
- }
- }
-
- protected void initHttpClient() {
- initHttpClient(Collections.emptyList());
- }
-
- protected void initHttpClient(List interceptors) {
- OkHttpClient.Builder builder = new OkHttpClient.Builder();
- builder.addNetworkInterceptor(getProgressInterceptor());
- for (Interceptor interceptor : interceptors) {
- builder.addInterceptor(interceptor);
- }
-
- httpClient = builder.build();
- }
-
- protected void init() {
- verifyingSsl = true;
-
- json = new JSON();
-
- // Set default User-Agent.
- setUserAgent("stackit-sdk-java/sfs");
- }
-
- /**
- * Get base path
- *
- * @return Base path
- */
- public String getBasePath() {
- return basePath;
- }
-
- /**
- * Set base path
- *
- * @param basePath Base path of the URL (e.g https://sfs.api.stackit.cloud)
- * @return An instance of ApiClient
- */
- public ApiClient setBasePath(String basePath) {
- this.basePath = basePath;
- this.serverIndex = null;
- return this;
- }
-
- public List getServers() {
- return servers;
- }
-
- public ApiClient setServers(List servers) {
- this.servers = servers;
- return this;
- }
-
- public Integer getServerIndex() {
- return serverIndex;
- }
-
- public ApiClient setServerIndex(Integer serverIndex) {
- this.serverIndex = serverIndex;
- return this;
- }
-
- public Map getServerVariables() {
- return serverVariables;
- }
-
- public ApiClient setServerVariables(Map serverVariables) {
- this.serverVariables = serverVariables;
- return this;
- }
-
- /**
- * Get HTTP client
- *
- * @return An instance of OkHttpClient
- */
- public OkHttpClient getHttpClient() {
- return httpClient;
- }
-
- /**
- * Get JSON
- *
- * @return JSON object
- */
- public JSON getJSON() {
- return json;
- }
-
- /**
- * Set JSON
- *
- * @param json JSON object
- * @return Api client
- */
- public ApiClient setJSON(JSON json) {
- this.json = json;
- return this;
- }
-
- /**
- * True if isVerifyingSsl flag is on
- *
- * @return True if isVerifySsl flag is on
- */
- public boolean isVerifyingSsl() {
- return verifyingSsl;
- }
-
- /**
- * Configure whether to verify certificate and hostname when making https requests. Default to
- * true. NOTE: Do NOT set to false in production code, otherwise you would face multiple types
- * of cryptographic attacks.
- *
- * @param verifyingSsl True to verify TLS/SSL connection
- * @return ApiClient
- */
- public ApiClient setVerifyingSsl(boolean verifyingSsl) {
- this.verifyingSsl = verifyingSsl;
- applySslSettings();
- return this;
- }
-
- /**
- * Get SSL CA cert.
- *
- * @return Input stream to the SSL CA cert
- */
- public InputStream getSslCaCert() {
- return sslCaCert;
- }
-
- /**
- * Configure the CA certificate to be trusted when making https requests. Use null to reset to
- * default.
- *
- * @param sslCaCert input stream for SSL CA cert
- * @return ApiClient
- */
- public ApiClient setSslCaCert(InputStream sslCaCert) {
- this.sslCaCert = sslCaCert;
- applySslSettings();
- return this;
- }
-
- /**
- * Getter for the field keyManagers.
- *
- * @return an array of {@link javax.net.ssl.KeyManager} objects
- */
- public KeyManager[] getKeyManagers() {
- return keyManagers;
- }
-
- /**
- * Configure client keys to use for authorization in an SSL session. Use null to reset to
- * default.
- *
- * @param managers The KeyManagers to use
- * @return ApiClient
- */
- public ApiClient setKeyManagers(KeyManager[] managers) {
- this.keyManagers = managers;
- applySslSettings();
- return this;
- }
-
- /**
- * Get TLS server name for SNI (Server Name Indication).
- *
- * @return The TLS server name
- */
- public String getTlsServerName() {
- return tlsServerName;
- }
-
- /**
- * Set TLS server name for SNI (Server Name Indication). This is used to verify the server
- * certificate against a specific hostname instead of the hostname in the URL.
- *
- * @param tlsServerName The TLS server name to use for certificate verification
- * @return ApiClient
- */
- public ApiClient setTlsServerName(String tlsServerName) {
- this.tlsServerName = tlsServerName;
- applySslSettings();
- return this;
- }
-
- /**
- * Getter for the field dateFormat.
- *
- * @return a {@link java.text.DateFormat} object
- */
- public DateFormat getDateFormat() {
- return dateFormat;
- }
-
- /**
- * Setter for the field dateFormat.
- *
- * @param dateFormat a {@link java.text.DateFormat} object
- * @return a {@link cloud.stackit.sdk.sfs.v1betaapi.ApiClient} object
- */
- public ApiClient setDateFormat(DateFormat dateFormat) {
- JSON.setDateFormat(dateFormat);
- return this;
- }
-
- /**
- * Set SqlDateFormat.
- *
- * @param dateFormat a {@link java.text.DateFormat} object
- * @return a {@link cloud.stackit.sdk.sfs.v1betaapi.ApiClient} object
- */
- public ApiClient setSqlDateFormat(DateFormat dateFormat) {
- JSON.setSqlDateFormat(dateFormat);
- return this;
- }
-
- /**
- * Set OffsetDateTimeFormat.
- *
- * @param dateFormat a {@link java.time.format.DateTimeFormatter} object
- * @return a {@link cloud.stackit.sdk.sfs.v1betaapi.ApiClient} object
- */
- public ApiClient setOffsetDateTimeFormat(DateTimeFormatter dateFormat) {
- JSON.setOffsetDateTimeFormat(dateFormat);
- return this;
- }
-
- /**
- * Set LocalDateFormat.
- *
- * @param dateFormat a {@link java.time.format.DateTimeFormatter} object
- * @return a {@link cloud.stackit.sdk.sfs.v1betaapi.ApiClient} object
- */
- public ApiClient setLocalDateFormat(DateTimeFormatter dateFormat) {
- JSON.setLocalDateFormat(dateFormat);
- return this;
- }
-
- /**
- * Set LenientOnJson.
- *
- * @param lenientOnJson a boolean
- * @return a {@link cloud.stackit.sdk.sfs.v1betaapi.ApiClient} object
- */
- public ApiClient setLenientOnJson(boolean lenientOnJson) {
- JSON.setLenientOnJson(lenientOnJson);
- return this;
- }
-
- /**
- * Set the User-Agent header's value (by adding to the default header map).
- *
- * @param userAgent HTTP request's user agent
- * @return ApiClient
- */
- public ApiClient setUserAgent(String userAgent) {
- addDefaultHeader("User-Agent", userAgent);
- return this;
- }
-
- /**
- * Add a default header.
- *
- * @param key The header's key
- * @param value The header's value
- * @return ApiClient
- */
- public ApiClient addDefaultHeader(String key, String value) {
- defaultHeaderMap.put(key, value);
- return this;
- }
-
- /**
- * Add a default cookie.
- *
- * @param key The cookie's key
- * @param value The cookie's value
- * @return ApiClient
- */
- public ApiClient addDefaultCookie(String key, String value) {
- defaultCookieMap.put(key, value);
- return this;
- }
-
- /**
- * Check that whether debugging is enabled for this API client.
- *
- * @return True if debugging is enabled, false otherwise.
- */
- public boolean isDebugging() {
- return debugging;
- }
-
- /**
- * Enable/disable debugging for this API client.
- *
- * @param debugging To enable (true) or disable (false) debugging
- * @return ApiClient
- */
- public ApiClient setDebugging(boolean debugging) {
- if (debugging != this.debugging) {
- if (debugging) {
- loggingInterceptor = new HttpLoggingInterceptor();
- loggingInterceptor.setLevel(Level.BODY);
- httpClient = httpClient.newBuilder().addInterceptor(loggingInterceptor).build();
- } else {
- final OkHttpClient.Builder builder = httpClient.newBuilder();
- builder.interceptors().remove(loggingInterceptor);
- httpClient = builder.build();
- loggingInterceptor = null;
- }
- }
- this.debugging = debugging;
- return this;
- }
-
- /**
- * The path of temporary folder used to store downloaded files from endpoints with file
- * response. The default value is null, i.e. using the system's default temporary
- * folder.
- *
- * @see createTempFile
- * @return Temporary folder path
- */
- public String getTempFolderPath() {
- return tempFolderPath;
- }
-
- /**
- * Set the temporary folder path (for downloading files)
- *
- * @param tempFolderPath Temporary folder path
- * @return ApiClient
- */
- public ApiClient setTempFolderPath(String tempFolderPath) {
- this.tempFolderPath = tempFolderPath;
- return this;
- }
-
- /**
- * Get connection timeout (in milliseconds).
- *
- * @return Timeout in milliseconds
- */
- public int getConnectTimeout() {
- return httpClient.connectTimeoutMillis();
- }
-
- /**
- * Sets the connect timeout (in milliseconds). A value of 0 means no timeout, otherwise values
- * must be between 1 and {@link java.lang.Integer#MAX_VALUE}.
- *
- * @param connectionTimeout connection timeout in milliseconds
- * @return Api client
- */
- public ApiClient setConnectTimeout(int connectionTimeout) {
- httpClient =
- httpClient
- .newBuilder()
- .connectTimeout(connectionTimeout, TimeUnit.MILLISECONDS)
- .build();
- return this;
- }
-
- /**
- * Get read timeout (in milliseconds).
- *
- * @return Timeout in milliseconds
- */
- public int getReadTimeout() {
- return httpClient.readTimeoutMillis();
- }
-
- /**
- * Sets the read timeout (in milliseconds). A value of 0 means no timeout, otherwise values must
- * be between 1 and {@link java.lang.Integer#MAX_VALUE}.
- *
- * @param readTimeout read timeout in milliseconds
- * @return Api client
- */
- public ApiClient setReadTimeout(int readTimeout) {
- httpClient =
- httpClient.newBuilder().readTimeout(readTimeout, TimeUnit.MILLISECONDS).build();
- return this;
- }
-
- /**
- * Get write timeout (in milliseconds).
- *
- * @return Timeout in milliseconds
- */
- public int getWriteTimeout() {
- return httpClient.writeTimeoutMillis();
- }
-
- /**
- * Sets the write timeout (in milliseconds). A value of 0 means no timeout, otherwise values
- * must be between 1 and {@link java.lang.Integer#MAX_VALUE}.
- *
- * @param writeTimeout connection timeout in milliseconds
- * @return Api client
- */
- public ApiClient setWriteTimeout(int writeTimeout) {
- httpClient =
- httpClient.newBuilder().writeTimeout(writeTimeout, TimeUnit.MILLISECONDS).build();
- return this;
- }
-
- /**
- * Format the given parameter object into string.
- *
- * @param param Parameter
- * @return String representation of the parameter
- */
- public String parameterToString(Object param) {
- if (param == null) {
- return "";
- } else if (param instanceof Date
- || param instanceof OffsetDateTime
- || param instanceof LocalDate) {
- // Serialize to json string and remove the " enclosing characters
- String jsonStr = JSON.serialize(param);
- return jsonStr.substring(1, jsonStr.length() - 1);
- } else if (param instanceof Collection) {
- StringBuilder b = new StringBuilder();
- for (Object o : (Collection) param) {
- if (b.length() > 0) {
- b.append(",");
- }
- b.append(o);
- }
- return b.toString();
- } else {
- return String.valueOf(param);
- }
- }
-
- /**
- * Formats the specified query parameter to a list containing a single {@code Pair} object.
- *
- *
Note that {@code value} must not be a collection.
- *
- * @param name The name of the parameter.
- * @param value The value of the parameter.
- * @return A list containing a single {@code Pair} object.
- */
- public List parameterToPair(String name, Object value) {
- List params = new ArrayList();
-
- // preconditions
- if (name == null || name.isEmpty() || value == null || value instanceof Collection) {
- return params;
- }
-
- params.add(new Pair(name, parameterToString(value)));
- return params;
- }
-
- /**
- * Formats the specified collection query parameters to a list of {@code Pair} objects.
- *
- *
Note that the values of each of the returned Pair objects are percent-encoded.
- *
- * @param collectionFormat The collection format of the parameter.
- * @param name The name of the parameter.
- * @param value The value of the parameter.
- * @return A list of {@code Pair} objects.
- */
- public List parameterToPairs(String collectionFormat, String name, Collection> value) {
- List params = new ArrayList();
-
- // preconditions
- if (name == null || name.isEmpty() || value == null || value.isEmpty()) {
- return params;
- }
-
- // create the params based on the collection format
- if ("multi".equals(collectionFormat)) {
- for (Object item : value) {
- params.add(new Pair(name, escapeString(parameterToString(item))));
- }
- return params;
- }
-
- // collectionFormat is assumed to be "csv" by default
- String delimiter = ",";
-
- // escape all delimiters except commas, which are URI reserved
- // characters
- if ("ssv".equals(collectionFormat)) {
- delimiter = escapeString(" ");
- } else if ("tsv".equals(collectionFormat)) {
- delimiter = escapeString("\t");
- } else if ("pipes".equals(collectionFormat)) {
- delimiter = escapeString("|");
- }
-
- StringBuilder sb = new StringBuilder();
- for (Object item : value) {
- sb.append(delimiter);
- sb.append(escapeString(parameterToString(item)));
- }
-
- params.add(new Pair(name, sb.substring(delimiter.length())));
-
- return params;
- }
-
- /**
- * Formats the specified free-form query parameters to a list of {@code Pair} objects.
- *
- * @param value The free-form query parameters.
- * @return A list of {@code Pair} objects.
- */
- public List freeFormParameterToPairs(Object value) {
- List params = new ArrayList<>();
-
- // preconditions
- if (value == null || !(value instanceof Map)) {
- return params;
- }
-
- @SuppressWarnings("unchecked")
- final Map valuesMap = (Map) value;
-
- for (Map.Entry entry : valuesMap.entrySet()) {
- params.add(new Pair(entry.getKey(), parameterToString(entry.getValue())));
- }
-
- return params;
- }
-
- /**
- * Formats the specified collection path parameter to a string value.
- *
- * @param collectionFormat The collection format of the parameter.
- * @param value The value of the parameter.
- * @return String representation of the parameter
- */
- public String collectionPathParameterToString(String collectionFormat, Collection value) {
- // create the value based on the collection format
- if ("multi".equals(collectionFormat)) {
- // not valid for path params
- return parameterToString(value);
- }
-
- // collectionFormat is assumed to be "csv" by default
- String delimiter = ",";
-
- if ("ssv".equals(collectionFormat)) {
- delimiter = " ";
- } else if ("tsv".equals(collectionFormat)) {
- delimiter = "\t";
- } else if ("pipes".equals(collectionFormat)) {
- delimiter = "|";
- }
-
- StringBuilder sb = new StringBuilder();
- for (Object item : value) {
- sb.append(delimiter);
- sb.append(parameterToString(item));
- }
-
- return sb.substring(delimiter.length());
- }
-
- /**
- * Sanitize filename by removing path. e.g. ../../sun.gif becomes sun.gif
- *
- * @param filename The filename to be sanitized
- * @return The sanitized filename
- */
- public String sanitizeFilename(String filename) {
- return filename.replaceFirst("^.*[/\\\\]", "");
- }
-
- /**
- * Check if the given MIME is a JSON MIME. JSON MIME examples: application/json
- * application/json; charset=UTF8 APPLICATION/JSON application/vnd.company+json "* / *" is also
- * default to JSON
- *
- * @param mime MIME (Multipurpose Internet Mail Extensions)
- * @return True if the given MIME is JSON, false otherwise.
- */
- public boolean isJsonMime(String mime) {
- String jsonMime = "(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$";
- return mime != null && (mime.matches(jsonMime) || mime.equals("*/*"));
- }
-
- /**
- * Select the Accept header's value from the given accepts array: if JSON exists in the given
- * array, use it; otherwise use all of them (joining into a string)
- *
- * @param accepts The accepts array to select from
- * @return The Accept header to use. If the given array is empty, null will be returned (not to
- * set the Accept header explicitly).
- */
- public String selectHeaderAccept(String[] accepts) {
- if (accepts.length == 0) {
- return null;
- }
- for (String accept : accepts) {
- if (isJsonMime(accept)) {
- return accept;
- }
- }
- return StringUtil.join(accepts, ",");
- }
-
- /**
- * Select the Content-Type header's value from the given array: if JSON exists in the given
- * array, use it; otherwise use the first one of the array.
- *
- * @param contentTypes The Content-Type array to select from
- * @return The Content-Type header to use. If the given array is empty, returns null. If it
- * matches "any", JSON will be used.
- */
- public String selectHeaderContentType(String[] contentTypes) {
- if (contentTypes.length == 0) {
- return null;
- }
-
- if (contentTypes[0].equals("*/*")) {
- return "application/json";
- }
-
- for (String contentType : contentTypes) {
- if (isJsonMime(contentType)) {
- return contentType;
- }
- }
-
- return contentTypes[0];
- }
-
- /**
- * Escape the given string to be used as URL query value.
- *
- * @param str String to be escaped
- * @return Escaped string
- */
- public String escapeString(String str) {
- try {
- return URLEncoder.encode(str, "utf8").replaceAll("\\+", "%20");
- } catch (UnsupportedEncodingException e) {
- return str;
- }
- }
-
- /**
- * Deserialize response body to Java object, according to the return type and the Content-Type
- * response header.
- *
- * @param Type
- * @param response HTTP response
- * @param returnType The type of the Java object
- * @return The deserialized Java object
- * @throws cloud.stackit.sdk.core.exception.ApiException If fail to deserialize response body,
- * i.e. cannot read response body or the Content-Type of the response is not supported.
- */
- @SuppressWarnings("unchecked")
- public T deserialize(Response response, Type returnType) throws ApiException {
- if (response == null || returnType == null) {
- return null;
- }
-
- if ("byte[]".equals(returnType.toString())) {
- // Handle binary response (byte array).
- try {
- return (T) response.body().bytes();
- } catch (IOException e) {
- throw new ApiException(e);
- }
- } else if (returnType.equals(File.class)) {
- // Handle file downloading.
- return (T) downloadFileFromResponse(response);
- }
-
- ResponseBody respBody = response.body();
- if (respBody == null) {
- return null;
- }
-
- String contentType = response.headers().get("Content-Type");
- if (contentType == null) {
- // ensuring a default content type
- contentType = "application/json";
- }
- try {
- if (isJsonMime(contentType)) {
- if (returnType.equals(String.class)) {
- String respBodyString = respBody.string();
- if (respBodyString.isEmpty()) {
- return null;
- }
- // Use String-based deserialize for String return type with fallback
- return JSON.deserialize(respBodyString, returnType);
- } else {
- // Use InputStream-based deserialize which supports responses > 2GB
- return JSON.deserialize(respBody.byteStream(), returnType);
- }
- } else if (returnType.equals(String.class)) {
- String respBodyString = respBody.string();
- if (respBodyString.isEmpty()) {
- return null;
- }
- // Expecting string, return the raw response body.
- return (T) respBodyString;
- } else {
- throw new ApiException(
- "Content type \""
- + contentType
- + "\" is not supported for type: "
- + returnType,
- response.code(),
- response.headers().toMultimap(),
- response.body().string());
- }
- } catch (IOException e) {
- throw new ApiException(e);
- }
- }
-
- /**
- * Serialize the given Java object into request body according to the object's class and the
- * request Content-Type.
- *
- * @param obj The Java object
- * @param contentType The request Content-Type
- * @return The serialized request body
- * @throws cloud.stackit.sdk.core.exception.ApiException If fail to serialize the given object
- */
- public RequestBody serialize(Object obj, String contentType) throws ApiException {
- if (obj instanceof byte[]) {
- // Binary (byte array) body parameter support.
- return RequestBody.create((byte[]) obj, MediaType.parse(contentType));
- } else if (obj instanceof File) {
- // File body parameter support.
- return RequestBody.create((File) obj, MediaType.parse(contentType));
- } else if ("text/plain".equals(contentType) && obj instanceof String) {
- return RequestBody.create((String) obj, MediaType.parse(contentType));
- } else if (isJsonMime(contentType)) {
- String content;
- if (obj != null) {
- content = JSON.serialize(obj);
- } else {
- content = null;
- }
- return RequestBody.create(content, MediaType.parse(contentType));
- } else if (obj instanceof String) {
- return RequestBody.create((String) obj, MediaType.parse(contentType));
- } else {
- throw new ApiException("Content type \"" + contentType + "\" is not supported");
- }
- }
-
- /**
- * Download file from the given response.
- *
- * @param response An instance of the Response object
- * @throws cloud.stackit.sdk.core.exception.ApiException If fail to read file content from
- * response and write to disk
- * @return Downloaded file
- */
- public File downloadFileFromResponse(Response response) throws ApiException {
- try {
- File file = prepareDownloadFile(response);
- BufferedSink sink = Okio.buffer(Okio.sink(file));
- sink.writeAll(response.body().source());
- sink.close();
- return file;
- } catch (IOException e) {
- throw new ApiException(e);
- }
- }
-
- /**
- * Prepare file for download
- *
- * @param response An instance of the Response object
- * @return Prepared file for the download
- * @throws java.io.IOException If fail to prepare file for download
- */
- public File prepareDownloadFile(Response response) throws IOException {
- String filename = null;
- String contentDisposition = response.header("Content-Disposition");
- if (contentDisposition != null && !"".equals(contentDisposition)) {
- // Get filename from the Content-Disposition header.
- Pattern pattern = Pattern.compile("filename=['\"]?([^'\"\\s]+)['\"]?");
- Matcher matcher = pattern.matcher(contentDisposition);
- if (matcher.find()) {
- filename = sanitizeFilename(matcher.group(1));
- }
- }
-
- String prefix = null;
- String suffix = null;
- if (filename == null) {
- prefix = "download-";
- suffix = "";
- } else {
- int pos = filename.lastIndexOf(".");
- if (pos == -1) {
- prefix = filename + "-";
- } else {
- prefix = filename.substring(0, pos) + "-";
- suffix = filename.substring(pos);
- }
- // Files.createTempFile requires the prefix to be at least three characters long
- if (prefix.length() < 3) prefix = "download-";
- }
-
- if (tempFolderPath == null) return Files.createTempFile(prefix, suffix).toFile();
- else return Files.createTempFile(Paths.get(tempFolderPath), prefix, suffix).toFile();
- }
-
- /**
- * {@link #execute(Call, Type)}
- *
- * @param Type
- * @param call An instance of the Call object
- * @return ApiResponse<T>
- * @throws cloud.stackit.sdk.core.exception.ApiException If fail to execute the call
- */
- public ApiResponse execute(Call call) throws ApiException {
- return execute(call, null);
- }
-
- /**
- * Execute HTTP call and deserialize the HTTP response body into the given return type.
- *
- * @param returnType The return type used to deserialize HTTP response body
- * @param The return type corresponding to (same with) returnType
- * @param call Call
- * @return ApiResponse object containing response status, headers and data, which is a Java
- * object deserialized from response body and would be null when returnType is null.
- * @throws cloud.stackit.sdk.core.exception.ApiException If fail to execute the call
- */
- public ApiResponse execute(Call call, Type returnType) throws ApiException {
- try {
- Response response = call.execute();
- T data = handleResponse(response, returnType);
- return new ApiResponse(response.code(), response.headers().toMultimap(), data);
- } catch (IOException e) {
- throw new ApiException(e);
- }
- }
-
- /**
- * {@link #executeAsync(Call, Type, ApiCallback)}
- *
- * @param Type
- * @param call An instance of the Call object
- * @param callback ApiCallback<T>
- */
- public void executeAsync(Call call, ApiCallback callback) {
- executeAsync(call, null, callback);
- }
-
- /**
- * Execute HTTP call asynchronously.
- *
- * @param Type
- * @param call The callback to be executed when the API call finishes
- * @param returnType Return type
- * @param callback ApiCallback
- * @see #execute(Call, Type)
- */
- @SuppressWarnings("unchecked")
- public void executeAsync(Call call, final Type returnType, final ApiCallback callback) {
- call.enqueue(
- new Callback() {
- @Override
- public void onFailure(Call call, IOException e) {
- callback.onFailure(new ApiException(e), 0, null);
- }
-
- @Override
- public void onResponse(Call call, Response response) throws IOException {
- T result;
- try {
- result = (T) handleResponse(response, returnType);
- } catch (ApiException e) {
- callback.onFailure(e, response.code(), response.headers().toMultimap());
- return;
- } catch (Exception e) {
- callback.onFailure(
- new ApiException(e),
- response.code(),
- response.headers().toMultimap());
- return;
- }
- callback.onSuccess(
- result, response.code(), response.headers().toMultimap());
- }
- });
- }
-
- /**
- * Handle the given response, return the deserialized object when the response is successful.
- *
- * @param Type
- * @param response Response
- * @param returnType Return type
- * @return Type
- * @throws cloud.stackit.sdk.core.exception.ApiException If the response has an unsuccessful
- * status code or fail to deserialize the response body
- */
- public T handleResponse(Response response, Type returnType) throws ApiException {
- if (response.isSuccessful()) {
- if (returnType == null || response.code() == 204) {
- // returning null if the returnType is not defined,
- // or the status code is 204 (No Content)
- if (response.body() != null) {
- try {
- response.body().close();
- } catch (Exception e) {
- throw new ApiException(
- response.message(),
- e,
- response.code(),
- response.headers().toMultimap());
- }
- }
- return null;
- } else {
- return deserialize(response, returnType);
- }
- } else {
- String respBody = null;
- if (response.body() != null) {
- try {
- respBody = response.body().string();
- } catch (IOException e) {
- throw new ApiException(
- response.message(),
- e,
- response.code(),
- response.headers().toMultimap());
- }
- }
- throw new ApiException(
- response.message(), response.code(), response.headers().toMultimap(), respBody);
- }
- }
-
- /**
- * Build HTTP call with the given options.
- *
- * @param baseUrl The base URL
- * @param path The sub-path of the HTTP URL
- * @param method The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and
- * "DELETE"
- * @param queryParams The query parameters
- * @param collectionQueryParams The collection query parameters
- * @param body The request body object
- * @param headerParams The header parameters
- * @param cookieParams The cookie parameters
- * @param formParams The form parameters
- * @param authNames The authentications to apply
- * @param callback Callback for upload/download progress
- * @return The HTTP call
- * @throws cloud.stackit.sdk.core.exception.ApiException If fail to serialize the request body
- * object
- */
- public Call buildCall(
- String baseUrl,
- String path,
- String method,
- List queryParams,
- List collectionQueryParams,
- Object body,
- Map headerParams,
- Map cookieParams,
- Map formParams,
- String[] authNames,
- ApiCallback callback)
- throws ApiException {
- Request request =
- buildRequest(
- baseUrl,
- path,
- method,
- queryParams,
- collectionQueryParams,
- body,
- headerParams,
- cookieParams,
- formParams,
- authNames,
- callback);
-
- return httpClient.newCall(request);
- }
-
- /**
- * Build an HTTP request with the given options.
- *
- * @param baseUrl The base URL
- * @param path The sub-path of the HTTP URL
- * @param method The request method, one of "GET", "HEAD", "OPTIONS", "POST", "PUT", "PATCH" and
- * "DELETE"
- * @param queryParams The query parameters
- * @param collectionQueryParams The collection query parameters
- * @param body The request body object
- * @param headerParams The header parameters
- * @param cookieParams The cookie parameters
- * @param formParams The form parameters
- * @param authNames The authentications to apply
- * @param callback Callback for upload/download progress
- * @return The HTTP request
- * @throws cloud.stackit.sdk.core.exception.ApiException If fail to serialize the request body
- * object
- */
- public Request buildRequest(
- String baseUrl,
- String path,
- String method,
- List queryParams,
- List collectionQueryParams,
- Object body,
- Map headerParams,
- Map cookieParams,
- Map formParams,
- String[] authNames,
- ApiCallback callback)
- throws ApiException {
- final String url = buildUrl(baseUrl, path, queryParams, collectionQueryParams);
-
- // prepare HTTP request body
- RequestBody reqBody;
- String contentType = headerParams.get("Content-Type");
- String contentTypePure = contentType;
- if (contentTypePure != null && contentTypePure.contains(";")) {
- contentTypePure = contentType.substring(0, contentType.indexOf(";"));
- }
- if (!HttpMethod.permitsRequestBody(method)) {
- reqBody = null;
- } else if ("application/x-www-form-urlencoded".equals(contentTypePure)) {
- reqBody = buildRequestBodyFormEncoding(formParams);
- } else if ("multipart/form-data".equals(contentTypePure)) {
- reqBody = buildRequestBodyMultipart(formParams);
- } else if (body == null) {
- if ("DELETE".equals(method)) {
- // allow calling DELETE without sending a request body
- reqBody = null;
- } else {
- // use an empty request body (for POST, PUT and PATCH)
- reqBody =
- RequestBody.create(
- "", contentType == null ? null : MediaType.parse(contentType));
- }
- } else {
- reqBody = serialize(body, contentType);
- }
-
- List updatedQueryParams = new ArrayList<>(queryParams);
-
- final Request.Builder reqBuilder =
- new Request.Builder()
- .url(buildUrl(baseUrl, path, updatedQueryParams, collectionQueryParams));
- processHeaderParams(headerParams, reqBuilder);
- processCookieParams(cookieParams, reqBuilder);
-
- // Associate callback with request (if not null) so interceptor can
- // access it when creating ProgressResponseBody
- reqBuilder.tag(callback);
-
- Request request = null;
-
- if (callback != null && reqBody != null) {
- ProgressRequestBody progressRequestBody = new ProgressRequestBody(reqBody, callback);
- request = reqBuilder.method(method, progressRequestBody).build();
- } else {
- request = reqBuilder.method(method, reqBody).build();
- }
-
- return request;
- }
-
- /**
- * Build full URL by concatenating base path, the given sub path and query parameters.
- *
- * @param baseUrl The base URL
- * @param path The sub path
- * @param queryParams The query parameters
- * @param collectionQueryParams The collection query parameters
- * @return The full URL
- */
- public String buildUrl(
- String baseUrl, String path, List queryParams, List collectionQueryParams) {
- final StringBuilder url = new StringBuilder();
- if (baseUrl != null) {
- url.append(baseUrl).append(path);
- } else {
- String baseURL;
- if (serverIndex != null) {
- if (serverIndex < 0 || serverIndex >= servers.size()) {
- throw new ArrayIndexOutOfBoundsException(
- String.format(
- java.util.Locale.ROOT,
- "Invalid index %d when selecting the host settings. Must be less than %d",
- serverIndex,
- servers.size()));
- }
- baseURL = servers.get(serverIndex).URL(serverVariables);
- } else {
- baseURL = basePath;
- }
- url.append(baseURL).append(path);
- }
-
- if (queryParams != null && !queryParams.isEmpty()) {
- // support (constant) query string in `path`, e.g. "/posts?draft=1"
- String prefix = path.contains("?") ? "&" : "?";
- for (Pair param : queryParams) {
- if (param.getValue() != null) {
- if (prefix != null) {
- url.append(prefix);
- prefix = null;
- } else {
- url.append("&");
- }
- String value = parameterToString(param.getValue());
- url.append(escapeString(param.getName()))
- .append("=")
- .append(escapeString(value));
- }
- }
- }
-
- if (collectionQueryParams != null && !collectionQueryParams.isEmpty()) {
- String prefix = url.toString().contains("?") ? "&" : "?";
- for (Pair param : collectionQueryParams) {
- if (param.getValue() != null) {
- if (prefix != null) {
- url.append(prefix);
- prefix = null;
- } else {
- url.append("&");
- }
- String value = parameterToString(param.getValue());
- // collection query parameter value already escaped as part of parameterToPairs
- url.append(escapeString(param.getName())).append("=").append(value);
- }
- }
- }
-
- return url.toString();
- }
-
- /**
- * Set header parameters to the request builder, including default headers.
- *
- * @param headerParams Header parameters in the form of Map
- * @param reqBuilder Request.Builder
- */
- public void processHeaderParams(Map headerParams, Request.Builder reqBuilder) {
- for (Entry param : headerParams.entrySet()) {
- reqBuilder.header(param.getKey(), parameterToString(param.getValue()));
- }
- for (Entry header : defaultHeaderMap.entrySet()) {
- if (!headerParams.containsKey(header.getKey())) {
- reqBuilder.header(header.getKey(), parameterToString(header.getValue()));
- }
- }
- }
-
- /**
- * Set cookie parameters to the request builder, including default cookies.
- *
- * @param cookieParams Cookie parameters in the form of Map
- * @param reqBuilder Request.Builder
- */
- public void processCookieParams(Map cookieParams, Request.Builder reqBuilder) {
- for (Entry param : cookieParams.entrySet()) {
- reqBuilder.addHeader(
- "Cookie",
- String.format(
- java.util.Locale.ROOT, "%s=%s", param.getKey(), param.getValue()));
- }
- for (Entry param : defaultCookieMap.entrySet()) {
- if (!cookieParams.containsKey(param.getKey())) {
- reqBuilder.addHeader(
- "Cookie",
- String.format(
- java.util.Locale.ROOT, "%s=%s", param.getKey(), param.getValue()));
- }
- }
- }
-
- /**
- * Build a form-encoding request body with the given form parameters.
- *
- * @param formParams Form parameters in the form of Map
- * @return RequestBody
- */
- public RequestBody buildRequestBodyFormEncoding(Map formParams) {
- okhttp3.FormBody.Builder formBuilder = new okhttp3.FormBody.Builder();
- for (Entry param : formParams.entrySet()) {
- formBuilder.add(param.getKey(), parameterToString(param.getValue()));
- }
- return formBuilder.build();
- }
-
- /**
- * Build a multipart (file uploading) request body with the given form parameters, which could
- * contain text fields and file fields.
- *
- * @param formParams Form parameters in the form of Map
- * @return RequestBody
- */
- public RequestBody buildRequestBodyMultipart(Map formParams) {
- MultipartBody.Builder mpBuilder = new MultipartBody.Builder().setType(MultipartBody.FORM);
- for (Entry param : formParams.entrySet()) {
- if (param.getValue() instanceof File) {
- File file = (File) param.getValue();
- addPartToMultiPartBuilder(mpBuilder, param.getKey(), file);
- } else if (param.getValue() instanceof List) {
- List list = (List) param.getValue();
- for (Object item : list) {
- if (item instanceof File) {
- addPartToMultiPartBuilder(mpBuilder, param.getKey(), (File) item);
- } else {
- addPartToMultiPartBuilder(mpBuilder, param.getKey(), param.getValue());
- }
- }
- } else {
- addPartToMultiPartBuilder(mpBuilder, param.getKey(), param.getValue());
- }
- }
- return mpBuilder.build();
- }
-
- /**
- * Guess Content-Type header from the given file (defaults to "application/octet-stream").
- *
- * @param file The given file
- * @return The guessed Content-Type
- */
- public String guessContentTypeFromFile(File file) {
- String contentType = URLConnection.guessContentTypeFromName(file.getName());
- if (contentType == null) {
- return "application/octet-stream";
- } else {
- return contentType;
- }
- }
-
- /**
- * Add a Content-Disposition Header for the given key and file to the MultipartBody Builder.
- *
- * @param mpBuilder MultipartBody.Builder
- * @param key The key of the Header element
- * @param file The file to add to the Header
- */
- protected void addPartToMultiPartBuilder(
- MultipartBody.Builder mpBuilder, String key, File file) {
- Headers partHeaders =
- Headers.of(
- "Content-Disposition",
- "form-data; name=\"" + key + "\"; filename=\"" + file.getName() + "\"");
- MediaType mediaType = MediaType.parse(guessContentTypeFromFile(file));
- mpBuilder.addPart(partHeaders, RequestBody.create(file, mediaType));
- }
-
- /**
- * Add a Content-Disposition Header for the given key and complex object to the MultipartBody
- * Builder.
- *
- * @param mpBuilder MultipartBody.Builder
- * @param key The key of the Header element
- * @param obj The complex object to add to the Header
- */
- protected void addPartToMultiPartBuilder(
- MultipartBody.Builder mpBuilder, String key, Object obj) {
- RequestBody requestBody;
- if (obj instanceof String) {
- requestBody = RequestBody.create((String) obj, MediaType.parse("text/plain"));
- } else {
- String content;
- if (obj != null) {
- content = JSON.serialize(obj);
- } else {
- content = null;
- }
- requestBody = RequestBody.create(content, MediaType.parse("application/json"));
- }
-
- Headers partHeaders = Headers.of("Content-Disposition", "form-data; name=\"" + key + "\"");
- mpBuilder.addPart(partHeaders, requestBody);
- }
-
- /**
- * Get network interceptor to add it to the httpClient to track download progress for async
- * requests.
- */
- protected Interceptor getProgressInterceptor() {
- return new Interceptor() {
- @Override
- public Response intercept(Interceptor.Chain chain) throws IOException {
- final Request request = chain.request();
- final Response originalResponse = chain.proceed(request);
- if (request.tag() instanceof ApiCallback) {
- final ApiCallback callback = (ApiCallback) request.tag();
- return originalResponse
- .newBuilder()
- .body(new ProgressResponseBody(originalResponse.body(), callback))
- .build();
- }
- return originalResponse;
- }
- };
- }
-
- /**
- * Apply SSL related settings to httpClient according to the current values of verifyingSsl and
- * sslCaCert.
- */
- protected void applySslSettings() {
- try {
- TrustManager[] trustManagers;
- HostnameVerifier hostnameVerifier;
- if (!verifyingSsl) {
- trustManagers =
- new TrustManager[] {
- new X509TrustManager() {
- @Override
- public void checkClientTrusted(
- java.security.cert.X509Certificate[] chain, String authType)
- throws CertificateException {}
-
- @Override
- public void checkServerTrusted(
- java.security.cert.X509Certificate[] chain, String authType)
- throws CertificateException {}
-
- @Override
- public java.security.cert.X509Certificate[] getAcceptedIssuers() {
- return new java.security.cert.X509Certificate[] {};
- }
- }
- };
- hostnameVerifier =
- new HostnameVerifier() {
- @Override
- public boolean verify(String hostname, SSLSession session) {
- return true;
- }
- };
- } else {
- TrustManagerFactory trustManagerFactory =
- TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
-
- if (sslCaCert == null) {
- trustManagerFactory.init((KeyStore) null);
- } else {
- char[] password = null; // Any password will work.
- CertificateFactory certificateFactory = CertificateFactory.getInstance("X.509");
- Collection extends Certificate> certificates =
- certificateFactory.generateCertificates(sslCaCert);
- if (certificates.isEmpty()) {
- throw new IllegalArgumentException(
- "expected non-empty set of trusted certificates");
- }
- KeyStore caKeyStore = newEmptyKeyStore(password);
- int index = 0;
- for (Certificate certificate : certificates) {
- String certificateAlias = "ca" + (index++);
- caKeyStore.setCertificateEntry(certificateAlias, certificate);
- }
- trustManagerFactory.init(caKeyStore);
- }
- trustManagers = trustManagerFactory.getTrustManagers();
- if (tlsServerName != null && !tlsServerName.isEmpty()) {
- hostnameVerifier =
- new HostnameVerifier() {
- @Override
- public boolean verify(String hostname, SSLSession session) {
- // Verify the certificate against tlsServerName instead of the
- // actual hostname
- return OkHostnameVerifier.INSTANCE.verify(
- tlsServerName, session);
- }
- };
- } else {
- hostnameVerifier = OkHostnameVerifier.INSTANCE;
- }
- }
-
- SSLContext sslContext = SSLContext.getInstance("TLS");
- sslContext.init(keyManagers, trustManagers, new SecureRandom());
- httpClient =
- httpClient
- .newBuilder()
- .sslSocketFactory(
- sslContext.getSocketFactory(),
- (X509TrustManager) trustManagers[0])
- .hostnameVerifier(hostnameVerifier)
- .build();
- } catch (GeneralSecurityException e) {
- throw new RuntimeException(e);
- }
- }
-
- protected KeyStore newEmptyKeyStore(char[] password) throws GeneralSecurityException {
- try {
- KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());
- keyStore.load(null, password);
- return keyStore;
- } catch (IOException e) {
- throw new AssertionError(e);
- }
- }
-
- /**
- * Convert the HTTP request body to a string.
- *
- * @param requestBody The HTTP request object
- * @return The string representation of the HTTP request body
- * @throws cloud.stackit.sdk.core.exception.ApiException If fail to serialize the request body
- * object into a string
- */
- protected String requestBodyToString(RequestBody requestBody) throws ApiException {
- if (requestBody != null) {
- try {
- final Buffer buffer = new Buffer();
- requestBody.writeTo(buffer);
- return buffer.readUtf8();
- } catch (final IOException e) {
- throw new ApiException(e);
- }
- }
-
- // empty http request body
- return "";
- }
-}
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/ApiResponse.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/ApiResponse.java
deleted file mode 100644
index d8c05f50..00000000
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/ApiResponse.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * STACKIT File Storage (SFS)
- * API used to create and manage NFS Shares.
- *
- * The version of the OpenAPI document: 1beta.0.0
- *
- *
- * 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.sfs.v1betaapi;
-
-import java.util.List;
-import java.util.Map;
-
-/** API response returned by API call. */
-public class ApiResponse {
- private final int statusCode;
- private final Map> headers;
- private final T data;
-
- /**
- * Constructor for ApiResponse.
- *
- * @param statusCode The status code of HTTP response
- * @param headers The headers of HTTP response
- */
- public ApiResponse(int statusCode, Map> headers) {
- this(statusCode, headers, null);
- }
-
- /**
- * Constructor for ApiResponse.
- *
- * @param statusCode The status code of HTTP response
- * @param headers The headers of HTTP response
- * @param data The object deserialized from response bod
- */
- public ApiResponse(int statusCode, Map> headers, T data) {
- this.statusCode = statusCode;
- this.headers = headers;
- this.data = data;
- }
-
- /**
- * Get the status code.
- *
- * @return the status code
- */
- public int getStatusCode() {
- return statusCode;
- }
-
- /**
- * Get the headers.
- *
- * @return a {@link java.util.Map} of headers
- */
- public Map> getHeaders() {
- return headers;
- }
-
- /**
- * Get the data.
- *
- * @return the data
- */
- public T getData() {
- return data;
- }
-}
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/GzipRequestInterceptor.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/GzipRequestInterceptor.java
deleted file mode 100644
index fa90f519..00000000
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/GzipRequestInterceptor.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * STACKIT File Storage (SFS)
- * API used to create and manage NFS Shares.
- *
- * The version of the OpenAPI document: 1beta.0.0
- *
- *
- * 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.sfs.v1betaapi;
-
-import java.io.IOException;
-import okhttp3.*;
-import okio.Buffer;
-import okio.BufferedSink;
-import okio.GzipSink;
-import okio.Okio;
-
-/**
- * Encodes request bodies using gzip.
- *
- *
Taken from https://github.com/square/okhttp/issues/350
- */
-class GzipRequestInterceptor implements Interceptor {
- @Override
- public Response intercept(Chain chain) throws IOException {
- Request originalRequest = chain.request();
- if (originalRequest.body() == null || originalRequest.header("Content-Encoding") != null) {
- return chain.proceed(originalRequest);
- }
-
- Request compressedRequest =
- originalRequest
- .newBuilder()
- .header("Content-Encoding", "gzip")
- .method(
- originalRequest.method(),
- forceContentLength(gzip(originalRequest.body())))
- .build();
- return chain.proceed(compressedRequest);
- }
-
- private RequestBody forceContentLength(final RequestBody requestBody) throws IOException {
- final Buffer buffer = new Buffer();
- requestBody.writeTo(buffer);
- return new RequestBody() {
- @Override
- public MediaType contentType() {
- return requestBody.contentType();
- }
-
- @Override
- public long contentLength() {
- return buffer.size();
- }
-
- @Override
- public void writeTo(BufferedSink sink) throws IOException {
- sink.write(buffer.snapshot());
- }
- };
- }
-
- private RequestBody gzip(final RequestBody body) {
- return new RequestBody() {
- @Override
- public MediaType contentType() {
- return body.contentType();
- }
-
- @Override
- public long contentLength() {
- return -1; // We don't know the compressed length in advance!
- }
-
- @Override
- public void writeTo(BufferedSink sink) throws IOException {
- BufferedSink gzipSink = Okio.buffer(new GzipSink(sink));
- body.writeTo(gzipSink);
- gzipSink.close();
- }
- };
- }
-}
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/JSON.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/JSON.java
deleted file mode 100644
index edeb21da..00000000
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/JSON.java
+++ /dev/null
@@ -1,537 +0,0 @@
-/*
- * STACKIT File Storage (SFS)
- * API used to create and manage NFS Shares.
- *
- * The version of the OpenAPI document: 1beta.0.0
- *
- *
- * 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.sfs.v1betaapi;
-
-import com.google.gson.Gson;
-import com.google.gson.GsonBuilder;
-import com.google.gson.JsonElement;
-import com.google.gson.JsonParseException;
-import com.google.gson.TypeAdapter;
-import com.google.gson.internal.bind.util.ISO8601Utils;
-import com.google.gson.stream.JsonReader;
-import com.google.gson.stream.JsonWriter;
-import io.gsonfire.GsonFireBuilder;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.StringReader;
-import java.lang.reflect.Type;
-import java.nio.charset.StandardCharsets;
-import java.text.DateFormat;
-import java.text.ParseException;
-import java.text.ParsePosition;
-import java.time.LocalDate;
-import java.time.OffsetDateTime;
-import java.time.format.DateTimeFormatter;
-import java.util.Date;
-import java.util.Map;
-import okio.ByteString;
-
-/*
- * A JSON utility class
- *
- * NOTE: in the future, this class may be converted to static, which may break
- * backward-compatibility
- */
-public class JSON {
- private static Gson gson;
- private static boolean isLenientOnJson = false;
- private static DateTypeAdapter dateTypeAdapter = new DateTypeAdapter();
- private static SqlDateTypeAdapter sqlDateTypeAdapter = new SqlDateTypeAdapter();
- private static OffsetDateTimeTypeAdapter offsetDateTimeTypeAdapter =
- new OffsetDateTimeTypeAdapter();
- private static LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter();
- private static ByteArrayAdapter byteArrayAdapter = new ByteArrayAdapter();
-
- @SuppressWarnings("unchecked")
- public static GsonBuilder createGson() {
- GsonFireBuilder fireBuilder = new GsonFireBuilder();
- GsonBuilder builder = fireBuilder.createGsonBuilder();
- return builder;
- }
-
- private static String getDiscriminatorValue(
- JsonElement readElement, String discriminatorField) {
- JsonElement element = readElement.getAsJsonObject().get(discriminatorField);
- if (null == element) {
- throw new IllegalArgumentException(
- "missing discriminator field: <" + discriminatorField + ">");
- }
- return element.getAsString();
- }
-
- /**
- * Returns the Java class that implements the OpenAPI schema for the specified discriminator
- * value.
- *
- * @param classByDiscriminatorValue The map of discriminator values to Java classes.
- * @param discriminatorValue The value of the OpenAPI discriminator in the input data.
- * @return The Java class that implements the OpenAPI schema
- */
- private static Class getClassByDiscriminator(
- Map classByDiscriminatorValue, String discriminatorValue) {
- Class clazz = (Class) classByDiscriminatorValue.get(discriminatorValue);
- if (null == clazz) {
- throw new IllegalArgumentException(
- "cannot determine model class of name: <" + discriminatorValue + ">");
- }
- return clazz;
- }
-
- static {
- GsonBuilder gsonBuilder = createGson();
- gsonBuilder.registerTypeAdapter(Date.class, dateTypeAdapter);
- gsonBuilder.registerTypeAdapter(java.sql.Date.class, sqlDateTypeAdapter);
- gsonBuilder.registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter);
- gsonBuilder.registerTypeAdapter(LocalDate.class, localDateTypeAdapter);
- gsonBuilder.registerTypeAdapter(byte[].class, byteArrayAdapter);
- gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1betaapi.model.CreateResourcePoolPayload
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1betaapi.model.CreateResourcePoolResponse
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1betaapi.model.CreateResourcePoolSnapshotPayload
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1betaapi.model.CreateResourcePoolSnapshotResponse
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1betaapi.model.CreateShareExportPolicyPayload
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1betaapi.model.CreateShareExportPolicyRequestRule
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1betaapi.model.CreateShareExportPolicyResponse
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1betaapi.model.CreateSharePayload
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1betaapi.model.CreateShareResponse
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1betaapi.model.Error.CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1betaapi.model.GetResourcePoolResponse
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1betaapi.model.GetResourcePoolSnapshotResponse
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1betaapi.model.GetShareExportPolicyResponse
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1betaapi.model.GetShareResponse
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1betaapi.model.GoogleProtobufAny
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1betaapi.model.ListPerformanceClassesResponse
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1betaapi.model.ListResourcePoolSnapshotsResponse
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1betaapi.model.ListResourcePoolsResponse
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1betaapi.model.ListShareExportPoliciesResponse
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1betaapi.model.ListSharesResponse
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1betaapi.model.ListSnapshotSchedulesResponse
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1betaapi.model.PerformanceClass
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1betaapi.model.ResourcePool.CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1betaapi.model.ResourcePoolPerformanceClass
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1betaapi.model.ResourcePoolSnapshot
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1betaapi.model.ResourcePoolSpace
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1betaapi.model.Share.CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1betaapi.model.ShareExportPolicy
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1betaapi.model.ShareExportPolicyRule
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1betaapi.model.SnapshotSchedule
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1betaapi.model.Status.CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1betaapi.model.UpdateResourcePoolPayload
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1betaapi.model.UpdateResourcePoolResponse
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1betaapi.model.UpdateShareExportPolicyBodyRule
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1betaapi.model.UpdateShareExportPolicyPayload
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1betaapi.model.UpdateShareExportPolicyResponse
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1betaapi.model.UpdateSharePayload
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1betaapi.model.UpdateShareResponse
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1betaapi.model.ValidationError
- .CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(
- new cloud.stackit.sdk.sfs.v1betaapi.model.ValidationErrorField
- .CustomTypeAdapterFactory());
- gson = gsonBuilder.create();
- }
-
- /**
- * Get Gson.
- *
- * @return Gson
- */
- public static Gson getGson() {
- return gson;
- }
-
- /**
- * Set Gson.
- *
- * @param gson Gson
- */
- public static void setGson(Gson gson) {
- JSON.gson = gson;
- }
-
- public static void setLenientOnJson(boolean lenientOnJson) {
- isLenientOnJson = lenientOnJson;
- }
-
- /**
- * Serialize the given Java object into JSON string.
- *
- * @param obj Object
- * @return String representation of the JSON
- */
- public static String serialize(Object obj) {
- return gson.toJson(obj);
- }
-
- /**
- * Deserialize the given JSON string to Java object.
- *
- * @param Type
- * @param body The JSON string
- * @param returnType The type to deserialize into
- * @return The deserialized Java object
- */
- @SuppressWarnings("unchecked")
- public static T deserialize(String body, Type returnType) {
- try {
- if (isLenientOnJson) {
- JsonReader jsonReader = new JsonReader(new StringReader(body));
- // see
- // https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/JsonReader.html#setLenient(boolean)
- jsonReader.setLenient(true);
- return gson.fromJson(jsonReader, returnType);
- } else {
- return gson.fromJson(body, returnType);
- }
- } catch (JsonParseException e) {
- // Fallback processing when failed to parse JSON form response body:
- // return the response body string directly for the String return type;
- if (returnType.equals(String.class)) {
- return (T) body;
- } else {
- throw (e);
- }
- }
- }
-
- /**
- * Deserialize the given JSON InputStream to a Java object.
- *
- * @param Type
- * @param inputStream The JSON InputStream
- * @param returnType The type to deserialize into
- * @return The deserialized Java object
- */
- @SuppressWarnings("unchecked")
- public static T deserialize(InputStream inputStream, Type returnType) throws IOException {
- try (InputStreamReader reader =
- new InputStreamReader(inputStream, StandardCharsets.UTF_8)) {
- if (isLenientOnJson) {
- // see
- // https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/JsonReader.html#setLenient(boolean)
- JsonReader jsonReader = new JsonReader(reader);
- jsonReader.setLenient(true);
- return gson.fromJson(jsonReader, returnType);
- } else {
- return gson.fromJson(reader, returnType);
- }
- }
- }
-
- /** Gson TypeAdapter for Byte Array type */
- public static class ByteArrayAdapter extends TypeAdapter {
-
- @Override
- public void write(JsonWriter out, byte[] value) throws IOException {
- if (value == null) {
- out.nullValue();
- } else {
- out.value(ByteString.of(value).base64());
- }
- }
-
- @Override
- public byte[] read(JsonReader in) throws IOException {
- switch (in.peek()) {
- case NULL:
- in.nextNull();
- return null;
- default:
- String bytesAsBase64 = in.nextString();
- ByteString byteString = ByteString.decodeBase64(bytesAsBase64);
- return byteString.toByteArray();
- }
- }
- }
-
- /** Gson TypeAdapter for JSR310 OffsetDateTime type */
- public static class OffsetDateTimeTypeAdapter extends TypeAdapter {
-
- private DateTimeFormatter formatter;
-
- public OffsetDateTimeTypeAdapter() {
- this(DateTimeFormatter.ISO_OFFSET_DATE_TIME);
- }
-
- public OffsetDateTimeTypeAdapter(DateTimeFormatter formatter) {
- this.formatter = formatter;
- }
-
- public void setFormat(DateTimeFormatter dateFormat) {
- this.formatter = dateFormat;
- }
-
- @Override
- public void write(JsonWriter out, OffsetDateTime date) throws IOException {
- if (date == null) {
- out.nullValue();
- } else {
- out.value(formatter.format(date));
- }
- }
-
- @Override
- public OffsetDateTime read(JsonReader in) throws IOException {
- switch (in.peek()) {
- case NULL:
- in.nextNull();
- return null;
- default:
- String date = in.nextString();
- if (date.endsWith("+0000")) {
- date = date.substring(0, date.length() - 5) + "Z";
- }
- return OffsetDateTime.parse(date, formatter);
- }
- }
- }
-
- /** Gson TypeAdapter for JSR310 LocalDate type */
- public static class LocalDateTypeAdapter extends TypeAdapter {
-
- private DateTimeFormatter formatter;
-
- public LocalDateTypeAdapter() {
- this(DateTimeFormatter.ISO_LOCAL_DATE);
- }
-
- public LocalDateTypeAdapter(DateTimeFormatter formatter) {
- this.formatter = formatter;
- }
-
- public void setFormat(DateTimeFormatter dateFormat) {
- this.formatter = dateFormat;
- }
-
- @Override
- public void write(JsonWriter out, LocalDate date) throws IOException {
- if (date == null) {
- out.nullValue();
- } else {
- out.value(formatter.format(date));
- }
- }
-
- @Override
- public LocalDate read(JsonReader in) throws IOException {
- switch (in.peek()) {
- case NULL:
- in.nextNull();
- return null;
- default:
- String date = in.nextString();
- return LocalDate.parse(date, formatter);
- }
- }
- }
-
- public static void setOffsetDateTimeFormat(DateTimeFormatter dateFormat) {
- offsetDateTimeTypeAdapter.setFormat(dateFormat);
- }
-
- public static void setLocalDateFormat(DateTimeFormatter dateFormat) {
- localDateTypeAdapter.setFormat(dateFormat);
- }
-
- /**
- * Gson TypeAdapter for java.sql.Date type If the dateFormat is null, a simple "yyyy-MM-dd"
- * format will be used (more efficient than SimpleDateFormat).
- */
- public static class SqlDateTypeAdapter extends TypeAdapter {
-
- private DateFormat dateFormat;
-
- public SqlDateTypeAdapter() {}
-
- public SqlDateTypeAdapter(DateFormat dateFormat) {
- this.dateFormat = dateFormat;
- }
-
- public void setFormat(DateFormat dateFormat) {
- this.dateFormat = dateFormat;
- }
-
- @Override
- public void write(JsonWriter out, java.sql.Date date) throws IOException {
- if (date == null) {
- out.nullValue();
- } else {
- String value;
- if (dateFormat != null) {
- value = dateFormat.format(date);
- } else {
- value = date.toString();
- }
- out.value(value);
- }
- }
-
- @Override
- public java.sql.Date read(JsonReader in) throws IOException {
- switch (in.peek()) {
- case NULL:
- in.nextNull();
- return null;
- default:
- String date = in.nextString();
- try {
- if (dateFormat != null) {
- return new java.sql.Date(dateFormat.parse(date).getTime());
- }
- return new java.sql.Date(
- ISO8601Utils.parse(date, new ParsePosition(0)).getTime());
- } catch (ParseException e) {
- throw new JsonParseException(e);
- }
- }
- }
- }
-
- /**
- * Gson TypeAdapter for java.util.Date type If the dateFormat is null, ISO8601Utils will be
- * used.
- */
- public static class DateTypeAdapter extends TypeAdapter {
-
- private DateFormat dateFormat;
-
- public DateTypeAdapter() {}
-
- public DateTypeAdapter(DateFormat dateFormat) {
- this.dateFormat = dateFormat;
- }
-
- public void setFormat(DateFormat dateFormat) {
- this.dateFormat = dateFormat;
- }
-
- @Override
- public void write(JsonWriter out, Date date) throws IOException {
- if (date == null) {
- out.nullValue();
- } else {
- String value;
- if (dateFormat != null) {
- value = dateFormat.format(date);
- } else {
- value = ISO8601Utils.format(date, true);
- }
- out.value(value);
- }
- }
-
- @Override
- public Date read(JsonReader in) throws IOException {
- try {
- switch (in.peek()) {
- case NULL:
- in.nextNull();
- return null;
- default:
- String date = in.nextString();
- try {
- if (dateFormat != null) {
- return dateFormat.parse(date);
- }
- return ISO8601Utils.parse(date, new ParsePosition(0));
- } catch (ParseException e) {
- throw new JsonParseException(e);
- }
- }
- } catch (IllegalArgumentException e) {
- throw new JsonParseException(e);
- }
- }
- }
-
- public static void setDateFormat(DateFormat dateFormat) {
- dateTypeAdapter.setFormat(dateFormat);
- }
-
- public static void setSqlDateFormat(DateFormat dateFormat) {
- sqlDateTypeAdapter.setFormat(dateFormat);
- }
-}
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/Pair.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/Pair.java
deleted file mode 100644
index bb7fed96..00000000
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/Pair.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * STACKIT File Storage (SFS)
- * API used to create and manage NFS Shares.
- *
- * The version of the OpenAPI document: 1beta.0.0
- *
- *
- * 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.sfs.v1betaapi;
-
-@javax.annotation.Generated(
- value = "org.openapitools.codegen.languages.JavaClientCodegen",
- comments = "Generator version: 7.19.0")
-public class Pair {
- private final String name;
- private final String value;
-
- public Pair(String name, String value) {
- this.name = isValidString(name) ? name : "";
- this.value = isValidString(value) ? value : "";
- }
-
- public String getName() {
- return this.name;
- }
-
- public String getValue() {
- return this.value;
- }
-
- private static boolean isValidString(String arg) {
- return arg != null;
- }
-}
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/ProgressRequestBody.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/ProgressRequestBody.java
deleted file mode 100644
index c59f5b56..00000000
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/ProgressRequestBody.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * STACKIT File Storage (SFS)
- * API used to create and manage NFS Shares.
- *
- * The version of the OpenAPI document: 1beta.0.0
- *
- *
- * 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.sfs.v1betaapi;
-
-import java.io.IOException;
-import okhttp3.MediaType;
-import okhttp3.RequestBody;
-import okio.Buffer;
-import okio.BufferedSink;
-import okio.ForwardingSink;
-import okio.Okio;
-import okio.Sink;
-
-public class ProgressRequestBody extends RequestBody {
-
- private final RequestBody requestBody;
-
- private final ApiCallback callback;
-
- public ProgressRequestBody(RequestBody requestBody, ApiCallback callback) {
- this.requestBody = requestBody;
- this.callback = callback;
- }
-
- @Override
- public MediaType contentType() {
- return requestBody.contentType();
- }
-
- @Override
- public long contentLength() throws IOException {
- return requestBody.contentLength();
- }
-
- @Override
- public void writeTo(BufferedSink sink) throws IOException {
- BufferedSink bufferedSink = Okio.buffer(sink(sink));
- requestBody.writeTo(bufferedSink);
- bufferedSink.flush();
- }
-
- private Sink sink(Sink sink) {
- return new ForwardingSink(sink) {
-
- long bytesWritten = 0L;
- long contentLength = 0L;
-
- @Override
- public void write(Buffer source, long byteCount) throws IOException {
- super.write(source, byteCount);
- if (contentLength == 0) {
- contentLength = contentLength();
- }
-
- bytesWritten += byteCount;
- callback.onUploadProgress(
- bytesWritten, contentLength, bytesWritten == contentLength);
- }
- };
- }
-}
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/ProgressResponseBody.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/ProgressResponseBody.java
deleted file mode 100644
index d3918c07..00000000
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/ProgressResponseBody.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * STACKIT File Storage (SFS)
- * API used to create and manage NFS Shares.
- *
- * The version of the OpenAPI document: 1beta.0.0
- *
- *
- * 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.sfs.v1betaapi;
-
-import java.io.IOException;
-import okhttp3.MediaType;
-import okhttp3.ResponseBody;
-import okio.Buffer;
-import okio.BufferedSource;
-import okio.ForwardingSource;
-import okio.Okio;
-import okio.Source;
-
-public class ProgressResponseBody extends ResponseBody {
-
- private final ResponseBody responseBody;
- private final ApiCallback callback;
- private BufferedSource bufferedSource;
-
- public ProgressResponseBody(ResponseBody responseBody, ApiCallback callback) {
- this.responseBody = responseBody;
- this.callback = callback;
- }
-
- @Override
- public MediaType contentType() {
- return responseBody.contentType();
- }
-
- @Override
- public long contentLength() {
- return responseBody.contentLength();
- }
-
- @Override
- public BufferedSource source() {
- if (bufferedSource == null) {
- bufferedSource = Okio.buffer(source(responseBody.source()));
- }
- return bufferedSource;
- }
-
- private Source source(Source source) {
- return new ForwardingSource(source) {
- long totalBytesRead = 0L;
-
- @Override
- public long read(Buffer sink, long byteCount) throws IOException {
- long bytesRead = super.read(sink, byteCount);
- // read() returns the number of bytes read, or -1 if this source is exhausted.
- totalBytesRead += bytesRead != -1 ? bytesRead : 0;
- callback.onDownloadProgress(
- totalBytesRead, responseBody.contentLength(), bytesRead == -1);
- return bytesRead;
- }
- };
- }
-}
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/ServerConfiguration.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/ServerConfiguration.java
deleted file mode 100644
index c228f05b..00000000
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/ServerConfiguration.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * STACKIT File Storage (SFS)
- * API used to create and manage NFS Shares.
- *
- * The version of the OpenAPI document: 1beta.0.0
- *
- *
- * 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.sfs.v1betaapi;
-
-import java.util.Map;
-
-/** Representing a Server configuration. */
-@javax.annotation.Generated(
- value = "org.openapitools.codegen.languages.JavaClientCodegen",
- comments = "Generator version: 7.19.0")
-public class ServerConfiguration {
- public String URL;
- public String description;
- public Map variables;
-
- /**
- * @param URL A URL to the target host.
- * @param description A description of the host designated by the URL.
- * @param variables A map between a variable name and its value. The value is used for
- * substitution in the server's URL template.
- */
- public ServerConfiguration(
- String URL, String description, Map variables) {
- this.URL = URL;
- this.description = description;
- this.variables = variables;
- }
-
- /**
- * Format URL template using given variables.
- *
- * @param variables A map between a variable name and its value.
- * @return Formatted URL.
- */
- public String URL(Map variables) {
- String url = this.URL;
-
- // go through variables and replace placeholders
- for (Map.Entry variable : this.variables.entrySet()) {
- String name = variable.getKey();
- ServerVariable serverVariable = variable.getValue();
- String value = serverVariable.defaultValue;
-
- if (variables != null && variables.containsKey(name)) {
- value = variables.get(name);
- if (serverVariable.enumValues.size() > 0
- && !serverVariable.enumValues.contains(value)) {
- throw new IllegalArgumentException(
- "The variable "
- + name
- + " in the server URL has invalid value "
- + value
- + ".");
- }
- }
- url = url.replace("{" + name + "}", value);
- }
- return url;
- }
-
- /**
- * Format URL template using default server variables.
- *
- * @return Formatted URL.
- */
- public String URL() {
- return URL(null);
- }
-}
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/ServerVariable.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/ServerVariable.java
deleted file mode 100644
index 5a999f34..00000000
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/ServerVariable.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * STACKIT File Storage (SFS)
- * API used to create and manage NFS Shares.
- *
- * The version of the OpenAPI document: 1beta.0.0
- *
- *
- * 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.sfs.v1betaapi;
-
-import java.util.HashSet;
-
-/** Representing a Server Variable for server URL template substitution. */
-@javax.annotation.Generated(
- value = "org.openapitools.codegen.languages.JavaClientCodegen",
- comments = "Generator version: 7.19.0")
-public class ServerVariable {
- public String description;
- public String defaultValue;
- public HashSet enumValues = null;
-
- /**
- * @param description A description for the server variable.
- * @param defaultValue The default value to use for substitution.
- * @param enumValues An enumeration of string values to be used if the substitution options are
- * from a limited set.
- */
- public ServerVariable(String description, String defaultValue, HashSet enumValues) {
- this.description = description;
- this.defaultValue = defaultValue;
- this.enumValues = enumValues;
- }
-}
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/StringUtil.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/StringUtil.java
deleted file mode 100644
index 168881b9..00000000
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/StringUtil.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * STACKIT File Storage (SFS)
- * API used to create and manage NFS Shares.
- *
- * The version of the OpenAPI document: 1beta.0.0
- *
- *
- * 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.sfs.v1betaapi;
-
-import java.util.Collection;
-import java.util.Iterator;
-
-@javax.annotation.Generated(
- value = "org.openapitools.codegen.languages.JavaClientCodegen",
- comments = "Generator version: 7.19.0")
-public class StringUtil {
- /**
- * Check if the given array contains the given value (with case-insensitive comparison).
- *
- * @param array The array
- * @param value The value to search
- * @return true if the array contains the value
- */
- public static boolean containsIgnoreCase(String[] array, String value) {
- for (String str : array) {
- if (value == null && str == null) {
- return true;
- }
- if (value != null && value.equalsIgnoreCase(str)) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * Join an array of strings with the given separator.
- *
- *
Note: This might be replaced by utility method from commons-lang or guava someday if one
- * of those libraries is added as dependency.
- *
- * @param array The array of strings
- * @param separator The separator
- * @return the resulting string
- */
- public static String join(String[] array, String separator) {
- int len = array.length;
- if (len == 0) {
- return "";
- }
-
- StringBuilder out = new StringBuilder();
- out.append(array[0]);
- for (int i = 1; i < len; i++) {
- out.append(separator).append(array[i]);
- }
- return out.toString();
- }
-
- /**
- * Join a list of strings with the given separator.
- *
- * @param list The list of strings
- * @param separator The separator
- * @return the resulting string
- */
- public static String join(Collection list, String separator) {
- Iterator iterator = list.iterator();
- StringBuilder out = new StringBuilder();
- if (iterator.hasNext()) {
- out.append(iterator.next());
- }
- while (iterator.hasNext()) {
- out.append(separator).append(iterator.next());
- }
- return out.toString();
- }
-}
diff --git a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/api/DefaultApi.java b/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/api/DefaultApi.java
deleted file mode 100644
index 35449a30..00000000
--- a/services/sfs/src/main/java/cloud/stackit/sdk/sfs/v1betaapi/api/DefaultApi.java
+++ /dev/null
@@ -1,4608 +0,0 @@
-/*
- * STACKIT File Storage (SFS)
- * API used to create and manage NFS Shares.
- *
- * The version of the OpenAPI document: 1beta.0.0
- *
- *
- * 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.sfs.v1betaapi.api;
-
-import cloud.stackit.sdk.core.config.CoreConfiguration;
-import cloud.stackit.sdk.core.exception.ApiException;
-import cloud.stackit.sdk.sfs.v1betaapi.ApiCallback;
-import cloud.stackit.sdk.sfs.v1betaapi.ApiClient;
-import cloud.stackit.sdk.sfs.v1betaapi.ApiResponse;
-import cloud.stackit.sdk.sfs.v1betaapi.Pair;
-import cloud.stackit.sdk.sfs.v1betaapi.model.CreateResourcePoolPayload;
-import cloud.stackit.sdk.sfs.v1betaapi.model.CreateResourcePoolResponse;
-import cloud.stackit.sdk.sfs.v1betaapi.model.CreateResourcePoolSnapshotPayload;
-import cloud.stackit.sdk.sfs.v1betaapi.model.CreateResourcePoolSnapshotResponse;
-import cloud.stackit.sdk.sfs.v1betaapi.model.CreateShareExportPolicyPayload;
-import cloud.stackit.sdk.sfs.v1betaapi.model.CreateShareExportPolicyResponse;
-import cloud.stackit.sdk.sfs.v1betaapi.model.CreateSharePayload;
-import cloud.stackit.sdk.sfs.v1betaapi.model.CreateShareResponse;
-import cloud.stackit.sdk.sfs.v1betaapi.model.GetResourcePoolResponse;
-import cloud.stackit.sdk.sfs.v1betaapi.model.GetResourcePoolSnapshotResponse;
-import cloud.stackit.sdk.sfs.v1betaapi.model.GetShareExportPolicyResponse;
-import cloud.stackit.sdk.sfs.v1betaapi.model.GetShareResponse;
-import cloud.stackit.sdk.sfs.v1betaapi.model.ListPerformanceClassesResponse;
-import cloud.stackit.sdk.sfs.v1betaapi.model.ListResourcePoolSnapshotsResponse;
-import cloud.stackit.sdk.sfs.v1betaapi.model.ListResourcePoolsResponse;
-import cloud.stackit.sdk.sfs.v1betaapi.model.ListShareExportPoliciesResponse;
-import cloud.stackit.sdk.sfs.v1betaapi.model.ListSharesResponse;
-import cloud.stackit.sdk.sfs.v1betaapi.model.ListSnapshotSchedulesResponse;
-import cloud.stackit.sdk.sfs.v1betaapi.model.UpdateResourcePoolPayload;
-import cloud.stackit.sdk.sfs.v1betaapi.model.UpdateResourcePoolResponse;
-import cloud.stackit.sdk.sfs.v1betaapi.model.UpdateShareExportPolicyPayload;
-import cloud.stackit.sdk.sfs.v1betaapi.model.UpdateShareExportPolicyResponse;
-import cloud.stackit.sdk.sfs.v1betaapi.model.UpdateSharePayload;
-import cloud.stackit.sdk.sfs.v1betaapi.model.UpdateShareResponse;
-import com.google.gson.reflect.TypeToken;
-import java.io.IOException;
-import java.lang.reflect.Type;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import okhttp3.OkHttpClient;
-
-// Package-private access to enforce service-specific API usage (DefaultApi => Api)
-class DefaultApi {
- private ApiClient localVarApiClient;
- private int localHostIndex;
- private String localCustomBaseUrl;
-
- /**
- * Basic constructor for DefaultApi
- *
- *
For production use consider using the constructor with the OkHttpClient parameter.
- *
- * @throws IOException
- */
- public DefaultApi() throws IOException {
- this(null, new CoreConfiguration());
- }
-
- /**
- * Basic Constructor for DefaultApi
- *
- *
For production use consider using the constructor with the OkHttpClient parameter.
- *
- * @param config your STACKIT SDK CoreConfiguration
- * @throws IOException
- */
- public DefaultApi(CoreConfiguration config) throws IOException {
- this(null, config);
- }
-
- /**
- * Constructor for DefaultApi
- *
- * @param httpClient OkHttpClient object
- * @throws IOException
- */
- public DefaultApi(OkHttpClient httpClient) throws IOException {
- this(httpClient, new CoreConfiguration());
- }
-
- /**
- * Constructor for DefaultApi
- *
- * @param httpClient OkHttpClient object
- * @param config your STACKIT SDK CoreConfiguration
- * @throws IOException
- */
- public DefaultApi(OkHttpClient httpClient, CoreConfiguration config) throws IOException {
- if (config.getCustomEndpoint() != null && !config.getCustomEndpoint().trim().isEmpty()) {
- localCustomBaseUrl = config.getCustomEndpoint();
- }
- this.localVarApiClient = new ApiClient(httpClient, config);
- }
-
- public ApiClient getApiClient() {
- return localVarApiClient;
- }
-
- public void setApiClient(ApiClient apiClient) {
- this.localVarApiClient = apiClient;
- }
-
- public int getHostIndex() {
- return localHostIndex;
- }
-
- public void setHostIndex(int hostIndex) {
- this.localHostIndex = hostIndex;
- }
-
- public String getCustomBaseUrl() {
- return localCustomBaseUrl;
- }
-
- public void setCustomBaseUrl(String customBaseUrl) {
- this.localCustomBaseUrl = customBaseUrl;
- }
-
- /**
- * Build call for createResourcePool
- *
- * @param projectId (required)
- * @param region (required)
- * @param createResourcePoolPayload (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
OK
-
- *
400
Some fields of the request have failed the validation procedure.
-
- *
401
Please make sure the Authorization Header is set and uses correct credentials
-
- *
500
Please retry again later or contact support if the issue persists
-
- *
- */
- public okhttp3.Call createResourcePoolCall(
- @javax.annotation.Nonnull String projectId,
- @javax.annotation.Nonnull String region,
- @javax.annotation.Nonnull CreateResourcePoolPayload createResourcePoolPayload,
- 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 = createResourcePoolPayload;
-
- // create path and map variables
- String localVarPath =
- "/v1beta/projects/{projectId}/regions/{region}/resourcePools"
- .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();
-
- final String[] localVarAccepts = {
- "application/json", "application/problem+json", "text/plain"
- };
- 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,
- "POST",
- localVarQueryParams,
- localVarCollectionQueryParams,
- localVarPostBody,
- localVarHeaderParams,
- localVarCookieParams,
- localVarFormParams,
- localVarAuthNames,
- _callback);
- }
-
- @SuppressWarnings("rawtypes")
- private okhttp3.Call createResourcePoolValidateBeforeCall(
- @javax.annotation.Nonnull String projectId,
- @javax.annotation.Nonnull String region,
- @javax.annotation.Nonnull CreateResourcePoolPayload createResourcePoolPayload,
- 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 createResourcePool(Async)");
- }
-
- // verify the required parameter 'region' is set
- if (region == null) {
- throw new ApiException(
- "Missing the required parameter 'region' when calling createResourcePool(Async)");
- }
-
- // verify the required parameter 'createResourcePoolPayload' is set
- if (createResourcePoolPayload == null) {
- throw new ApiException(
- "Missing the required parameter 'createResourcePoolPayload' when calling createResourcePool(Async)");
- }
-
- return createResourcePoolCall(projectId, region, createResourcePoolPayload, _callback);
- }
-
- /**
- * Create Resource Pool Create a Resource Pool in a project.
- *
- * @param projectId (required)
- * @param region (required)
- * @param createResourcePoolPayload (required)
- * @return CreateResourcePoolResponse
- * @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
OK
-
- *
400
Some fields of the request have failed the validation procedure.
-
- *
401
Please make sure the Authorization Header is set and uses correct credentials
-
- *
500
Please retry again later or contact support if the issue persists
-
- *
- */
- public CreateResourcePoolResponse createResourcePool(
- @javax.annotation.Nonnull String projectId,
- @javax.annotation.Nonnull String region,
- @javax.annotation.Nonnull CreateResourcePoolPayload createResourcePoolPayload)
- throws ApiException {
- ApiResponse localVarResp =
- createResourcePoolWithHttpInfo(projectId, region, createResourcePoolPayload);
- return localVarResp.getData();
- }
-
- /**
- * Create Resource Pool Create a Resource Pool in a project.
- *
- * @param projectId (required)
- * @param region (required)
- * @param createResourcePoolPayload (required)
- * @return ApiResponse<CreateResourcePoolResponse>
- * @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
OK
-
- *
400
Some fields of the request have failed the validation procedure.
-
- *
401
Please make sure the Authorization Header is set and uses correct credentials
-
- *
500
Please retry again later or contact support if the issue persists
-
- *
- */
- public ApiResponse createResourcePoolWithHttpInfo(
- @javax.annotation.Nonnull String projectId,
- @javax.annotation.Nonnull String region,
- @javax.annotation.Nonnull CreateResourcePoolPayload createResourcePoolPayload)
- throws ApiException {
- okhttp3.Call localVarCall =
- createResourcePoolValidateBeforeCall(
- projectId, region, createResourcePoolPayload, null);
- Type localVarReturnType = new TypeToken() {}.getType();
- return localVarApiClient.execute(localVarCall, localVarReturnType);
- }
-
- /**
- * Create Resource Pool (asynchronously) Create a Resource Pool in a project.
- *
- * @param projectId (required)
- * @param region (required)
- * @param createResourcePoolPayload (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
OK
-
- *
400
Some fields of the request have failed the validation procedure.
-
- *
401
Please make sure the Authorization Header is set and uses correct credentials
-
- *
500
Please retry again later or contact support if the issue persists
-
- *
- */
- public okhttp3.Call createResourcePoolAsync(
- @javax.annotation.Nonnull String projectId,
- @javax.annotation.Nonnull String region,
- @javax.annotation.Nonnull CreateResourcePoolPayload createResourcePoolPayload,
- final ApiCallback _callback)
- throws ApiException {
-
- okhttp3.Call localVarCall =
- createResourcePoolValidateBeforeCall(
- projectId, region, createResourcePoolPayload, _callback);
- Type localVarReturnType = new TypeToken() {}.getType();
- localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
- return localVarCall;
- }
-
- /**
- * Build call for createResourcePoolSnapshot
- *
- * @param projectId (required)
- * @param region (required)
- * @param resourcePoolId (required)
- * @param createResourcePoolSnapshotPayload (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
OK
-
- *
400
Some fields of the request have failed the validation procedure.
-
- *
401
Please make sure the Authorization Header is set and uses correct credentials
-
- *
500
Please retry again later or contact support if the issue persists
-
- *
- */
- public okhttp3.Call createResourcePoolSnapshotCall(
- @javax.annotation.Nonnull String projectId,
- @javax.annotation.Nonnull String region,
- @javax.annotation.Nonnull String resourcePoolId,
- @javax.annotation.Nonnull
- CreateResourcePoolSnapshotPayload createResourcePoolSnapshotPayload,
- 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 = createResourcePoolSnapshotPayload;
-
- // create path and map variables
- String localVarPath =
- "/v1beta/projects/{projectId}/regions/{region}/resourcePools/{resourcePoolId}/snapshots"
- .replace(
- "{" + "projectId" + "}",
- localVarApiClient.escapeString(projectId.toString()))
- .replace(
- "{" + "region" + "}",
- localVarApiClient.escapeString(region.toString()))
- .replace(
- "{" + "resourcePoolId" + "}",
- localVarApiClient.escapeString(resourcePoolId.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", "application/problem+json", "text/plain"
- };
- 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,
- "POST",
- localVarQueryParams,
- localVarCollectionQueryParams,
- localVarPostBody,
- localVarHeaderParams,
- localVarCookieParams,
- localVarFormParams,
- localVarAuthNames,
- _callback);
- }
-
- @SuppressWarnings("rawtypes")
- private okhttp3.Call createResourcePoolSnapshotValidateBeforeCall(
- @javax.annotation.Nonnull String projectId,
- @javax.annotation.Nonnull String region,
- @javax.annotation.Nonnull String resourcePoolId,
- @javax.annotation.Nonnull
- CreateResourcePoolSnapshotPayload createResourcePoolSnapshotPayload,
- 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 createResourcePoolSnapshot(Async)");
- }
-
- // verify the required parameter 'region' is set
- if (region == null) {
- throw new ApiException(
- "Missing the required parameter 'region' when calling createResourcePoolSnapshot(Async)");
- }
-
- // verify the required parameter 'resourcePoolId' is set
- if (resourcePoolId == null) {
- throw new ApiException(
- "Missing the required parameter 'resourcePoolId' when calling createResourcePoolSnapshot(Async)");
- }
-
- // verify the required parameter 'createResourcePoolSnapshotPayload' is set
- if (createResourcePoolSnapshotPayload == null) {
- throw new ApiException(
- "Missing the required parameter 'createResourcePoolSnapshotPayload' when calling createResourcePoolSnapshot(Async)");
- }
-
- return createResourcePoolSnapshotCall(
- projectId, region, resourcePoolId, createResourcePoolSnapshotPayload, _callback);
- }
-
- /**
- * Create Resource Pool Snapshot Creates a Snapshot of a Resource Pool in a project.
- *
- * @param projectId (required)
- * @param region (required)
- * @param resourcePoolId (required)
- * @param createResourcePoolSnapshotPayload (required)
- * @return CreateResourcePoolSnapshotResponse
- * @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
OK
-
- *
400
Some fields of the request have failed the validation procedure.
-
- *
401
Please make sure the Authorization Header is set and uses correct credentials
-
- *
500
Please retry again later or contact support if the issue persists
-
- *
- */
- public CreateResourcePoolSnapshotResponse createResourcePoolSnapshot(
- @javax.annotation.Nonnull String projectId,
- @javax.annotation.Nonnull String region,
- @javax.annotation.Nonnull String resourcePoolId,
- @javax.annotation.Nonnull
- CreateResourcePoolSnapshotPayload createResourcePoolSnapshotPayload)
- throws ApiException {
- ApiResponse localVarResp =
- createResourcePoolSnapshotWithHttpInfo(
- projectId, region, resourcePoolId, createResourcePoolSnapshotPayload);
- return localVarResp.getData();
- }
-
- /**
- * Create Resource Pool Snapshot Creates a Snapshot of a Resource Pool in a project.
- *
- * @param projectId (required)
- * @param region (required)
- * @param resourcePoolId (required)
- * @param createResourcePoolSnapshotPayload (required)
- * @return ApiResponse<CreateResourcePoolSnapshotResponse>
- * @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
OK
-
- *
400
Some fields of the request have failed the validation procedure.
-
- *
401
Please make sure the Authorization Header is set and uses correct credentials
-
- *
500
Please retry again later or contact support if the issue persists
-
- *
- */
- public ApiResponse createResourcePoolSnapshotWithHttpInfo(
- @javax.annotation.Nonnull String projectId,
- @javax.annotation.Nonnull String region,
- @javax.annotation.Nonnull String resourcePoolId,
- @javax.annotation.Nonnull
- CreateResourcePoolSnapshotPayload createResourcePoolSnapshotPayload)
- throws ApiException {
- okhttp3.Call localVarCall =
- createResourcePoolSnapshotValidateBeforeCall(
- projectId, region, resourcePoolId, createResourcePoolSnapshotPayload, null);
- Type localVarReturnType = new TypeToken() {}.getType();
- return localVarApiClient.execute(localVarCall, localVarReturnType);
- }
-
- /**
- * Create Resource Pool Snapshot (asynchronously) Creates a Snapshot of a Resource Pool in a
- * project.
- *
- * @param projectId (required)
- * @param region (required)
- * @param resourcePoolId (required)
- * @param createResourcePoolSnapshotPayload (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
OK
-
- *
400
Some fields of the request have failed the validation procedure.
-
- *
401
Please make sure the Authorization Header is set and uses correct credentials
-
- *
500
Please retry again later or contact support if the issue persists