ApiException class.
+ */
+@SuppressWarnings("serial")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.14.0")
+public class ApiException extends Exception {
+ private static final long serialVersionUID = 1L;
+
+ private int code = 0;
+ private Map> responseHeaders = null;
+ private String responseBody = null;
+
+ /**
+ * Constructor for ApiException.
+ */
+ public ApiException() {}
+
+ /**
+ * Constructor for ApiException.
+ *
+ * @param throwable a {@link java.lang.Throwable} object
+ */
+ public ApiException(Throwable throwable) {
+ super(throwable);
+ }
+
+ /**
+ * Constructor for ApiException.
+ *
+ * @param message the error message
+ */
+ public ApiException(String message) {
+ super(message);
+ }
+
+ /**
+ * Constructor for ApiException.
+ *
+ * @param message the error message
+ * @param throwable a {@link java.lang.Throwable} object
+ * @param code HTTP status code
+ * @param responseHeaders a {@link java.util.Map} of HTTP response headers
+ * @param responseBody the response body
+ */
+ public ApiException(String message, Throwable throwable, int code, Map> responseHeaders, String responseBody) {
+ super(message, throwable);
+ this.code = code;
+ this.responseHeaders = responseHeaders;
+ this.responseBody = responseBody;
+ }
+
+ /**
+ * Constructor for ApiException.
+ *
+ * @param message the error message
+ * @param code HTTP status code
+ * @param responseHeaders a {@link java.util.Map} of HTTP response headers
+ * @param responseBody the response body
+ */
+ public ApiException(String message, int code, Map> responseHeaders, String responseBody) {
+ this(message, (Throwable) null, code, responseHeaders, responseBody);
+ }
+
+ /**
+ * Constructor for ApiException.
+ *
+ * @param message the error message
+ * @param throwable a {@link java.lang.Throwable} object
+ * @param code HTTP status code
+ * @param responseHeaders a {@link java.util.Map} of HTTP response headers
+ */
+ public ApiException(String message, Throwable throwable, int code, Map> responseHeaders) {
+ this(message, throwable, code, responseHeaders, null);
+ }
+
+ /**
+ * Constructor for ApiException.
+ *
+ * @param code HTTP status code
+ * @param responseHeaders a {@link java.util.Map} of HTTP response headers
+ * @param responseBody the response body
+ */
+ public ApiException(int code, Map> responseHeaders, String responseBody) {
+ this("Response Code: " + code + " Response Body: " + responseBody, (Throwable) null, code, responseHeaders, responseBody);
+ }
+
+ /**
+ * Constructor for ApiException.
+ *
+ * @param code HTTP status code
+ * @param message a {@link java.lang.String} object
+ */
+ public ApiException(int code, String message) {
+ super(message);
+ this.code = code;
+ }
+
+ /**
+ * Constructor for ApiException.
+ *
+ * @param code HTTP status code
+ * @param message the error message
+ * @param responseHeaders a {@link java.util.Map} of HTTP response headers
+ * @param responseBody the response body
+ */
+ public ApiException(int code, String message, Map> responseHeaders, String responseBody) {
+ this(code, message);
+ this.responseHeaders = responseHeaders;
+ this.responseBody = responseBody;
+ }
+
+ /**
+ * Get the HTTP status code.
+ *
+ * @return HTTP status code
+ */
+ public int getCode() {
+ return code;
+ }
+
+ /**
+ * Get the HTTP response headers.
+ *
+ * @return A map of list of string
+ */
+ public Map> getResponseHeaders() {
+ return responseHeaders;
+ }
+
+ /**
+ * Get the HTTP response body.
+ *
+ * @return Response body in the form of string
+ */
+ public String getResponseBody() {
+ return responseBody;
+ }
+
+ /**
+ * Get the exception message including HTTP response data.
+ *
+ * @return The exception message
+ */
+ public String getMessage() {
+ return String.format("Message: %s%nHTTP response code: %s%nHTTP response body: %s%nHTTP response headers: %s",
+ super.getMessage(), this.getCode(), this.getResponseBody(), this.getResponseHeaders());
+ }
+}
diff --git a/services/resourcemanager/src/main/java/cloud/stackit/sdk/resourcemanager/ApiResponse.java b/services/resourcemanager/src/main/java/cloud/stackit/sdk/resourcemanager/ApiResponse.java
new file mode 100644
index 0000000..7429627
--- /dev/null
+++ b/services/resourcemanager/src/main/java/cloud/stackit/sdk/resourcemanager/ApiResponse.java
@@ -0,0 +1,76 @@
+/*
+ * Resource Manager API
+ * API v2 to manage resource containers - organizations, folders, projects incl. labels ### Resource Management STACKIT resource management handles the terms _Organization_, _Folder_, _Project_, _Label_, and the hierarchical structure between them. Technically, organizations, folders, and projects are _Resource Containers_ to which a _Label_ can be attached to. The STACKIT _Resource Manager_ provides CRUD endpoints to query and to modify the state. ### Organizations STACKIT organizations are the base element to create and to use cloud-resources. An organization is bound to one customer account. Organizations have a lifecycle. - Organizations are always the root node in resource hierarchy and do not have a parent ### Projects STACKIT projects are needed to use cloud-resources. Projects serve as wrapper for underlying technical structures and processes. Projects have a lifecycle. Projects compared to folders may have different policies. - Projects are optional, but mandatory for cloud-resource usage - A project can be created having either an organization, or a folder as parent - A project must not have a project as parent - Project names under the same parent must not be unique - Root organization cannot be changed ### Label STACKIT labels are key-value pairs including a resource container reference. Labels can be defined and attached freely to resource containers by which resources can be organized and queried. - Policy-based, immutable labels may exists
+ *
+ * The version of the OpenAPI document: 2.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.resourcemanager;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * API response returned by API call.
+ */
+public class ApiResponse {
+ final private int statusCode;
+ final private Map> headers;
+ final private 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/resourcemanager/src/main/java/cloud/stackit/sdk/resourcemanager/Configuration.java b/services/resourcemanager/src/main/java/cloud/stackit/sdk/resourcemanager/Configuration.java
new file mode 100644
index 0000000..8794718
--- /dev/null
+++ b/services/resourcemanager/src/main/java/cloud/stackit/sdk/resourcemanager/Configuration.java
@@ -0,0 +1,63 @@
+/*
+ * Resource Manager API
+ * API v2 to manage resource containers - organizations, folders, projects incl. labels ### Resource Management STACKIT resource management handles the terms _Organization_, _Folder_, _Project_, _Label_, and the hierarchical structure between them. Technically, organizations, folders, and projects are _Resource Containers_ to which a _Label_ can be attached to. The STACKIT _Resource Manager_ provides CRUD endpoints to query and to modify the state. ### Organizations STACKIT organizations are the base element to create and to use cloud-resources. An organization is bound to one customer account. Organizations have a lifecycle. - Organizations are always the root node in resource hierarchy and do not have a parent ### Projects STACKIT projects are needed to use cloud-resources. Projects serve as wrapper for underlying technical structures and processes. Projects have a lifecycle. Projects compared to folders may have different policies. - Projects are optional, but mandatory for cloud-resource usage - A project can be created having either an organization, or a folder as parent - A project must not have a project as parent - Project names under the same parent must not be unique - Root organization cannot be changed ### Label STACKIT labels are key-value pairs including a resource container reference. Labels can be defined and attached freely to resource containers by which resources can be organized and queried. - Policy-based, immutable labels may exists
+ *
+ * The version of the OpenAPI document: 2.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.resourcemanager;
+
+import java.util.Objects;
+import java.util.concurrent.atomic.AtomicReference;
+import java.util.function.Supplier;
+
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.14.0")
+public class Configuration {
+ public static final String VERSION = "2.0";
+
+ private static final AtomicReference defaultApiClient = new AtomicReference<>();
+ private static volatile Supplier apiClientFactory = ApiClient::new;
+
+ /**
+ * Get the default API client, which would be used when creating API instances without providing an API client.
+ *
+ * @return Default API client
+ */
+ public static ApiClient getDefaultApiClient() {
+ ApiClient client = defaultApiClient.get();
+ if (client == null) {
+ client = defaultApiClient.updateAndGet(val -> {
+ if (val != null) { // changed by another thread
+ return val;
+ }
+ return apiClientFactory.get();
+ });
+ }
+ return client;
+ }
+
+ /**
+ * Set the default API client, which would be used when creating API instances without providing an API client.
+ *
+ * @param apiClient API client
+ */
+ public static void setDefaultApiClient(ApiClient apiClient) {
+ defaultApiClient.set(apiClient);
+ }
+
+ /**
+ * set the callback used to create new ApiClient objects
+ */
+ public static void setApiClientFactory(Supplier factory) {
+ apiClientFactory = Objects.requireNonNull(factory);
+ }
+
+ private Configuration() {
+ }
+}
\ No newline at end of file
diff --git a/services/resourcemanager/src/main/java/cloud/stackit/sdk/resourcemanager/GzipRequestInterceptor.java b/services/resourcemanager/src/main/java/cloud/stackit/sdk/resourcemanager/GzipRequestInterceptor.java
new file mode 100644
index 0000000..fbeaf5d
--- /dev/null
+++ b/services/resourcemanager/src/main/java/cloud/stackit/sdk/resourcemanager/GzipRequestInterceptor.java
@@ -0,0 +1,85 @@
+/*
+ * Resource Manager API
+ * API v2 to manage resource containers - organizations, folders, projects incl. labels ### Resource Management STACKIT resource management handles the terms _Organization_, _Folder_, _Project_, _Label_, and the hierarchical structure between them. Technically, organizations, folders, and projects are _Resource Containers_ to which a _Label_ can be attached to. The STACKIT _Resource Manager_ provides CRUD endpoints to query and to modify the state. ### Organizations STACKIT organizations are the base element to create and to use cloud-resources. An organization is bound to one customer account. Organizations have a lifecycle. - Organizations are always the root node in resource hierarchy and do not have a parent ### Projects STACKIT projects are needed to use cloud-resources. Projects serve as wrapper for underlying technical structures and processes. Projects have a lifecycle. Projects compared to folders may have different policies. - Projects are optional, but mandatory for cloud-resource usage - A project can be created having either an organization, or a folder as parent - A project must not have a project as parent - Project names under the same parent must not be unique - Root organization cannot be changed ### Label STACKIT labels are key-value pairs including a resource container reference. Labels can be defined and attached freely to resource containers by which resources can be organized and queried. - Policy-based, immutable labels may exists
+ *
+ * The version of the OpenAPI document: 2.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.resourcemanager;
+
+import okhttp3.*;
+import okio.Buffer;
+import okio.BufferedSink;
+import okio.GzipSink;
+import okio.Okio;
+
+import java.io.IOException;
+
+/**
+ * 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/resourcemanager/src/main/java/cloud/stackit/sdk/resourcemanager/JSON.java b/services/resourcemanager/src/main/java/cloud/stackit/sdk/resourcemanager/JSON.java
new file mode 100644
index 0000000..4604632
--- /dev/null
+++ b/services/resourcemanager/src/main/java/cloud/stackit/sdk/resourcemanager/JSON.java
@@ -0,0 +1,444 @@
+/*
+ * Resource Manager API
+ * API v2 to manage resource containers - organizations, folders, projects incl. labels ### Resource Management STACKIT resource management handles the terms _Organization_, _Folder_, _Project_, _Label_, and the hierarchical structure between them. Technically, organizations, folders, and projects are _Resource Containers_ to which a _Label_ can be attached to. The STACKIT _Resource Manager_ provides CRUD endpoints to query and to modify the state. ### Organizations STACKIT organizations are the base element to create and to use cloud-resources. An organization is bound to one customer account. Organizations have a lifecycle. - Organizations are always the root node in resource hierarchy and do not have a parent ### Projects STACKIT projects are needed to use cloud-resources. Projects serve as wrapper for underlying technical structures and processes. Projects have a lifecycle. Projects compared to folders may have different policies. - Projects are optional, but mandatory for cloud-resource usage - A project can be created having either an organization, or a folder as parent - A project must not have a project as parent - Project names under the same parent must not be unique - Root organization cannot be changed ### Label STACKIT labels are key-value pairs including a resource container reference. Labels can be defined and attached freely to resource containers by which resources can be organized and queried. - Policy-based, immutable labels may exists
+ *
+ * The version of the OpenAPI document: 2.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.resourcemanager;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+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 com.google.gson.JsonElement;
+import io.gsonfire.GsonFireBuilder;
+import io.gsonfire.TypeSelector;
+
+import okio.ByteString;
+
+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.Locale;
+import java.util.Map;
+import java.util.HashMap;
+
+/*
+ * 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.resourcemanager.model.CreateFolderPayload.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new cloud.stackit.sdk.resourcemanager.model.CreateProjectPayload.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new cloud.stackit.sdk.resourcemanager.model.ErrorResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new cloud.stackit.sdk.resourcemanager.model.FolderResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new cloud.stackit.sdk.resourcemanager.model.GetFolderDetailsResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new cloud.stackit.sdk.resourcemanager.model.GetProjectResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new cloud.stackit.sdk.resourcemanager.model.ListFoldersResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new cloud.stackit.sdk.resourcemanager.model.ListFoldersResponseItemsInner.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new cloud.stackit.sdk.resourcemanager.model.ListOrganizationsResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new cloud.stackit.sdk.resourcemanager.model.ListOrganizationsResponseItemsInner.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new cloud.stackit.sdk.resourcemanager.model.ListProjectsResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new cloud.stackit.sdk.resourcemanager.model.Member.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new cloud.stackit.sdk.resourcemanager.model.OrganizationResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new cloud.stackit.sdk.resourcemanager.model.Parent.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new cloud.stackit.sdk.resourcemanager.model.ParentListInner.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new cloud.stackit.sdk.resourcemanager.model.PartialUpdateFolderPayload.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new cloud.stackit.sdk.resourcemanager.model.PartialUpdateOrganizationPayload.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new cloud.stackit.sdk.resourcemanager.model.PartialUpdateProjectPayload.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new cloud.stackit.sdk.resourcemanager.model.Project.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/resourcemanager/src/main/java/cloud/stackit/sdk/resourcemanager/Pair.java b/services/resourcemanager/src/main/java/cloud/stackit/sdk/resourcemanager/Pair.java
new file mode 100644
index 0000000..8975646
--- /dev/null
+++ b/services/resourcemanager/src/main/java/cloud/stackit/sdk/resourcemanager/Pair.java
@@ -0,0 +1,57 @@
+/*
+ * Resource Manager API
+ * API v2 to manage resource containers - organizations, folders, projects incl. labels ### Resource Management STACKIT resource management handles the terms _Organization_, _Folder_, _Project_, _Label_, and the hierarchical structure between them. Technically, organizations, folders, and projects are _Resource Containers_ to which a _Label_ can be attached to. The STACKIT _Resource Manager_ provides CRUD endpoints to query and to modify the state. ### Organizations STACKIT organizations are the base element to create and to use cloud-resources. An organization is bound to one customer account. Organizations have a lifecycle. - Organizations are always the root node in resource hierarchy and do not have a parent ### Projects STACKIT projects are needed to use cloud-resources. Projects serve as wrapper for underlying technical structures and processes. Projects have a lifecycle. Projects compared to folders may have different policies. - Projects are optional, but mandatory for cloud-resource usage - A project can be created having either an organization, or a folder as parent - A project must not have a project as parent - Project names under the same parent must not be unique - Root organization cannot be changed ### Label STACKIT labels are key-value pairs including a resource container reference. Labels can be defined and attached freely to resource containers by which resources can be organized and queried. - Policy-based, immutable labels may exists
+ *
+ * The version of the OpenAPI document: 2.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.resourcemanager;
+
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.14.0")
+public class Pair {
+ private String name = "";
+ private String value = "";
+
+ public Pair (String name, String value) {
+ setName(name);
+ setValue(value);
+ }
+
+ private void setName(String name) {
+ if (!isValidString(name)) {
+ return;
+ }
+
+ this.name = name;
+ }
+
+ private void setValue(String value) {
+ if (!isValidString(value)) {
+ return;
+ }
+
+ this.value = value;
+ }
+
+ public String getName() {
+ return this.name;
+ }
+
+ public String getValue() {
+ return this.value;
+ }
+
+ private boolean isValidString(String arg) {
+ if (arg == null) {
+ return false;
+ }
+
+ return true;
+ }
+}
diff --git a/services/resourcemanager/src/main/java/cloud/stackit/sdk/resourcemanager/ProgressRequestBody.java b/services/resourcemanager/src/main/java/cloud/stackit/sdk/resourcemanager/ProgressRequestBody.java
new file mode 100644
index 0000000..c420844
--- /dev/null
+++ b/services/resourcemanager/src/main/java/cloud/stackit/sdk/resourcemanager/ProgressRequestBody.java
@@ -0,0 +1,73 @@
+/*
+ * Resource Manager API
+ * API v2 to manage resource containers - organizations, folders, projects incl. labels ### Resource Management STACKIT resource management handles the terms _Organization_, _Folder_, _Project_, _Label_, and the hierarchical structure between them. Technically, organizations, folders, and projects are _Resource Containers_ to which a _Label_ can be attached to. The STACKIT _Resource Manager_ provides CRUD endpoints to query and to modify the state. ### Organizations STACKIT organizations are the base element to create and to use cloud-resources. An organization is bound to one customer account. Organizations have a lifecycle. - Organizations are always the root node in resource hierarchy and do not have a parent ### Projects STACKIT projects are needed to use cloud-resources. Projects serve as wrapper for underlying technical structures and processes. Projects have a lifecycle. Projects compared to folders may have different policies. - Projects are optional, but mandatory for cloud-resource usage - A project can be created having either an organization, or a folder as parent - A project must not have a project as parent - Project names under the same parent must not be unique - Root organization cannot be changed ### Label STACKIT labels are key-value pairs including a resource container reference. Labels can be defined and attached freely to resource containers by which resources can be organized and queried. - Policy-based, immutable labels may exists
+ *
+ * The version of the OpenAPI document: 2.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.resourcemanager;
+
+import okhttp3.MediaType;
+import okhttp3.RequestBody;
+
+import java.io.IOException;
+
+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/resourcemanager/src/main/java/cloud/stackit/sdk/resourcemanager/ProgressResponseBody.java b/services/resourcemanager/src/main/java/cloud/stackit/sdk/resourcemanager/ProgressResponseBody.java
new file mode 100644
index 0000000..1e80dbd
--- /dev/null
+++ b/services/resourcemanager/src/main/java/cloud/stackit/sdk/resourcemanager/ProgressResponseBody.java
@@ -0,0 +1,70 @@
+/*
+ * Resource Manager API
+ * API v2 to manage resource containers - organizations, folders, projects incl. labels ### Resource Management STACKIT resource management handles the terms _Organization_, _Folder_, _Project_, _Label_, and the hierarchical structure between them. Technically, organizations, folders, and projects are _Resource Containers_ to which a _Label_ can be attached to. The STACKIT _Resource Manager_ provides CRUD endpoints to query and to modify the state. ### Organizations STACKIT organizations are the base element to create and to use cloud-resources. An organization is bound to one customer account. Organizations have a lifecycle. - Organizations are always the root node in resource hierarchy and do not have a parent ### Projects STACKIT projects are needed to use cloud-resources. Projects serve as wrapper for underlying technical structures and processes. Projects have a lifecycle. Projects compared to folders may have different policies. - Projects are optional, but mandatory for cloud-resource usage - A project can be created having either an organization, or a folder as parent - A project must not have a project as parent - Project names under the same parent must not be unique - Root organization cannot be changed ### Label STACKIT labels are key-value pairs including a resource container reference. Labels can be defined and attached freely to resource containers by which resources can be organized and queried. - Policy-based, immutable labels may exists
+ *
+ * The version of the OpenAPI document: 2.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.resourcemanager;
+
+import okhttp3.MediaType;
+import okhttp3.ResponseBody;
+
+import java.io.IOException;
+
+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/resourcemanager/src/main/java/cloud/stackit/sdk/resourcemanager/ServerConfiguration.java b/services/resourcemanager/src/main/java/cloud/stackit/sdk/resourcemanager/ServerConfiguration.java
new file mode 100644
index 0000000..d660748
--- /dev/null
+++ b/services/resourcemanager/src/main/java/cloud/stackit/sdk/resourcemanager/ServerConfiguration.java
@@ -0,0 +1,72 @@
+/*
+ * Resource Manager API
+ * API v2 to manage resource containers - organizations, folders, projects incl. labels ### Resource Management STACKIT resource management handles the terms _Organization_, _Folder_, _Project_, _Label_, and the hierarchical structure between them. Technically, organizations, folders, and projects are _Resource Containers_ to which a _Label_ can be attached to. The STACKIT _Resource Manager_ provides CRUD endpoints to query and to modify the state. ### Organizations STACKIT organizations are the base element to create and to use cloud-resources. An organization is bound to one customer account. Organizations have a lifecycle. - Organizations are always the root node in resource hierarchy and do not have a parent ### Projects STACKIT projects are needed to use cloud-resources. Projects serve as wrapper for underlying technical structures and processes. Projects have a lifecycle. Projects compared to folders may have different policies. - Projects are optional, but mandatory for cloud-resource usage - A project can be created having either an organization, or a folder as parent - A project must not have a project as parent - Project names under the same parent must not be unique - Root organization cannot be changed ### Label STACKIT labels are key-value pairs including a resource container reference. Labels can be defined and attached freely to resource containers by which resources can be organized and queried. - Policy-based, immutable labels may exists
+ *
+ * The version of the OpenAPI document: 2.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.resourcemanager;
+
+import java.util.Map;
+
+/**
+ * Representing a Server configuration.
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.14.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/resourcemanager/src/main/java/cloud/stackit/sdk/resourcemanager/ServerVariable.java b/services/resourcemanager/src/main/java/cloud/stackit/sdk/resourcemanager/ServerVariable.java
new file mode 100644
index 0000000..b6dac84
--- /dev/null
+++ b/services/resourcemanager/src/main/java/cloud/stackit/sdk/resourcemanager/ServerVariable.java
@@ -0,0 +1,37 @@
+/*
+ * Resource Manager API
+ * API v2 to manage resource containers - organizations, folders, projects incl. labels ### Resource Management STACKIT resource management handles the terms _Organization_, _Folder_, _Project_, _Label_, and the hierarchical structure between them. Technically, organizations, folders, and projects are _Resource Containers_ to which a _Label_ can be attached to. The STACKIT _Resource Manager_ provides CRUD endpoints to query and to modify the state. ### Organizations STACKIT organizations are the base element to create and to use cloud-resources. An organization is bound to one customer account. Organizations have a lifecycle. - Organizations are always the root node in resource hierarchy and do not have a parent ### Projects STACKIT projects are needed to use cloud-resources. Projects serve as wrapper for underlying technical structures and processes. Projects have a lifecycle. Projects compared to folders may have different policies. - Projects are optional, but mandatory for cloud-resource usage - A project can be created having either an organization, or a folder as parent - A project must not have a project as parent - Project names under the same parent must not be unique - Root organization cannot be changed ### Label STACKIT labels are key-value pairs including a resource container reference. Labels can be defined and attached freely to resource containers by which resources can be organized and queried. - Policy-based, immutable labels may exists
+ *
+ * The version of the OpenAPI document: 2.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.resourcemanager;
+
+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.14.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/resourcemanager/src/main/java/cloud/stackit/sdk/resourcemanager/StringUtil.java b/services/resourcemanager/src/main/java/cloud/stackit/sdk/resourcemanager/StringUtil.java
new file mode 100644
index 0000000..a997c08
--- /dev/null
+++ b/services/resourcemanager/src/main/java/cloud/stackit/sdk/resourcemanager/StringUtil.java
@@ -0,0 +1,83 @@
+/*
+ * Resource Manager API
+ * API v2 to manage resource containers - organizations, folders, projects incl. labels ### Resource Management STACKIT resource management handles the terms _Organization_, _Folder_, _Project_, _Label_, and the hierarchical structure between them. Technically, organizations, folders, and projects are _Resource Containers_ to which a _Label_ can be attached to. The STACKIT _Resource Manager_ provides CRUD endpoints to query and to modify the state. ### Organizations STACKIT organizations are the base element to create and to use cloud-resources. An organization is bound to one customer account. Organizations have a lifecycle. - Organizations are always the root node in resource hierarchy and do not have a parent ### Projects STACKIT projects are needed to use cloud-resources. Projects serve as wrapper for underlying technical structures and processes. Projects have a lifecycle. Projects compared to folders may have different policies. - Projects are optional, but mandatory for cloud-resource usage - A project can be created having either an organization, or a folder as parent - A project must not have a project as parent - Project names under the same parent must not be unique - Root organization cannot be changed ### Label STACKIT labels are key-value pairs including a resource container reference. Labels can be defined and attached freely to resource containers by which resources can be organized and queried. - Policy-based, immutable labels may exists
+ *
+ * The version of the OpenAPI document: 2.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.resourcemanager;
+
+import java.util.Collection;
+import java.util.Iterator;
+
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.14.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/resourcemanager/src/main/java/cloud/stackit/sdk/resourcemanager/api/DefaultApi.java b/services/resourcemanager/src/main/java/cloud/stackit/sdk/resourcemanager/api/DefaultApi.java
new file mode 100644
index 0000000..1ad7720
--- /dev/null
+++ b/services/resourcemanager/src/main/java/cloud/stackit/sdk/resourcemanager/api/DefaultApi.java
@@ -0,0 +1,2389 @@
+/*
+ * Resource Manager API
+ * API v2 to manage resource containers - organizations, folders, projects incl. labels ### Resource Management STACKIT resource management handles the terms _Organization_, _Folder_, _Project_, _Label_, and the hierarchical structure between them. Technically, organizations, folders, and projects are _Resource Containers_ to which a _Label_ can be attached to. The STACKIT _Resource Manager_ provides CRUD endpoints to query and to modify the state. ### Organizations STACKIT organizations are the base element to create and to use cloud-resources. An organization is bound to one customer account. Organizations have a lifecycle. - Organizations are always the root node in resource hierarchy and do not have a parent ### Projects STACKIT projects are needed to use cloud-resources. Projects serve as wrapper for underlying technical structures and processes. Projects have a lifecycle. Projects compared to folders may have different policies. - Projects are optional, but mandatory for cloud-resource usage - A project can be created having either an organization, or a folder as parent - A project must not have a project as parent - Project names under the same parent must not be unique - Root organization cannot be changed ### Label STACKIT labels are key-value pairs including a resource container reference. Labels can be defined and attached freely to resource containers by which resources can be organized and queried. - Policy-based, immutable labels may exists
+ *
+ * The version of the OpenAPI document: 2.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.resourcemanager.api;
+
+import cloud.stackit.sdk.resourcemanager.ApiCallback;
+import cloud.stackit.sdk.resourcemanager.ApiClient;
+import cloud.stackit.sdk.resourcemanager.ApiException;
+import cloud.stackit.sdk.resourcemanager.ApiResponse;
+import cloud.stackit.sdk.resourcemanager.Configuration;
+import cloud.stackit.sdk.resourcemanager.Pair;
+import cloud.stackit.sdk.resourcemanager.ProgressRequestBody;
+import cloud.stackit.sdk.resourcemanager.ProgressResponseBody;
+
+import com.google.gson.reflect.TypeToken;
+
+import java.io.IOException;
+
+
+import java.math.BigDecimal;
+import cloud.stackit.sdk.resourcemanager.model.CreateFolderPayload;
+import cloud.stackit.sdk.resourcemanager.model.CreateProjectPayload;
+import cloud.stackit.sdk.resourcemanager.model.ErrorResponse;
+import cloud.stackit.sdk.resourcemanager.model.FolderResponse;
+import cloud.stackit.sdk.resourcemanager.model.GetFolderDetailsResponse;
+import cloud.stackit.sdk.resourcemanager.model.GetProjectResponse;
+import cloud.stackit.sdk.resourcemanager.model.ListFoldersResponse;
+import cloud.stackit.sdk.resourcemanager.model.ListOrganizationsResponse;
+import cloud.stackit.sdk.resourcemanager.model.ListProjectsResponse;
+import java.time.OffsetDateTime;
+import cloud.stackit.sdk.resourcemanager.model.OrganizationResponse;
+import cloud.stackit.sdk.resourcemanager.model.PartialUpdateFolderPayload;
+import cloud.stackit.sdk.resourcemanager.model.PartialUpdateOrganizationPayload;
+import cloud.stackit.sdk.resourcemanager.model.PartialUpdateProjectPayload;
+import cloud.stackit.sdk.resourcemanager.model.Project;
+
+import java.lang.reflect.Type;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class DefaultApi {
+ private ApiClient localVarApiClient;
+ private int localHostIndex;
+ private String localCustomBaseUrl;
+
+ public DefaultApi() {
+ this(Configuration.getDefaultApiClient());
+ }
+
+ public DefaultApi(ApiClient apiClient) {
+ this.localVarApiClient = apiClient;
+ }
+
+ 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 createFolder
+ * @param createFolderPayload (optional)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+ Response Details
+ Status Code | Description | Response Headers |
+ 201 | Created | - |
+ 400 | Bad Request | - |
+ 403 | Forbidden | - |
+ 409 | Conflict | - |
+
+ */
+ public okhttp3.Call createFolderCall(@javax.annotation.Nullable CreateFolderPayload createFolderPayload, 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 = createFolderPayload;
+
+ // create path and map variables
+ String localVarPath = "/v2/folders";
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ "application/json"
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+
+ String[] localVarAuthNames = new String[] { };
+ return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call createFolderValidateBeforeCall(@javax.annotation.Nullable CreateFolderPayload createFolderPayload, final ApiCallback _callback) throws ApiException {
+ return createFolderCall(createFolderPayload, _callback);
+
+ }
+
+ /**
+ * Create Folder
+ * Create a new folder.
+ * @param createFolderPayload (optional)
+ * @return FolderResponse
+ * @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 |
+ 201 | Created | - |
+ 400 | Bad Request | - |
+ 403 | Forbidden | - |
+ 409 | Conflict | - |
+
+ */
+ public FolderResponse createFolder(@javax.annotation.Nullable CreateFolderPayload createFolderPayload) throws ApiException {
+ ApiResponse localVarResp = createFolderWithHttpInfo(createFolderPayload);
+ return localVarResp.getData();
+ }
+
+ /**
+ * Create Folder
+ * Create a new folder.
+ * @param createFolderPayload (optional)
+ * @return ApiResponse<FolderResponse>
+ * @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 |
+ 201 | Created | - |
+ 400 | Bad Request | - |
+ 403 | Forbidden | - |
+ 409 | Conflict | - |
+
+ */
+ public ApiResponse createFolderWithHttpInfo(@javax.annotation.Nullable CreateFolderPayload createFolderPayload) throws ApiException {
+ okhttp3.Call localVarCall = createFolderValidateBeforeCall(createFolderPayload, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
+ }
+
+ /**
+ * Create Folder (asynchronously)
+ * Create a new folder.
+ * @param createFolderPayload (optional)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+ Response Details
+ Status Code | Description | Response Headers |
+ 201 | Created | - |
+ 400 | Bad Request | - |
+ 403 | Forbidden | - |
+ 409 | Conflict | - |
+
+ */
+ public okhttp3.Call createFolderAsync(@javax.annotation.Nullable CreateFolderPayload createFolderPayload, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = createFolderValidateBeforeCall(createFolderPayload, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
+ }
+ /**
+ * Build call for createProject
+ * @param createProjectPayload (optional)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+ Response Details
+ Status Code | Description | Response Headers |
+ 201 | Project created | - |
+ 400 | Bad Request | - |
+ 403 | Forbidden | - |
+ 409 | Conflict | - |
+
+ */
+ public okhttp3.Call createProjectCall(@javax.annotation.Nullable CreateProjectPayload createProjectPayload, 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 = createProjectPayload;
+
+ // create path and map variables
+ String localVarPath = "/v2/projects";
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ "application/json"
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+
+ String[] localVarAuthNames = new String[] { };
+ return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call createProjectValidateBeforeCall(@javax.annotation.Nullable CreateProjectPayload createProjectPayload, final ApiCallback _callback) throws ApiException {
+ return createProjectCall(createProjectPayload, _callback);
+
+ }
+
+ /**
+ * Create Project
+ * Create a new project. - The request is synchronous, but the workflow-based creation is asynchronous. - Lifecycle state remains in CREATING, until workflow completes
+ * @param createProjectPayload (optional)
+ * @return Project
+ * @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 |
+ 201 | Project created | - |
+ 400 | Bad Request | - |
+ 403 | Forbidden | - |
+ 409 | Conflict | - |
+
+ */
+ public Project createProject(@javax.annotation.Nullable CreateProjectPayload createProjectPayload) throws ApiException {
+ ApiResponse localVarResp = createProjectWithHttpInfo(createProjectPayload);
+ return localVarResp.getData();
+ }
+
+ /**
+ * Create Project
+ * Create a new project. - The request is synchronous, but the workflow-based creation is asynchronous. - Lifecycle state remains in CREATING, until workflow completes
+ * @param createProjectPayload (optional)
+ * @return ApiResponse<Project>
+ * @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 |
+ 201 | Project created | - |
+ 400 | Bad Request | - |
+ 403 | Forbidden | - |
+ 409 | Conflict | - |
+
+ */
+ public ApiResponse createProjectWithHttpInfo(@javax.annotation.Nullable CreateProjectPayload createProjectPayload) throws ApiException {
+ okhttp3.Call localVarCall = createProjectValidateBeforeCall(createProjectPayload, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
+ }
+
+ /**
+ * Create Project (asynchronously)
+ * Create a new project. - The request is synchronous, but the workflow-based creation is asynchronous. - Lifecycle state remains in CREATING, until workflow completes
+ * @param createProjectPayload (optional)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+ Response Details
+ Status Code | Description | Response Headers |
+ 201 | Project created | - |
+ 400 | Bad Request | - |
+ 403 | Forbidden | - |
+ 409 | Conflict | - |
+
+ */
+ public okhttp3.Call createProjectAsync(@javax.annotation.Nullable CreateProjectPayload createProjectPayload, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = createProjectValidateBeforeCall(createProjectPayload, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
+ }
+ /**
+ * Build call for deleteFolder
+ * @param containerId Folder identifier - containerId as well as UUID identifier is supported. (required)
+ * @param force If true, all nested, empty folders are deleted recursively - if no project is attached! (optional, default to false)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+ Response Details
+ Status Code | Description | Response Headers |
+ 202 | Deletion process triggered | - |
+ 404 | Not Found | - |
+ 409 | Conflict | - |
+
+ */
+ public okhttp3.Call deleteFolderCall(@javax.annotation.Nonnull String containerId, @javax.annotation.Nullable Boolean force, final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/v2/folders/{containerId}"
+ .replace("{" + "containerId" + "}", localVarApiClient.escapeString(containerId.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ if (force != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("force", force));
+ }
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+
+ String[] localVarAuthNames = new String[] { };
+ return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call deleteFolderValidateBeforeCall(@javax.annotation.Nonnull String containerId, @javax.annotation.Nullable Boolean force, final ApiCallback _callback) throws ApiException {
+ // verify the required parameter 'containerId' is set
+ if (containerId == null) {
+ throw new ApiException("Missing the required parameter 'containerId' when calling deleteFolder(Async)");
+ }
+
+ return deleteFolderCall(containerId, force, _callback);
+
+ }
+
+ /**
+ * Delete Folder
+ * Delete a folder and its metadata. - Folder must not be parent of any other container - A force flag may be set, deleting all underlying folders recursively - if no project is attached!
+ * @param containerId Folder identifier - containerId as well as UUID identifier is supported. (required)
+ * @param force If true, all nested, empty folders are deleted recursively - if no project is attached! (optional, default to false)
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Response Details
+ Status Code | Description | Response Headers |
+ 202 | Deletion process triggered | - |
+ 404 | Not Found | - |
+ 409 | Conflict | - |
+
+ */
+ public void deleteFolder(@javax.annotation.Nonnull String containerId, @javax.annotation.Nullable Boolean force) throws ApiException {
+ deleteFolderWithHttpInfo(containerId, force);
+ }
+
+ /**
+ * Delete Folder
+ * Delete a folder and its metadata. - Folder must not be parent of any other container - A force flag may be set, deleting all underlying folders recursively - if no project is attached!
+ * @param containerId Folder identifier - containerId as well as UUID identifier is supported. (required)
+ * @param force If true, all nested, empty folders are deleted recursively - if no project is attached! (optional, default to false)
+ * @return ApiResponse<Void>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Response Details
+ Status Code | Description | Response Headers |
+ 202 | Deletion process triggered | - |
+ 404 | Not Found | - |
+ 409 | Conflict | - |
+
+ */
+ public ApiResponse deleteFolderWithHttpInfo(@javax.annotation.Nonnull String containerId, @javax.annotation.Nullable Boolean force) throws ApiException {
+ okhttp3.Call localVarCall = deleteFolderValidateBeforeCall(containerId, force, null);
+ return localVarApiClient.execute(localVarCall);
+ }
+
+ /**
+ * Delete Folder (asynchronously)
+ * Delete a folder and its metadata. - Folder must not be parent of any other container - A force flag may be set, deleting all underlying folders recursively - if no project is attached!
+ * @param containerId Folder identifier - containerId as well as UUID identifier is supported. (required)
+ * @param force If true, all nested, empty folders are deleted recursively - if no project is attached! (optional, default to false)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+ Response Details
+ Status Code | Description | Response Headers |
+ 202 | Deletion process triggered | - |
+ 404 | Not Found | - |
+ 409 | Conflict | - |
+
+ */
+ public okhttp3.Call deleteFolderAsync(@javax.annotation.Nonnull String containerId, @javax.annotation.Nullable Boolean force, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = deleteFolderValidateBeforeCall(containerId, force, _callback);
+ localVarApiClient.executeAsync(localVarCall, _callback);
+ return localVarCall;
+ }
+ /**
+ * Build call for deleteFolderLabels
+ * @param containerId Folder identifier - containerId as well as UUID identifier is supported. (required)
+ * @param keys Label name. (optional)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+ Response Details
+ Status Code | Description | Response Headers |
+ 202 | Labels removed | - |
+ 409 | Conflict | - |
+
+ */
+ public okhttp3.Call deleteFolderLabelsCall(@javax.annotation.Nonnull String containerId, @javax.annotation.Nullable List keys, final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/v2/folders/{containerId}/labels"
+ .replace("{" + "containerId" + "}", localVarApiClient.escapeString(containerId.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ if (keys != null) {
+ localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "keys", keys));
+ }
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+
+ String[] localVarAuthNames = new String[] { };
+ return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call deleteFolderLabelsValidateBeforeCall(@javax.annotation.Nonnull String containerId, @javax.annotation.Nullable List keys, final ApiCallback _callback) throws ApiException {
+ // verify the required parameter 'containerId' is set
+ if (containerId == null) {
+ throw new ApiException("Missing the required parameter 'containerId' when calling deleteFolderLabels(Async)");
+ }
+
+ return deleteFolderLabelsCall(containerId, keys, _callback);
+
+ }
+
+ /**
+ * Delete Folder Labels
+ * Deletes all folder labels by given keys. - Specific labels may be deleted by key(s) - If no key is specified, all labels will be deleted!
+ * @param containerId Folder identifier - containerId as well as UUID identifier is supported. (required)
+ * @param keys Label name. (optional)
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Response Details
+ Status Code | Description | Response Headers |
+ 202 | Labels removed | - |
+ 409 | Conflict | - |
+
+ */
+ public void deleteFolderLabels(@javax.annotation.Nonnull String containerId, @javax.annotation.Nullable List keys) throws ApiException {
+ deleteFolderLabelsWithHttpInfo(containerId, keys);
+ }
+
+ /**
+ * Delete Folder Labels
+ * Deletes all folder labels by given keys. - Specific labels may be deleted by key(s) - If no key is specified, all labels will be deleted!
+ * @param containerId Folder identifier - containerId as well as UUID identifier is supported. (required)
+ * @param keys Label name. (optional)
+ * @return ApiResponse<Void>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Response Details
+ Status Code | Description | Response Headers |
+ 202 | Labels removed | - |
+ 409 | Conflict | - |
+
+ */
+ public ApiResponse deleteFolderLabelsWithHttpInfo(@javax.annotation.Nonnull String containerId, @javax.annotation.Nullable List keys) throws ApiException {
+ okhttp3.Call localVarCall = deleteFolderLabelsValidateBeforeCall(containerId, keys, null);
+ return localVarApiClient.execute(localVarCall);
+ }
+
+ /**
+ * Delete Folder Labels (asynchronously)
+ * Deletes all folder labels by given keys. - Specific labels may be deleted by key(s) - If no key is specified, all labels will be deleted!
+ * @param containerId Folder identifier - containerId as well as UUID identifier is supported. (required)
+ * @param keys Label name. (optional)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+ Response Details
+ Status Code | Description | Response Headers |
+ 202 | Labels removed | - |
+ 409 | Conflict | - |
+
+ */
+ public okhttp3.Call deleteFolderLabelsAsync(@javax.annotation.Nonnull String containerId, @javax.annotation.Nullable List keys, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = deleteFolderLabelsValidateBeforeCall(containerId, keys, _callback);
+ localVarApiClient.executeAsync(localVarCall, _callback);
+ return localVarCall;
+ }
+ /**
+ * Build call for deleteOrganizationLabels
+ * @param containerId Organization identifier - containerId as well as UUID identifier is supported. (required)
+ * @param keys Label name. (optional)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+ Response Details
+ Status Code | Description | Response Headers |
+ 202 | Labels removed | - |
+ 409 | Conflict | - |
+
+ */
+ public okhttp3.Call deleteOrganizationLabelsCall(@javax.annotation.Nonnull String containerId, @javax.annotation.Nullable List keys, final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/v2/organizations/{containerId}/labels"
+ .replace("{" + "containerId" + "}", localVarApiClient.escapeString(containerId.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ if (keys != null) {
+ localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "keys", keys));
+ }
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+
+ String[] localVarAuthNames = new String[] { };
+ return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call deleteOrganizationLabelsValidateBeforeCall(@javax.annotation.Nonnull String containerId, @javax.annotation.Nullable List keys, final ApiCallback _callback) throws ApiException {
+ // verify the required parameter 'containerId' is set
+ if (containerId == null) {
+ throw new ApiException("Missing the required parameter 'containerId' when calling deleteOrganizationLabels(Async)");
+ }
+
+ return deleteOrganizationLabelsCall(containerId, keys, _callback);
+
+ }
+
+ /**
+ * Delete Organization Labels
+ * Deletes all organization labels by given keys. - Specific labels may be deleted by key(s) - If no key is specified, all labels will be deleted!
+ * @param containerId Organization identifier - containerId as well as UUID identifier is supported. (required)
+ * @param keys Label name. (optional)
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Response Details
+ Status Code | Description | Response Headers |
+ 202 | Labels removed | - |
+ 409 | Conflict | - |
+
+ */
+ public void deleteOrganizationLabels(@javax.annotation.Nonnull String containerId, @javax.annotation.Nullable List keys) throws ApiException {
+ deleteOrganizationLabelsWithHttpInfo(containerId, keys);
+ }
+
+ /**
+ * Delete Organization Labels
+ * Deletes all organization labels by given keys. - Specific labels may be deleted by key(s) - If no key is specified, all labels will be deleted!
+ * @param containerId Organization identifier - containerId as well as UUID identifier is supported. (required)
+ * @param keys Label name. (optional)
+ * @return ApiResponse<Void>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Response Details
+ Status Code | Description | Response Headers |
+ 202 | Labels removed | - |
+ 409 | Conflict | - |
+
+ */
+ public ApiResponse deleteOrganizationLabelsWithHttpInfo(@javax.annotation.Nonnull String containerId, @javax.annotation.Nullable List keys) throws ApiException {
+ okhttp3.Call localVarCall = deleteOrganizationLabelsValidateBeforeCall(containerId, keys, null);
+ return localVarApiClient.execute(localVarCall);
+ }
+
+ /**
+ * Delete Organization Labels (asynchronously)
+ * Deletes all organization labels by given keys. - Specific labels may be deleted by key(s) - If no key is specified, all labels will be deleted!
+ * @param containerId Organization identifier - containerId as well as UUID identifier is supported. (required)
+ * @param keys Label name. (optional)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+ Response Details
+ Status Code | Description | Response Headers |
+ 202 | Labels removed | - |
+ 409 | Conflict | - |
+
+ */
+ public okhttp3.Call deleteOrganizationLabelsAsync(@javax.annotation.Nonnull String containerId, @javax.annotation.Nullable List keys, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = deleteOrganizationLabelsValidateBeforeCall(containerId, keys, _callback);
+ localVarApiClient.executeAsync(localVarCall, _callback);
+ return localVarCall;
+ }
+ /**
+ * Build call for deleteProject
+ * @param id Project identifier - containerId as well as UUID identifier is supported. (required)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+ Response Details
+ Status Code | Description | Response Headers |
+ 202 | Deletion process triggered | - |
+ 409 | Conflict | - |
+
+ */
+ public okhttp3.Call deleteProjectCall(@javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/v2/projects/{id}"
+ .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+
+ String[] localVarAuthNames = new String[] { };
+ return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call deleteProjectValidateBeforeCall(@javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException {
+ // verify the required parameter 'id' is set
+ if (id == null) {
+ throw new ApiException("Missing the required parameter 'id' when calling deleteProject(Async)");
+ }
+
+ return deleteProjectCall(id, _callback);
+
+ }
+
+ /**
+ * Delete Project
+ * Triggers the deletion of a project. - The request is synchronous, but the workflow-based deletion is asynchronous - Lifecycle state remains in DELETING, until workflow completes
+ * @param id Project identifier - containerId as well as UUID identifier is supported. (required)
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Response Details
+ Status Code | Description | Response Headers |
+ 202 | Deletion process triggered | - |
+ 409 | Conflict | - |
+
+ */
+ public void deleteProject(@javax.annotation.Nonnull String id) throws ApiException {
+ deleteProjectWithHttpInfo(id);
+ }
+
+ /**
+ * Delete Project
+ * Triggers the deletion of a project. - The request is synchronous, but the workflow-based deletion is asynchronous - Lifecycle state remains in DELETING, until workflow completes
+ * @param id Project identifier - containerId as well as UUID identifier is supported. (required)
+ * @return ApiResponse<Void>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Response Details
+ Status Code | Description | Response Headers |
+ 202 | Deletion process triggered | - |
+ 409 | Conflict | - |
+
+ */
+ public ApiResponse deleteProjectWithHttpInfo(@javax.annotation.Nonnull String id) throws ApiException {
+ okhttp3.Call localVarCall = deleteProjectValidateBeforeCall(id, null);
+ return localVarApiClient.execute(localVarCall);
+ }
+
+ /**
+ * Delete Project (asynchronously)
+ * Triggers the deletion of a project. - The request is synchronous, but the workflow-based deletion is asynchronous - Lifecycle state remains in DELETING, until workflow completes
+ * @param id Project identifier - containerId as well as UUID identifier is supported. (required)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+ Response Details
+ Status Code | Description | Response Headers |
+ 202 | Deletion process triggered | - |
+ 409 | Conflict | - |
+
+ */
+ public okhttp3.Call deleteProjectAsync(@javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = deleteProjectValidateBeforeCall(id, _callback);
+ localVarApiClient.executeAsync(localVarCall, _callback);
+ return localVarCall;
+ }
+ /**
+ * Build call for deleteProjectLabels
+ * @param containerId Project identifier - containerId as well as UUID identifier is supported. (required)
+ * @param keys Label name. (optional)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+ Response Details
+ Status Code | Description | Response Headers |
+ 202 | Labels removed | - |
+ 409 | Conflict | - |
+
+ */
+ public okhttp3.Call deleteProjectLabelsCall(@javax.annotation.Nonnull String containerId, @javax.annotation.Nullable List keys, final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/v2/projects/{containerId}/labels"
+ .replace("{" + "containerId" + "}", localVarApiClient.escapeString(containerId.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ if (keys != null) {
+ localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "keys", keys));
+ }
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+
+ String[] localVarAuthNames = new String[] { };
+ return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call deleteProjectLabelsValidateBeforeCall(@javax.annotation.Nonnull String containerId, @javax.annotation.Nullable List keys, final ApiCallback _callback) throws ApiException {
+ // verify the required parameter 'containerId' is set
+ if (containerId == null) {
+ throw new ApiException("Missing the required parameter 'containerId' when calling deleteProjectLabels(Async)");
+ }
+
+ return deleteProjectLabelsCall(containerId, keys, _callback);
+
+ }
+
+ /**
+ * Delete Project Labels
+ * Deletes all project labels by given keys. - Specific labels may be deleted by key(s) - If no key is specified, all labels will be deleted!
+ * @param containerId Project identifier - containerId as well as UUID identifier is supported. (required)
+ * @param keys Label name. (optional)
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Response Details
+ Status Code | Description | Response Headers |
+ 202 | Labels removed | - |
+ 409 | Conflict | - |
+
+ */
+ public void deleteProjectLabels(@javax.annotation.Nonnull String containerId, @javax.annotation.Nullable List keys) throws ApiException {
+ deleteProjectLabelsWithHttpInfo(containerId, keys);
+ }
+
+ /**
+ * Delete Project Labels
+ * Deletes all project labels by given keys. - Specific labels may be deleted by key(s) - If no key is specified, all labels will be deleted!
+ * @param containerId Project identifier - containerId as well as UUID identifier is supported. (required)
+ * @param keys Label name. (optional)
+ * @return ApiResponse<Void>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Response Details
+ Status Code | Description | Response Headers |
+ 202 | Labels removed | - |
+ 409 | Conflict | - |
+
+ */
+ public ApiResponse deleteProjectLabelsWithHttpInfo(@javax.annotation.Nonnull String containerId, @javax.annotation.Nullable List keys) throws ApiException {
+ okhttp3.Call localVarCall = deleteProjectLabelsValidateBeforeCall(containerId, keys, null);
+ return localVarApiClient.execute(localVarCall);
+ }
+
+ /**
+ * Delete Project Labels (asynchronously)
+ * Deletes all project labels by given keys. - Specific labels may be deleted by key(s) - If no key is specified, all labels will be deleted!
+ * @param containerId Project identifier - containerId as well as UUID identifier is supported. (required)
+ * @param keys Label name. (optional)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+ Response Details
+ Status Code | Description | Response Headers |
+ 202 | Labels removed | - |
+ 409 | Conflict | - |
+
+ */
+ public okhttp3.Call deleteProjectLabelsAsync(@javax.annotation.Nonnull String containerId, @javax.annotation.Nullable List keys, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = deleteProjectLabelsValidateBeforeCall(containerId, keys, _callback);
+ localVarApiClient.executeAsync(localVarCall, _callback);
+ return localVarCall;
+ }
+ /**
+ * Build call for getFolderDetails
+ * @param containerId Folder identifier - containerId as well as UUID identifier is supported. (required)
+ * @param includeParents (optional, default to false)
+ * @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 | - |
+ 403 | Forbidden | - |
+ 404 | Not Found | - |
+
+ */
+ public okhttp3.Call getFolderDetailsCall(@javax.annotation.Nonnull String containerId, @javax.annotation.Nullable Boolean includeParents, final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/v2/folders/{containerId}"
+ .replace("{" + "containerId" + "}", localVarApiClient.escapeString(containerId.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ if (includeParents != null) {
+ localVarQueryParams.addAll(localVarApiClient.parameterToPair("includeParents", includeParents));
+ }
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+
+ String[] localVarAuthNames = new String[] { };
+ return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call getFolderDetailsValidateBeforeCall(@javax.annotation.Nonnull String containerId, @javax.annotation.Nullable Boolean includeParents, final ApiCallback _callback) throws ApiException {
+ // verify the required parameter 'containerId' is set
+ if (containerId == null) {
+ throw new ApiException("Missing the required parameter 'containerId' when calling getFolderDetails(Async)");
+ }
+
+ return getFolderDetailsCall(containerId, includeParents, _callback);
+
+ }
+
+ /**
+ * Get Folder Details
+ * Returns all metadata for a specific folder.
+ * @param containerId Folder identifier - containerId as well as UUID identifier is supported. (required)
+ * @param includeParents (optional, default to false)
+ * @return GetFolderDetailsResponse
+ * @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 | - |
+ 403 | Forbidden | - |
+ 404 | Not Found | - |
+
+ */
+ public GetFolderDetailsResponse getFolderDetails(@javax.annotation.Nonnull String containerId, @javax.annotation.Nullable Boolean includeParents) throws ApiException {
+ ApiResponse localVarResp = getFolderDetailsWithHttpInfo(containerId, includeParents);
+ return localVarResp.getData();
+ }
+
+ /**
+ * Get Folder Details
+ * Returns all metadata for a specific folder.
+ * @param containerId Folder identifier - containerId as well as UUID identifier is supported. (required)
+ * @param includeParents (optional, default to false)
+ * @return ApiResponse<GetFolderDetailsResponse>
+ * @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 | - |
+ 403 | Forbidden | - |
+ 404 | Not Found | - |
+
+ */
+ public ApiResponse getFolderDetailsWithHttpInfo(@javax.annotation.Nonnull String containerId, @javax.annotation.Nullable Boolean includeParents) throws ApiException {
+ okhttp3.Call localVarCall = getFolderDetailsValidateBeforeCall(containerId, includeParents, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
+ }
+
+ /**
+ * Get Folder Details (asynchronously)
+ * Returns all metadata for a specific folder.
+ * @param containerId Folder identifier - containerId as well as UUID identifier is supported. (required)
+ * @param includeParents (optional, default to false)
+ * @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 | - |
+ 403 | Forbidden | - |
+ 404 | Not Found | - |
+
+ */
+ public okhttp3.Call getFolderDetailsAsync(@javax.annotation.Nonnull String containerId, @javax.annotation.Nullable Boolean includeParents, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = getFolderDetailsValidateBeforeCall(containerId, includeParents, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
+ }
+ /**
+ * Build call for getOrganization
+ * @param id Organization identifier - containerId as well as UUID identifier is supported. (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 | - |
+ 404 | Not Found | - |
+
+ */
+ public okhttp3.Call getOrganizationCall(@javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/v2/organizations/{id}"
+ .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+
+ String[] localVarAuthNames = new String[] { };
+ return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call getOrganizationValidateBeforeCall(@javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException {
+ // verify the required parameter 'id' is set
+ if (id == null) {
+ throw new ApiException("Missing the required parameter 'id' when calling getOrganization(Async)");
+ }
+
+ return getOrganizationCall(id, _callback);
+
+ }
+
+ /**
+ * Get Organization Details
+ * Returns the organization and its metadata.
+ * @param id Organization identifier - containerId as well as UUID identifier is supported. (required)
+ * @return OrganizationResponse
+ * @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 | - |
+ 404 | Not Found | - |
+
+ */
+ public OrganizationResponse getOrganization(@javax.annotation.Nonnull String id) throws ApiException {
+ ApiResponse localVarResp = getOrganizationWithHttpInfo(id);
+ return localVarResp.getData();
+ }
+
+ /**
+ * Get Organization Details
+ * Returns the organization and its metadata.
+ * @param id Organization identifier - containerId as well as UUID identifier is supported. (required)
+ * @return ApiResponse<OrganizationResponse>
+ * @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 | - |
+ 404 | Not Found | - |
+
+ */
+ public ApiResponse getOrganizationWithHttpInfo(@javax.annotation.Nonnull String id) throws ApiException {
+ okhttp3.Call localVarCall = getOrganizationValidateBeforeCall(id, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
+ }
+
+ /**
+ * Get Organization Details (asynchronously)
+ * Returns the organization and its metadata.
+ * @param id Organization identifier - containerId as well as UUID identifier is supported. (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 | - |
+ 404 | Not Found | - |
+
+ */
+ public okhttp3.Call getOrganizationAsync(@javax.annotation.Nonnull String id, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = getOrganizationValidateBeforeCall(id, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
+ }
+ /**
+ * Build call for getProject
+ * @param id Project identifier - containerId as well as UUID identifier is supported. (required)
+ * @param includeParents (optional, default to false)
+ * @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 | - |
+ 403 | Forbidden | - |
+ 404 | Not Found | - |
+
+ */
+ public okhttp3.Call getProjectCall(@javax.annotation.Nonnull String id, @javax.annotation.Nullable Boolean includeParents, final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/v2/projects/{id}"
+ .replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap