Skip to content

Commit 381e4b9

Browse files
author
BitsAdmin
committed
Merge branch 'organization-Java-2022-01-01-online-958-2025_02_06_22_46_20' into 'integration_2025-03-06_777203837442'
feat: [development task] organization-958-Java (1059816) See merge request iaasng/volcengine-java-sdk!396
2 parents cca142e + 4e3aed9 commit 381e4b9

File tree

103 files changed

+1447
-6
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+1447
-6
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
@@ -89,8 +89,12 @@
8989
import com.volcengine.organization.model.ListOrganizationalUnitsForParentResponse;
9090
import com.volcengine.organization.model.ListOrganizationalUnitsRequest;
9191
import com.volcengine.organization.model.ListOrganizationalUnitsResponse;
92+
import com.volcengine.organization.model.ListPoliciesForTargetRequest;
93+
import com.volcengine.organization.model.ListPoliciesForTargetResponse;
9294
import com.volcengine.organization.model.ListServiceControlPoliciesRequest;
9395
import com.volcengine.organization.model.ListServiceControlPoliciesResponse;
96+
import com.volcengine.organization.model.ListTargetsForPolicyRequest;
97+
import com.volcengine.organization.model.ListTargetsForPolicyResponse;
9498
import com.volcengine.organization.model.MoveAccountRequest;
9599
import com.volcengine.organization.model.MoveAccountResponse;
96100
import com.volcengine.organization.model.QuitOrganizationRequest;
@@ -3981,6 +3985,130 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
39813985
apiClient.executeAsync(call, localVarReturnType, callback);
39823986
return call;
39833987
}
3988+
/**
3989+
* Build call for listPoliciesForTarget
3990+
* @param body (required)
3991+
* @param progressListener Progress listener
3992+
* @param progressRequestListener Progress request listener
3993+
* @return Call to execute
3994+
* @throws ApiException If fail to serialize the request body object
3995+
*/
3996+
public com.squareup.okhttp.Call listPoliciesForTargetCall(ListPoliciesForTargetRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
3997+
Object localVarPostBody = body;
3998+
3999+
// create path and map variables
4000+
String localVarPath = "/ListPoliciesForTarget/2022-01-01/organization/post/application_json/";
4001+
4002+
List<Pair> localVarQueryParams = new ArrayList<Pair>();
4003+
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
4004+
4005+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
4006+
4007+
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
4008+
4009+
final String[] localVarAccepts = {
4010+
"application/json"
4011+
};
4012+
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
4013+
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
4014+
4015+
final String[] localVarContentTypes = {
4016+
"text/plain"
4017+
};
4018+
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
4019+
localVarHeaderParams.put("Content-Type", localVarContentType);
4020+
4021+
if(progressListener != null) {
4022+
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
4023+
@Override
4024+
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
4025+
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
4026+
return originalResponse.newBuilder()
4027+
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
4028+
.build();
4029+
}
4030+
});
4031+
}
4032+
4033+
String[] localVarAuthNames = new String[] { "volcengineSign" };
4034+
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
4035+
}
4036+
4037+
@SuppressWarnings("rawtypes")
4038+
private com.squareup.okhttp.Call listPoliciesForTargetValidateBeforeCall(ListPoliciesForTargetRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
4039+
// verify the required parameter 'body' is set
4040+
if (body == null) {
4041+
throw new ApiException("Missing the required parameter 'body' when calling listPoliciesForTarget(Async)");
4042+
}
4043+
4044+
com.squareup.okhttp.Call call = listPoliciesForTargetCall(body, progressListener, progressRequestListener);
4045+
return call;
4046+
4047+
4048+
4049+
4050+
4051+
}
4052+
4053+
/**
4054+
*
4055+
*
4056+
* @param body (required)
4057+
* @return ListPoliciesForTargetResponse
4058+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
4059+
*/
4060+
public ListPoliciesForTargetResponse listPoliciesForTarget(ListPoliciesForTargetRequest body) throws ApiException {
4061+
ApiResponse<ListPoliciesForTargetResponse> resp = listPoliciesForTargetWithHttpInfo(body);
4062+
return resp.getData();
4063+
}
4064+
4065+
/**
4066+
*
4067+
*
4068+
* @param body (required)
4069+
* @return ApiResponse&lt;ListPoliciesForTargetResponse&gt;
4070+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
4071+
*/
4072+
public ApiResponse<ListPoliciesForTargetResponse> listPoliciesForTargetWithHttpInfo( @NotNull ListPoliciesForTargetRequest body) throws ApiException {
4073+
com.squareup.okhttp.Call call = listPoliciesForTargetValidateBeforeCall(body, null, null);
4074+
Type localVarReturnType = new TypeToken<ListPoliciesForTargetResponse>(){}.getType();
4075+
return apiClient.execute(call, localVarReturnType);
4076+
}
4077+
4078+
/**
4079+
* (asynchronously)
4080+
*
4081+
* @param body (required)
4082+
* @param callback The callback to be executed when the API call finishes
4083+
* @return The request call
4084+
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
4085+
*/
4086+
public com.squareup.okhttp.Call listPoliciesForTargetAsync(ListPoliciesForTargetRequest body, final ApiCallback<ListPoliciesForTargetResponse> callback) throws ApiException {
4087+
4088+
ProgressResponseBody.ProgressListener progressListener = null;
4089+
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
4090+
4091+
if (callback != null) {
4092+
progressListener = new ProgressResponseBody.ProgressListener() {
4093+
@Override
4094+
public void update(long bytesRead, long contentLength, boolean done) {
4095+
callback.onDownloadProgress(bytesRead, contentLength, done);
4096+
}
4097+
};
4098+
4099+
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
4100+
@Override
4101+
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
4102+
callback.onUploadProgress(bytesWritten, contentLength, done);
4103+
}
4104+
};
4105+
}
4106+
4107+
com.squareup.okhttp.Call call = listPoliciesForTargetValidateBeforeCall(body, progressListener, progressRequestListener);
4108+
Type localVarReturnType = new TypeToken<ListPoliciesForTargetResponse>(){}.getType();
4109+
apiClient.executeAsync(call, localVarReturnType, callback);
4110+
return call;
4111+
}
39844112
/**
39854113
* Build call for listServiceControlPolicies
39864114
* @param body (required)
@@ -4105,6 +4233,130 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
41054233
apiClient.executeAsync(call, localVarReturnType, callback);
41064234
return call;
41074235
}
4236+
/**
4237+
* Build call for listTargetsForPolicy
4238+
* @param body (required)
4239+
* @param progressListener Progress listener
4240+
* @param progressRequestListener Progress request listener
4241+
* @return Call to execute
4242+
* @throws ApiException If fail to serialize the request body object
4243+
*/
4244+
public com.squareup.okhttp.Call listTargetsForPolicyCall(ListTargetsForPolicyRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
4245+
Object localVarPostBody = body;
4246+
4247+
// create path and map variables
4248+
String localVarPath = "/ListTargetsForPolicy/2022-01-01/organization/post/application_json/";
4249+
4250+
List<Pair> localVarQueryParams = new ArrayList<Pair>();
4251+
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
4252+
4253+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
4254+
4255+
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
4256+
4257+
final String[] localVarAccepts = {
4258+
"application/json"
4259+
};
4260+
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
4261+
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
4262+
4263+
final String[] localVarContentTypes = {
4264+
"text/plain"
4265+
};
4266+
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
4267+
localVarHeaderParams.put("Content-Type", localVarContentType);
4268+
4269+
if(progressListener != null) {
4270+
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
4271+
@Override
4272+
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
4273+
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
4274+
return originalResponse.newBuilder()
4275+
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
4276+
.build();
4277+
}
4278+
});
4279+
}
4280+
4281+
String[] localVarAuthNames = new String[] { "volcengineSign" };
4282+
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
4283+
}
4284+
4285+
@SuppressWarnings("rawtypes")
4286+
private com.squareup.okhttp.Call listTargetsForPolicyValidateBeforeCall(ListTargetsForPolicyRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
4287+
// verify the required parameter 'body' is set
4288+
if (body == null) {
4289+
throw new ApiException("Missing the required parameter 'body' when calling listTargetsForPolicy(Async)");
4290+
}
4291+
4292+
com.squareup.okhttp.Call call = listTargetsForPolicyCall(body, progressListener, progressRequestListener);
4293+
return call;
4294+
4295+
4296+
4297+
4298+
4299+
}
4300+
4301+
/**
4302+
*
4303+
*
4304+
* @param body (required)
4305+
* @return ListTargetsForPolicyResponse
4306+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
4307+
*/
4308+
public ListTargetsForPolicyResponse listTargetsForPolicy(ListTargetsForPolicyRequest body) throws ApiException {
4309+
ApiResponse<ListTargetsForPolicyResponse> resp = listTargetsForPolicyWithHttpInfo(body);
4310+
return resp.getData();
4311+
}
4312+
4313+
/**
4314+
*
4315+
*
4316+
* @param body (required)
4317+
* @return ApiResponse&lt;ListTargetsForPolicyResponse&gt;
4318+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
4319+
*/
4320+
public ApiResponse<ListTargetsForPolicyResponse> listTargetsForPolicyWithHttpInfo( @NotNull ListTargetsForPolicyRequest body) throws ApiException {
4321+
com.squareup.okhttp.Call call = listTargetsForPolicyValidateBeforeCall(body, null, null);
4322+
Type localVarReturnType = new TypeToken<ListTargetsForPolicyResponse>(){}.getType();
4323+
return apiClient.execute(call, localVarReturnType);
4324+
}
4325+
4326+
/**
4327+
* (asynchronously)
4328+
*
4329+
* @param body (required)
4330+
* @param callback The callback to be executed when the API call finishes
4331+
* @return The request call
4332+
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
4333+
*/
4334+
public com.squareup.okhttp.Call listTargetsForPolicyAsync(ListTargetsForPolicyRequest body, final ApiCallback<ListTargetsForPolicyResponse> callback) throws ApiException {
4335+
4336+
ProgressResponseBody.ProgressListener progressListener = null;
4337+
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
4338+
4339+
if (callback != null) {
4340+
progressListener = new ProgressResponseBody.ProgressListener() {
4341+
@Override
4342+
public void update(long bytesRead, long contentLength, boolean done) {
4343+
callback.onDownloadProgress(bytesRead, contentLength, done);
4344+
}
4345+
};
4346+
4347+
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
4348+
@Override
4349+
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
4350+
callback.onUploadProgress(bytesWritten, contentLength, done);
4351+
}
4352+
};
4353+
}
4354+
4355+
com.squareup.okhttp.Call call = listTargetsForPolicyValidateBeforeCall(body, progressListener, progressRequestListener);
4356+
Type localVarReturnType = new TypeToken<ListTargetsForPolicyResponse>(){}.getType();
4357+
apiClient.executeAsync(call, localVarReturnType, callback);
4358+
return call;
4359+
}
41084360
/**
41094361
* Build call for moveAccount
41104362
* @param body (required)

volcengine-java-sdk-organization/src/main/java/com/volcengine/organization/model/AcceptInvitationRequest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
*/
2929

