Skip to content

Commit 7887a3b

Browse files
Generate objectstorage
1 parent ad8d80d commit 7887a3b

9 files changed

Lines changed: 1111 additions & 7 deletions

File tree

‎services/objectstorage/oas_commit‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
404d55ddc0cbde39bb4bbc0a3792ea8a56cc58fa
1+
108892dfd80781dc159e5e5420c41ef480de9d84

‎services/objectstorage/src/main/java/cloud/stackit/sdk/objectstorage/v1api/JSON.java‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,9 @@ private static Class getClassByDiscriminator(
175175
gsonBuilder.registerTypeAdapterFactory(
176176
new cloud.stackit.sdk.objectstorage.v1api.model.SetDefaultRetentionPayload
177177
.CustomTypeAdapterFactory());
178+
gsonBuilder.registerTypeAdapterFactory(
179+
new cloud.stackit.sdk.objectstorage.v1api.model.UpdateServicePayload
180+
.CustomTypeAdapterFactory());
178181
gsonBuilder.registerTypeAdapterFactory(
179182
new cloud.stackit.sdk.objectstorage.v1api.model.ValidationError
180183
.CustomTypeAdapterFactory());

‎services/objectstorage/src/main/java/cloud/stackit/sdk/objectstorage/v1api/api/DefaultApi.java‎

Lines changed: 200 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
import cloud.stackit.sdk.objectstorage.v1api.model.ListCredentialsGroupsResponse;
3737
import cloud.stackit.sdk.objectstorage.v1api.model.ProjectStatus;
3838
import cloud.stackit.sdk.objectstorage.v1api.model.SetDefaultRetentionPayload;
39+
import cloud.stackit.sdk.objectstorage.v1api.model.UpdateServicePayload;
3940
import com.google.gson.reflect.TypeToken;
4041
import java.io.IOException;
4142
import java.lang.reflect.Type;
@@ -3939,4 +3940,203 @@ public okhttp3.Call setDefaultRetentionAsync(
39393940
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
39403941
return localVarCall;
39413942
}
3943+
3944+
/**
3945+
* Build call for updateService
3946+
*
3947+
* @param projectId STACKIT project ID (required)
3948+
* @param updateServicePayload (required)
3949+
* @param _callback Callback for upload/download progress
3950+
* @return Call to execute
3951+
* @throws ApiException If fail to serialize the request body object
3952+
* @http.response.details
3953+
* <table border="1">
3954+
* <caption>Response Details</caption>
3955+
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
3956+
* <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr>
3957+
* <tr><td> 401 </td><td> Unauthorized </td><td> - </td></tr>
3958+
* <tr><td> 403 </td><td> Forbidden </td><td> - </td></tr>
3959+
* <tr><td> 404 </td><td> Not Found </td><td> - </td></tr>
3960+
* <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr>
3961+
* <tr><td> 429 </td><td> Too Many Requests </td><td> - </td></tr>
3962+
* <tr><td> 500 </td><td> Internal Server Error </td><td> - </td></tr>
3963+
* </table>
3964+
*/
3965+
public okhttp3.Call updateServiceCall(
3966+
@javax.annotation.Nonnull String projectId,
3967+
@javax.annotation.Nonnull UpdateServicePayload updateServicePayload,
3968+
final ApiCallback _callback)
3969+
throws ApiException {
3970+
String basePath = null;
3971+
// Operation Servers
3972+
String[] localBasePaths = new String[] {};
3973+
3974+
// Determine Base Path to Use
3975+
if (localCustomBaseUrl != null) {
3976+
basePath = localCustomBaseUrl;
3977+
} else if (localBasePaths.length > 0) {
3978+
basePath = localBasePaths[localHostIndex];
3979+
} else {
3980+
basePath = null;
3981+
}
3982+
3983+
Object localVarPostBody = updateServicePayload;
3984+
3985+
// create path and map variables
3986+
String localVarPath =
3987+
"/v1/project/{projectId}"
3988+
.replace(
3989+
"{" + "projectId" + "}",
3990+
localVarApiClient.escapeString(projectId.toString()));
3991+
3992+
List<Pair> localVarQueryParams = new ArrayList<Pair>();
3993+
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
3994+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
3995+
Map<String, String> localVarCookieParams = new HashMap<String, String>();
3996+
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
3997+
3998+
final String[] localVarAccepts = {"application/json"};
3999+
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
4000+
if (localVarAccept != null) {
4001+
localVarHeaderParams.put("Accept", localVarAccept);
4002+
}
4003+
4004+
final String[] localVarContentTypes = {"application/json"};
4005+
final String localVarContentType =
4006+
localVarApiClient.selectHeaderContentType(localVarContentTypes);
4007+
if (localVarContentType != null) {
4008+
localVarHeaderParams.put("Content-Type", localVarContentType);
4009+
}
4010+
4011+
String[] localVarAuthNames = new String[] {};
4012+
return localVarApiClient.buildCall(
4013+
basePath,
4014+
localVarPath,
4015+
"PUT",
4016+
localVarQueryParams,
4017+
localVarCollectionQueryParams,
4018+
localVarPostBody,
4019+
localVarHeaderParams,
4020+
localVarCookieParams,
4021+
localVarFormParams,
4022+
localVarAuthNames,
4023+
_callback);
4024+
}
4025+
4026+
@SuppressWarnings("rawtypes")
4027+
private okhttp3.Call updateServiceValidateBeforeCall(
4028+
@javax.annotation.Nonnull String projectId,
4029+
@javax.annotation.Nonnull UpdateServicePayload updateServicePayload,
4030+
final ApiCallback _callback)
4031+
throws ApiException {
4032+
// verify the required parameter 'projectId' is set
4033+
if (projectId == null) {
4034+
throw new ApiException(
4035+
"Missing the required parameter 'projectId' when calling updateService(Async)");
4036+
}
4037+
4038+
// verify the required parameter 'updateServicePayload' is set
4039+
if (updateServicePayload == null) {
4040+
throw new ApiException(
4041+
"Missing the required parameter 'updateServicePayload' when calling updateService(Async)");
4042+
}
4043+
4044+
return updateServiceCall(projectId, updateServicePayload, _callback);
4045+
}
4046+
4047+
/**
4048+
* Update Project Update project details.
4049+
*
4050+
* @param projectId STACKIT project ID (required)
4051+
* @param updateServicePayload (required)
4052+
* @return ProjectStatus
4053+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the
4054+
* response body
4055+
* @http.response.details
4056+
* <table border="1">
4057+
* <caption>Response Details</caption>
4058+
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
4059+
* <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr>
4060+
* <tr><td> 401 </td><td> Unauthorized </td><td> - </td></tr>
4061+
* <tr><td> 403 </td><td> Forbidden </td><td> - </td></tr>
4062+
* <tr><td> 404 </td><td> Not Found </td><td> - </td></tr>
4063+
* <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr>
4064+
* <tr><td> 429 </td><td> Too Many Requests </td><td> - </td></tr>
4065+
* <tr><td> 500 </td><td> Internal Server Error </td><td> - </td></tr>
4066+
* </table>
4067+
*/
4068+
public ProjectStatus updateService(
4069+
@javax.annotation.Nonnull String projectId,
4070+
@javax.annotation.Nonnull UpdateServicePayload updateServicePayload)
4071+
throws ApiException {
4072+
ApiResponse<ProjectStatus> localVarResp =
4073+
updateServiceWithHttpInfo(projectId, updateServicePayload);
4074+
return localVarResp.getData();
4075+
}
4076+
4077+
/**
4078+
* Update Project Update project details.
4079+
*
4080+
* @param projectId STACKIT project ID (required)
4081+
* @param updateServicePayload (required)
4082+
* @return ApiResponse&lt;ProjectStatus&gt;
4083+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the
4084+
* response body
4085+
* @http.response.details
4086+
* <table border="1">
4087+
* <caption>Response Details</caption>
4088+
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
4089+
* <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr>
4090+
* <tr><td> 401 </td><td> Unauthorized </td><td> - </td></tr>
4091+
* <tr><td> 403 </td><td> Forbidden </td><td> - </td></tr>
4092+
* <tr><td> 404 </td><td> Not Found </td><td> - </td></tr>
4093+
* <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr>
4094+
* <tr><td> 429 </td><td> Too Many Requests </td><td> - </td></tr>
4095+
* <tr><td> 500 </td><td> Internal Server Error </td><td> - </td></tr>
4096+
* </table>
4097+
*/
4098+
public ApiResponse<ProjectStatus> updateServiceWithHttpInfo(
4099+
@javax.annotation.Nonnull String projectId,
4100+
@javax.annotation.Nonnull UpdateServicePayload updateServicePayload)
4101+
throws ApiException {
4102+
okhttp3.Call localVarCall =
4103+
updateServiceValidateBeforeCall(projectId, updateServicePayload, null);
4104+
Type localVarReturnType = new TypeToken<ProjectStatus>() {}.getType();
4105+
return localVarApiClient.execute(localVarCall, localVarReturnType);
4106+
}
4107+
4108+
/**
4109+
* Update Project (asynchronously) Update project details.
4110+
*
4111+
* @param projectId STACKIT project ID (required)
4112+
* @param updateServicePayload (required)
4113+
* @param _callback The callback to be executed when the API call finishes
4114+
* @return The request call
4115+
* @throws ApiException If fail to process the API call, e.g. serializing the request body
4116+
* object
4117+
* @http.response.details
4118+
* <table border="1">
4119+
* <caption>Response Details</caption>
4120+
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
4121+
* <tr><td> 200 </td><td> Successful Response </td><td> - </td></tr>
4122+
* <tr><td> 401 </td><td> Unauthorized </td><td> - </td></tr>
4123+
* <tr><td> 403 </td><td> Forbidden </td><td> - </td></tr>
4124+
* <tr><td> 404 </td><td> Not Found </td><td> - </td></tr>
4125+
* <tr><td> 422 </td><td> Validation Error </td><td> - </td></tr>
4126+
* <tr><td> 429 </td><td> Too Many Requests </td><td> - </td></tr>
4127+
* <tr><td> 500 </td><td> Internal Server Error </td><td> - </td></tr>
4128+
* </table>
4129+
*/
4130+
public okhttp3.Call updateServiceAsync(
4131+
@javax.annotation.Nonnull String projectId,
4132+
@javax.annotation.Nonnull UpdateServicePayload updateServicePayload,
4133+
final ApiCallback<ProjectStatus> _callback)
4134+
throws ApiException {
4135+
4136+
okhttp3.Call localVarCall =
4137+
updateServiceValidateBeforeCall(projectId, updateServicePayload, _callback);
4138+
Type localVarReturnType = new TypeToken<ProjectStatus>() {}.getType();
4139+
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
4140+
return localVarCall;
4141+
}
39424142
}

