|
36 | 36 | import cloud.stackit.sdk.objectstorage.v1api.model.ListCredentialsGroupsResponse; |
37 | 37 | import cloud.stackit.sdk.objectstorage.v1api.model.ProjectStatus; |
38 | 38 | import cloud.stackit.sdk.objectstorage.v1api.model.SetDefaultRetentionPayload; |
| 39 | +import cloud.stackit.sdk.objectstorage.v1api.model.UpdateServicePayload; |
39 | 40 | import com.google.gson.reflect.TypeToken; |
40 | 41 | import java.io.IOException; |
41 | 42 | import java.lang.reflect.Type; |
@@ -3939,4 +3940,203 @@ public okhttp3.Call setDefaultRetentionAsync( |
3939 | 3940 | localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); |
3940 | 3941 | return localVarCall; |
3941 | 3942 | } |
| 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<ProjectStatus> |
| 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 | + } |
3942 | 4142 | } |
0 commit comments