3030

31+
3132
public class AcceptInvitationRequest {
3233
@SerializedName("InviteId")
3334
private String inviteId = null;

volcengine-java-sdk-organization/src/main/java/com/volcengine/organization/model/AcceptInvitationResponse.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
*/
2222

2323

24+
2425
public class AcceptInvitationResponse extends com.volcengine.model.AbstractResponse {
2526

2627
@Override

volcengine-java-sdk-organization/src/main/java/com/volcengine/organization/model/AcceptQuitApplicationRequest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
*/
2929

3030

31+
3132
public class AcceptQuitApplicationRequest {
3233
@SerializedName("AccountId")
3334
private String accountId = null;

volcengine-java-sdk-organization/src/main/java/com/volcengine/organization/model/AcceptQuitApplicationResponse.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
*/
2222

2323

24+
2425
public class AcceptQuitApplicationResponse extends com.volcengine.model.AbstractResponse {
2526

2627
@Override

volcengine-java-sdk-organization/src/main/java/com/volcengine/organization/model/AccountForDescribeAccountOutput.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
*/
2929

3030

31+
3132
public class AccountForDescribeAccountOutput {
3233
@SerializedName("AccountID")
3334
private String accountID = null;

volcengine-java-sdk-organization/src/main/java/com/volcengine/organization/model/AccountListForListAccountsOutput.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
*/
3232

3333

34+
3435
public class AccountListForListAccountsOutput {
3536
@SerializedName("AccountID")
3637
private String accountID = null;

volcengine-java-sdk-organization/src/main/java/com/volcengine/organization/model/AttachServiceControlPolicyRequest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
*/
2929

3030

31+
3132
public class AttachServiceControlPolicyRequest {
3233
@SerializedName("PolicyID")
3334
private String policyID = null;

volcengine-java-sdk-organization/src/main/java/com/volcengine/organization/model/AttachServiceControlPolicyResponse.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
*/
2222

2323

24+
2425
public class AttachServiceControlPolicyResponse extends com.volcengine.model.AbstractResponse {
2526

2627
@Override

volcengine-java-sdk-organization/src/main/java/com/volcengine/organization/model/CancelChangeAccountSecureContactInfoRequest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
*/
2929

3030

31+
3132
public class CancelChangeAccountSecureContactInfoRequest {
3233
@SerializedName("AccountId")
3334
private String accountId = null;

0 commit comments

Comments
 (0)