‎services/objectstorage/src/main/java/cloud/stackit/sdk/objectstorage/v1api/model/ProjectStatus.java‎

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@
3333
/** ProjectStatus */
3434
@javax.annotation.Generated(value = "JavaGenerator", comments = "Generator version: 7.19.0")
3535
public class ProjectStatus {
36+
public static final String SERIALIZED_NAME_LABELS = "labels";
37+
38+
@SerializedName(SERIALIZED_NAME_LABELS)
39+
@javax.annotation.Nullable private Map<String, String> labels = new HashMap<>();
40+
3641
public static final String SERIALIZED_NAME_PROJECT = "project";
3742

3843
@SerializedName(SERIALIZED_NAME_PROJECT)
@@ -47,6 +52,32 @@ public class ProjectStatus {
4752

4853
public ProjectStatus() {}
4954

55+
public ProjectStatus labels(@javax.annotation.Nullable Map<String, String> labels) {
56+
this.labels = labels;
57+
return this;
58+
}
59+
60+
public ProjectStatus putLabelsItem(String key, String labelsItem) {
61+
if (this.labels == null) {
62+
this.labels = new HashMap<>();
63+
}
64+
this.labels.put(key, labelsItem);
65+
return this;
66+
}
67+
68+
/**
69+
* Project labels
70+
*
71+
* @return labels
72+
*/
73+
@javax.annotation.Nullable public Map<String, String> getLabels() {
74+
return labels;
75+
}
76+
77+
public void setLabels(@javax.annotation.Nullable Map<String, String> labels) {
78+
this.labels = labels;
79+
}
80+
5081
public ProjectStatus project(@javax.annotation.Nonnull String project) {
5182
this.project = project;
5283
return this;
@@ -138,20 +169,22 @@ public boolean equals(Object o) {
138169
return false;
139170
}
140171
ProjectStatus projectStatus = (ProjectStatus) o;
141-
return Objects.equals(this.project, projectStatus.project)
172+
return Objects.equals(this.labels, projectStatus.labels)
173+
&& Objects.equals(this.project, projectStatus.project)
142174
&& Objects.equals(this.scope, projectStatus.scope)
143175
&& Objects.equals(this.additionalProperties, projectStatus.additionalProperties);
144176
}
145177

146178
@Override
147179
public int hashCode() {
148-
return Objects.hash(project, scope, additionalProperties);
180+
return Objects.hash(labels, project, scope, additionalProperties);
149181
}
150182

151183
@Override
152184
public String toString() {
153185
StringBuilder sb = new StringBuilder();
154186
sb.append("class ProjectStatus {\n");
187+
sb.append(" labels: ").append(toIndentedString(labels)).append("\n");
155188
sb.append(" project: ").append(toIndentedString(project)).append("\n");
156189
sb.append(" scope: ").append(toIndentedString(scope)).append("\n");
157190
sb.append(" additionalProperties: ")
@@ -177,7 +210,7 @@ private String toIndentedString(Object o) {
177210

178211
static {
179212
// a set of all properties/fields (JSON key names)
180-
openapiFields = new HashSet<String>(Arrays.asList("project", "scope"));
213+
openapiFields = new HashSet<String>(Arrays.asList("labels", "project", "scope"));
181214

182215
// a set of required properties/fields (JSON key names)
183216
openapiRequiredFields = new HashSet<String>(Arrays.asList("project", "scope"));

0 commit comments

Comments
 (0)