Skip to content

Commit e3ebb8c

Browse files
author
BitsAdmin
committed
Merge branch 'organization-Java-2022-01-01-online-1186-2025_05_21_17_09_06' into 'integration_2025-05-22_910511046914'
feat: [development task] organization-1186-Java (1243988) See merge request iaasng/volcengine-java-sdk!491
2 parents f4f692e + f2b9b31 commit e3ebb8c

File tree

6 files changed

+905
-0
lines changed

6 files changed

+905
-0
lines changed

volcengine-java-sdk-organization/src/main/java/com/volcengine/organization/OrganizationApi.java

Lines changed: 252 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,10 @@
109109
import com.volcengine.organization.model.RemoveAccountResponse;
110110
import com.volcengine.organization.model.RetryChangeAccountSecureContactInfoRequest;
111111
import com.volcengine.organization.model.RetryChangeAccountSecureContactInfoResponse;
112+
import com.volcengine.organization.model.TagResourcesRequest;
113+
import com.volcengine.organization.model.TagResourcesResponse;
114+
import com.volcengine.organization.model.UntagResourcesRequest;
115+
import com.volcengine.organization.model.UntagResourcesResponse;
112116
import com.volcengine.organization.model.UpdateAccountRequest;
113117
import com.volcengine.organization.model.UpdateAccountResponse;
114118
import com.volcengine.organization.model.UpdateOrganizationalUnitRequest;
@@ -5225,6 +5229,254 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
52255229
apiClient.executeAsync(call, localVarReturnType, callback);
52265230
return call;
52275231
}
5232+
/**
5233+
* Build call for tagResources
5234+
* @param body (required)
5235+
* @param progressListener Progress listener
5236+
* @param progressRequestListener Progress request listener
5237+
* @return Call to execute
5238+
* @throws ApiException If fail to serialize the request body object
5239+
*/
5240+
public com.squareup.okhttp.Call tagResourcesCall(TagResourcesRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
5241+
Object localVarPostBody = body;
5242+
5243+
// create path and map variables
5244+
String localVarPath = "/TagResources/2022-01-01/organization/get/text_plain/";
5245+
5246+
List<Pair> localVarQueryParams = new ArrayList<Pair>();
5247+
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
5248+
5249+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
5250+
5251+
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
5252+
5253+
final String[] localVarAccepts = {
5254+
"application/json"
5255+
};
5256+
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
5257+
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
5258+
5259+
final String[] localVarContentTypes = {
5260+
"text/plain"
5261+
};
5262+
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
5263+
localVarHeaderParams.put("Content-Type", localVarContentType);
5264+
5265+
if(progressListener != null) {
5266+
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
5267+
@Override
5268+
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
5269+
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
5270+
return originalResponse.newBuilder()
5271+
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
5272+
.build();
5273+
}
5274+
});
5275+
}
5276+
5277+
String[] localVarAuthNames = new String[] { "volcengineSign" };
5278+
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
5279+
}
5280+
5281+
@SuppressWarnings("rawtypes")
5282+
private com.squareup.okhttp.Call tagResourcesValidateBeforeCall(TagResourcesRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
5283+
// verify the required parameter 'body' is set
5284+
if (body == null) {
5285+
throw new ApiException("Missing the required parameter 'body' when calling tagResources(Async)");
5286+
}
5287+
5288+
com.squareup.okhttp.Call call = tagResourcesCall(body, progressListener, progressRequestListener);
5289+
return call;
5290+
5291+
5292+
5293+
5294+
5295+
}
5296+
5297+
/**
5298+
*
5299+
*
5300+
* @param body (required)
5301+
* @return TagResourcesResponse
5302+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
5303+
*/
5304+
public TagResourcesResponse tagResources(TagResourcesRequest body) throws ApiException {
5305+
ApiResponse<TagResourcesResponse> resp = tagResourcesWithHttpInfo(body);
5306+
return resp.getData();
5307+
}
5308+
5309+
/**
5310+
*
5311+
*
5312+
* @param body (required)
5313+
* @return ApiResponse&lt;TagResourcesResponse&gt;
5314+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
5315+
*/
5316+
public ApiResponse<TagResourcesResponse> tagResourcesWithHttpInfo( @NotNull TagResourcesRequest body) throws ApiException {
5317+
com.squareup.okhttp.Call call = tagResourcesValidateBeforeCall(body, null, null);
5318+
Type localVarReturnType = new TypeToken<TagResourcesResponse>(){}.getType();
5319+
return apiClient.execute(call, localVarReturnType);
5320+
}
5321+
5322+
/**
5323+
* (asynchronously)
5324+
*
5325+
* @param body (required)
5326+
* @param callback The callback to be executed when the API call finishes
5327+
* @return The request call
5328+
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
5329+
*/
5330+
public com.squareup.okhttp.Call tagResourcesAsync(TagResourcesRequest body, final ApiCallback<TagResourcesResponse> callback) throws ApiException {
5331+
5332+
ProgressResponseBody.ProgressListener progressListener = null;
5333+
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
5334+
5335+
if (callback != null) {
5336+
progressListener = new ProgressResponseBody.ProgressListener() {
5337+
@Override
5338+
public void update(long bytesRead, long contentLength, boolean done) {
5339+
callback.onDownloadProgress(bytesRead, contentLength, done);
5340+
}
5341+
};
5342+
5343+
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
5344+
@Override
5345+
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
5346+
callback.onUploadProgress(bytesWritten, contentLength, done);
5347+
}
5348+
};
5349+
}
5350+
5351+
com.squareup.okhttp.Call call = tagResourcesValidateBeforeCall(body, progressListener, progressRequestListener);
5352+
Type localVarReturnType = new TypeToken<TagResourcesResponse>(){}.getType();
5353+
apiClient.executeAsync(call, localVarReturnType, callback);
5354+
return call;
5355+
}
5356+
/**
5357+
* Build call for untagResources
5358+
* @param body (required)
5359+
* @param progressListener Progress listener
5360+
* @param progressRequestListener Progress request listener
5361+
* @return Call to execute
5362+
* @throws ApiException If fail to serialize the request body object
5363+
*/
5364+
public com.squareup.okhttp.Call untagResourcesCall(UntagResourcesRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
5365+
Object localVarPostBody = body;
5366+
5367+
// create path and map variables
5368+
String localVarPath = "/UntagResources/2022-01-01/organization/get/text_plain/";
5369+
5370+
List<Pair> localVarQueryParams = new ArrayList<Pair>();
5371+
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
5372+
5373+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
5374+
5375+
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
5376+
5377+
final String[] localVarAccepts = {
5378+
"application/json"
5379+
};
5380+
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
5381+
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
5382+
5383+
final String[] localVarContentTypes = {
5384+
"text/plain"
5385+
};
5386+
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
5387+
localVarHeaderParams.put("Content-Type", localVarContentType);
5388+
5389+
if(progressListener != null) {
5390+
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
5391+
@Override
5392+
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
5393+
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
5394+
return originalResponse.newBuilder()
5395+
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
5396+
.build();
5397+
}
5398+
});
5399+
}
5400+
5401+
String[] localVarAuthNames = new String[] { "volcengineSign" };
5402+
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
5403+
}
5404+
5405+
@SuppressWarnings("rawtypes")
5406+
private com.squareup.okhttp.Call untagResourcesValidateBeforeCall(UntagResourcesRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
5407+
// verify the required parameter 'body' is set
5408+
if (body == null) {
5409+
throw new ApiException("Missing the required parameter 'body' when calling untagResources(Async)");
5410+
}
5411+
5412+
com.squareup.okhttp.Call call = untagResourcesCall(body, progressListener, progressRequestListener);
5413+
return call;
5414+
5415+
5416+
5417+
5418+
5419+
}
5420+
5421+
/**
5422+
*
5423+
*
5424+
* @param body (required)
5425+
* @return UntagResourcesResponse
5426+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
5427+
*/
5428+
public UntagResourcesResponse untagResources(UntagResourcesRequest body) throws ApiException {
5429+
ApiResponse<UntagResourcesResponse> resp = untagResourcesWithHttpInfo(body);
5430+
return resp.getData();
5431+
}
5432+
5433+
/**
5434+
*
5435+
*
5436+
* @param body (required)
5437+
* @return ApiResponse&lt;UntagResourcesResponse&gt;
5438+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
5439+
*/
5440+
public ApiResponse<UntagResourcesResponse> untagResourcesWithHttpInfo( @NotNull UntagResourcesRequest body) throws ApiException {
5441+
com.squareup.okhttp.Call call = untagResourcesValidateBeforeCall(body, null, null);
5442+
Type localVarReturnType = new TypeToken<UntagResourcesResponse>(){}.getType();
5443+
return apiClient.execute(call, localVarReturnType);
5444+
}
5445+
5446+
/**
5447+
* (asynchronously)
5448+
*
5449+
* @param body (required)
5450+
* @param callback The callback to be executed when the API call finishes
5451+
* @return The request call
5452+
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
5453+
*/
5454+
public com.squareup.okhttp.Call untagResourcesAsync(UntagResourcesRequest body, final ApiCallback<UntagResourcesResponse> callback) throws ApiException {
5455+
5456+
ProgressResponseBody.ProgressListener progressListener = null;
5457+
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
5458+
5459+
if (callback != null) {
5460+
progressListener = new ProgressResponseBody.ProgressListener() {
5461+
@Override
5462+
public void update(long bytesRead, long contentLength, boolean done) {
5463+
callback.onDownloadProgress(bytesRead, contentLength, done);
5464+
}
5465+
};
5466+
5467+
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
5468+
@Override
5469+
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
5470+
callback.onUploadProgress(bytesWritten, contentLength, done);
5471+
}
5472+
};
5473+
}
5474+
5475+
com.squareup.okhttp.Call call = untagResourcesValidateBeforeCall(body, progressListener, progressRequestListener);
5476+
Type localVarReturnType = new TypeToken<UntagResourcesResponse>(){}.getType();
5477+
apiClient.executeAsync(call, localVarReturnType, callback);
5478+
return call;
5479+
}
52285480
/**
52295481
* Build call for updateAccount
52305482
* @param body (required)
Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
/*
2+
* organization
3+
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
4+
*
5+
* OpenAPI spec version: common-version
6+
*
7+
*
8+
* NOTE: This class is auto generated by the swagger code generator program.
9+
* https://github.com/swagger-api/swagger-codegen.git
10+
* Do not edit the class manually.
11+
*/
12+
13+
package com.volcengine.organization.model;
14+
15+
import java.util.Objects;
16+
import java.util.Arrays;
17+
import com.google.gson.TypeAdapter;
18+
import com.google.gson.annotations.JsonAdapter;
19+
import com.google.gson.annotations.SerializedName;
20+
import com.google.gson.stream.JsonReader;
21+
import com.google.gson.stream.JsonWriter;
22+
import io.swagger.v3.oas.annotations.media.Schema;
23+
import java.io.IOException;
24+
import javax.validation.constraints.*;
25+
import javax.validation.Valid;
26+
/**
27+
* TagForTagResourcesInput
28+
*/
29+
30+
31+
32+
public class TagForTagResourcesInput {
33+
@SerializedName("Key")
34+
private String key = null;
35+
36+
@SerializedName("Value")
37+
private String value = null;
38+
39+
public TagForTagResourcesInput key(String key) {
40+
this.key = key;
41+
return this;
42+
}
43+
44+
/**
45+
* Get key
46+
* @return key
47+
**/
48+
@NotNull
49+
@Size(min=1,max=128) @Schema(required = true, description = "")
50+
public String getKey() {
51+
return key;
52+
}
53+
54+
public void setKey(String key) {
55+
this.key = key;
56+
}
57+
58+
public TagForTagResourcesInput value(String value) {
59+
this.value = value;
60+
return this;
61+
}
62+
63+
/**
64+
* Get value
65+
* @return value
66+
**/
67+
@NotNull
68+
@Size(max=256) @Schema(required = true, description = "")
69+
public String getValue() {
70+
return value;
71+
}
72+
73+
public void setValue(String value) {
74+
this.value = value;
75+
}
76+
77+
78+
@Override
79+
public boolean equals(java.lang.Object o) {
80+
if (this == o) {
81+
return true;
82+
}
83+
if (o == null || getClass() != o.getClass()) {
84+
return false;
85+
}
86+
TagForTagResourcesInput tagForTagResourcesInput = (TagForTagResourcesInput) o;
87+
return Objects.equals(this.key, tagForTagResourcesInput.key) &&
88+
Objects.equals(this.value, tagForTagResourcesInput.value);
89+
}
90+
91+
@Override
92+
public int hashCode() {
93+
return Objects.hash(key, value);
94+
}
95+
96+
97+
@Override
98+
public String toString() {
99+
StringBuilder sb = new StringBuilder();
100+
sb.append("class TagForTagResourcesInput {\n");
101+
102+
sb.append(" key: ").append(toIndentedString(key)).append("\n");
103+
sb.append(" value: ").append(toIndentedString(value)).append("\n");
104+
sb.append("}");
105+
return sb.toString();
106+
}
107+
108+
/**
109+
* Convert the given object to string with each line indented by 4 spaces
110+
* (except the first line).
111+
*/
112+
private String toIndentedString(java.lang.Object o) {
113+
if (o == null) {
114+
return "null";
115+
}
116+
return o.toString().replace("\n", "\n ");
117+
}
118+
119+
}

0 commit comments

Comments
 (0)