Skip to content

Commit aa2a42e

Browse files
author
BitsAdmin
committed
Merge branch 'privatelink-Java-2020-04-01-online-1165-2025_05_15_14_15_24' into 'integration_2025-05-15_905315453698'
feat: [development task] privatelink-1165-Java (1224785) See merge request iaasng/volcengine-java-sdk!480
2 parents 7c29d50 + ee15d36 commit aa2a42e

13 files changed

+817
-19
lines changed

volcengine-java-sdk-privatelink/src/main/java/com/volcengine/privatelink/PrivatelinkApi.java

Lines changed: 252 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,16 @@
113113
import com.volcengine.privatelink.model.EnableVpcEndpointConnectionResponse;
114114
import com.volcengine.privatelink.model.ListTagsForResourcesRequest;
115115
import com.volcengine.privatelink.model.ListTagsForResourcesResponse;
116+
import com.volcengine.privatelink.model.ModifyEndpointPayerAccountRequest;
117+
import com.volcengine.privatelink.model.ModifyEndpointPayerAccountResponse;
116118
import com.volcengine.privatelink.model.ModifyPrivateLinkGatewayAttributesRequest;
117119
import com.volcengine.privatelink.model.ModifyPrivateLinkGatewayAttributesResponse;
118120
import com.volcengine.privatelink.model.ModifyUniqueResourceTypeVpcEndpointServiceAttributesRequest;
119121
import com.volcengine.privatelink.model.ModifyUniqueResourceTypeVpcEndpointServiceAttributesResponse;
120122
import com.volcengine.privatelink.model.ModifyVpcEndpointAttributesRequest;
121123
import com.volcengine.privatelink.model.ModifyVpcEndpointAttributesResponse;
124+
import com.volcengine.privatelink.model.ModifyVpcEndpointConnectionsRequest;
125+
import com.volcengine.privatelink.model.ModifyVpcEndpointConnectionsResponse;
122126
import com.volcengine.privatelink.model.ModifyVpcEndpointServiceAttributesRequest;
123127
import com.volcengine.privatelink.model.ModifyVpcEndpointServiceAttributesResponse;
124128
import com.volcengine.privatelink.model.ModifyVpcEndpointServiceResourceAttributesRequest;
@@ -5497,6 +5501,130 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
54975501
apiClient.executeAsync(call, localVarReturnType, callback);
54985502
return call;
54995503
}
5504+
/**
5505+
* Build call for modifyEndpointPayerAccount
5506+
* @param body (required)
5507+
* @param progressListener Progress listener
5508+
* @param progressRequestListener Progress request listener
5509+
* @return Call to execute
5510+
* @throws ApiException If fail to serialize the request body object
5511+
*/
5512+
public com.squareup.okhttp.Call modifyEndpointPayerAccountCall(ModifyEndpointPayerAccountRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
5513+
Object localVarPostBody = body;
5514+
5515+
// create path and map variables
5516+
String localVarPath = "/ModifyEndpointPayerAccount/2020-04-01/privatelink/get/text_plain/";
5517+
5518+
List<Pair> localVarQueryParams = new ArrayList<Pair>();
5519+
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
5520+
5521+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
5522+
5523+
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
5524+
5525+
final String[] localVarAccepts = {
5526+
"application/json"
5527+
};
5528+
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
5529+
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
5530+
5531+
final String[] localVarContentTypes = {
5532+
"text/plain"
5533+
};
5534+
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
5535+
localVarHeaderParams.put("Content-Type", localVarContentType);
5536+
5537+
if(progressListener != null) {
5538+
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
5539+
@Override
5540+
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
5541+
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
5542+
return originalResponse.newBuilder()
5543+
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
5544+
.build();
5545+
}
5546+
});
5547+
}
5548+
5549+
String[] localVarAuthNames = new String[] { "volcengineSign" };
5550+
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
5551+
}
5552+
5553+
@SuppressWarnings("rawtypes")
5554+
private com.squareup.okhttp.Call modifyEndpointPayerAccountValidateBeforeCall(ModifyEndpointPayerAccountRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
5555+
// verify the required parameter 'body' is set
5556+
if (body == null) {
5557+
throw new ApiException("Missing the required parameter 'body' when calling modifyEndpointPayerAccount(Async)");
5558+
}
5559+
5560+
com.squareup.okhttp.Call call = modifyEndpointPayerAccountCall(body, progressListener, progressRequestListener);
5561+
return call;
5562+
5563+
5564+
5565+
5566+
5567+
}
5568+
5569+
/**
5570+
*
5571+
*
5572+
* @param body (required)
5573+
* @return ModifyEndpointPayerAccountResponse
5574+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
5575+
*/
5576+
public ModifyEndpointPayerAccountResponse modifyEndpointPayerAccount(ModifyEndpointPayerAccountRequest body) throws ApiException {
5577+
ApiResponse<ModifyEndpointPayerAccountResponse> resp = modifyEndpointPayerAccountWithHttpInfo(body);
5578+
return resp.getData();
5579+
}
5580+
5581+
/**
5582+
*
5583+
*
5584+
* @param body (required)
5585+
* @return ApiResponse&lt;ModifyEndpointPayerAccountResponse&gt;
5586+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
5587+
*/
5588+
public ApiResponse<ModifyEndpointPayerAccountResponse> modifyEndpointPayerAccountWithHttpInfo( @NotNull ModifyEndpointPayerAccountRequest body) throws ApiException {
5589+
com.squareup.okhttp.Call call = modifyEndpointPayerAccountValidateBeforeCall(body, null, null);
5590+
Type localVarReturnType = new TypeToken<ModifyEndpointPayerAccountResponse>(){}.getType();
5591+
return apiClient.execute(call, localVarReturnType);
5592+
}
5593+
5594+
/**
5595+
* (asynchronously)
5596+
*
5597+
* @param body (required)
5598+
* @param callback The callback to be executed when the API call finishes
5599+
* @return The request call
5600+
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
5601+
*/
5602+
public com.squareup.okhttp.Call modifyEndpointPayerAccountAsync(ModifyEndpointPayerAccountRequest body, final ApiCallback<ModifyEndpointPayerAccountResponse> callback) throws ApiException {
5603+
5604+
ProgressResponseBody.ProgressListener progressListener = null;
5605+
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
5606+
5607+
if (callback != null) {
5608+
progressListener = new ProgressResponseBody.ProgressListener() {
5609+
@Override
5610+
public void update(long bytesRead, long contentLength, boolean done) {
5611+
callback.onDownloadProgress(bytesRead, contentLength, done);
5612+
}
5613+
};
5614+
5615+
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
5616+
@Override
5617+
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
5618+
callback.onUploadProgress(bytesWritten, contentLength, done);
5619+
}
5620+
};
5621+
}
5622+
5623+
com.squareup.okhttp.Call call = modifyEndpointPayerAccountValidateBeforeCall(body, progressListener, progressRequestListener);
5624+
Type localVarReturnType = new TypeToken<ModifyEndpointPayerAccountResponse>(){}.getType();
5625+
apiClient.executeAsync(call, localVarReturnType, callback);
5626+
return call;
5627+
}
55005628
/**
55015629
* Build call for modifyPrivateLinkGatewayAttributes
55025630
* @param body (required)
@@ -5869,6 +5997,130 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
58695997
apiClient.executeAsync(call, localVarReturnType, callback);
58705998
return call;
58715999
}
6000+
/**
6001+
* Build call for modifyVpcEndpointConnections
6002+
* @param body (required)
6003+
* @param progressListener Progress listener
6004+
* @param progressRequestListener Progress request listener
6005+
* @return Call to execute
6006+
* @throws ApiException If fail to serialize the request body object
6007+
*/
6008+
public com.squareup.okhttp.Call modifyVpcEndpointConnectionsCall(ModifyVpcEndpointConnectionsRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
6009+
Object localVarPostBody = body;
6010+
6011+
// create path and map variables
6012+
String localVarPath = "/ModifyVpcEndpointConnections/2020-04-01/privatelink/get/text_plain/";
6013+
6014+
List<Pair> localVarQueryParams = new ArrayList<Pair>();
6015+
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
6016+
6017+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
6018+
6019+
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
6020+
6021+
final String[] localVarAccepts = {
6022+
"application/json"
6023+
};
6024+
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
6025+
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
6026+
6027+
final String[] localVarContentTypes = {
6028+
"text/plain"
6029+
};
6030+
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
6031+
localVarHeaderParams.put("Content-Type", localVarContentType);
6032+
6033+
if(progressListener != null) {
6034+
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
6035+
@Override
6036+
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
6037+
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
6038+
return originalResponse.newBuilder()
6039+
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
6040+
.build();
6041+
}
6042+
});
6043+
}
6044+
6045+
String[] localVarAuthNames = new String[] { "volcengineSign" };
6046+
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
6047+
}
6048+
6049+
@SuppressWarnings("rawtypes")
6050+
private com.squareup.okhttp.Call modifyVpcEndpointConnectionsValidateBeforeCall(ModifyVpcEndpointConnectionsRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
6051+
// verify the required parameter 'body' is set
6052+
if (body == null) {
6053+
throw new ApiException("Missing the required parameter 'body' when calling modifyVpcEndpointConnections(Async)");
6054+
}
6055+
6056+
com.squareup.okhttp.Call call = modifyVpcEndpointConnectionsCall(body, progressListener, progressRequestListener);
6057+
return call;
6058+
6059+
6060+
6061+
6062+
6063+
}
6064+
6065+
/**
6066+
*
6067+
*
6068+
* @param body (required)
6069+
* @return ModifyVpcEndpointConnectionsResponse
6070+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
6071+
*/
6072+
public ModifyVpcEndpointConnectionsResponse modifyVpcEndpointConnections(ModifyVpcEndpointConnectionsRequest body) throws ApiException {
6073+
ApiResponse<ModifyVpcEndpointConnectionsResponse> resp = modifyVpcEndpointConnectionsWithHttpInfo(body);
6074+
return resp.getData();
6075+
}
6076+
6077+
/**
6078+
*
6079+
*
6080+
* @param body (required)
6081+
* @return ApiResponse&lt;ModifyVpcEndpointConnectionsResponse&gt;
6082+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
6083+
*/
6084+
public ApiResponse<ModifyVpcEndpointConnectionsResponse> modifyVpcEndpointConnectionsWithHttpInfo( @NotNull ModifyVpcEndpointConnectionsRequest body) throws ApiException {
6085+
com.squareup.okhttp.Call call = modifyVpcEndpointConnectionsValidateBeforeCall(body, null, null);
6086+
Type localVarReturnType = new TypeToken<ModifyVpcEndpointConnectionsResponse>(){}.getType();
6087+
return apiClient.execute(call, localVarReturnType);
6088+
}
6089+
6090+
/**
6091+
* (asynchronously)
6092+
*
6093+
* @param body (required)
6094+
* @param callback The callback to be executed when the API call finishes
6095+
* @return The request call
6096+
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
6097+
*/
6098+
public com.squareup.okhttp.Call modifyVpcEndpointConnectionsAsync(ModifyVpcEndpointConnectionsRequest body, final ApiCallback<ModifyVpcEndpointConnectionsResponse> callback) throws ApiException {
6099+
6100+
ProgressResponseBody.ProgressListener progressListener = null;
6101+
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
6102+
6103+
if (callback != null) {
6104+
progressListener = new ProgressResponseBody.ProgressListener() {
6105+
@Override
6106+
public void update(long bytesRead, long contentLength, boolean done) {
6107+
callback.onDownloadProgress(bytesRead, contentLength, done);
6108+
}
6109+
};
6110+
6111+
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
6112+
@Override
6113+
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
6114+
callback.onUploadProgress(bytesWritten, contentLength, done);
6115+
}
6116+
};
6117+
}
6118+
6119+
com.squareup.okhttp.Call call = modifyVpcEndpointConnectionsValidateBeforeCall(body, progressListener, progressRequestListener);
6120+
Type localVarReturnType = new TypeToken<ModifyVpcEndpointConnectionsResponse>(){}.getType();
6121+
apiClient.executeAsync(call, localVarReturnType, callback);
6122+
return call;
6123+
}
58726124
/**
58736125
* Build call for modifyVpcEndpointServiceAttributes
58746126
* @param body (required)

volcengine-java-sdk-privatelink/src/main/java/com/volcengine/privatelink/model/DescribeVpcEndpointAttributesResponse.java

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@
3434

3535

3636
public class DescribeVpcEndpointAttributesResponse extends com.volcengine.model.AbstractResponse {
37+
@SerializedName("Bps")
38+
private Integer bps = null;
39+
3740
@SerializedName("BusinessStatus")
3841
private String businessStatus = null;
3942

@@ -109,6 +112,24 @@ public class DescribeVpcEndpointAttributesResponse extends com.volcengine.model.
109112
@SerializedName("VpcId")
110113
private String vpcId = null;
111114

115+
public DescribeVpcEndpointAttributesResponse bps(Integer bps) {
116+
this.bps = bps;
117+
return this;
118+
}
119+
120+
/**
121+
* Get bps
122+
* @return bps
123+
**/
124+
@Schema(description = "")
125+
public Integer getBps() {
126+
return bps;
127+
}
128+
129+
public void setBps(Integer bps) {
130+
this.bps = bps;
131+
}
132+
112133
public DescribeVpcEndpointAttributesResponse businessStatus(String businessStatus) {
113134
this.businessStatus = businessStatus;
114135
return this;
@@ -595,7 +616,8 @@ public boolean equals(java.lang.Object o) {
595616
return false;
596617
}
597618
DescribeVpcEndpointAttributesResponse describeVpcEndpointAttributesResponse = (DescribeVpcEndpointAttributesResponse) o;
598-
return Objects.equals(this.businessStatus, describeVpcEndpointAttributesResponse.businessStatus) &&
619+
return Objects.equals(this.bps, describeVpcEndpointAttributesResponse.bps) &&
620+
Objects.equals(this.businessStatus, describeVpcEndpointAttributesResponse.businessStatus) &&
599621
Objects.equals(this.connectionStatus, describeVpcEndpointAttributesResponse.connectionStatus) &&
600622
Objects.equals(this.creationTime, describeVpcEndpointAttributesResponse.creationTime) &&
601623
Objects.equals(this.deletedTime, describeVpcEndpointAttributesResponse.deletedTime) &&
@@ -624,7 +646,7 @@ public boolean equals(java.lang.Object o) {
624646

625647
@Override
626648
public int hashCode() {
627-
return Objects.hash(businessStatus, connectionStatus, creationTime, deletedTime, description, endpoint, endpointDomain, endpointId, endpointIndex, endpointName, endpointType, ipAddressVersions, ipAddressVersionsN, payer, privateDNSEnabled, privateDNSName, projectName, requestId, serviceId, serviceManaged, serviceName, status, tags, updateTime, vpcId);
649+
return Objects.hash(bps, businessStatus, connectionStatus, creationTime, deletedTime, description, endpoint, endpointDomain, endpointId, endpointIndex, endpointName, endpointType, ipAddressVersions, ipAddressVersionsN, payer, privateDNSEnabled, privateDNSName, projectName, requestId, serviceId, serviceManaged, serviceName, status, tags, updateTime, vpcId);
628650
}
629651

630652

@@ -633,6 +655,7 @@ public String toString() {
633655
StringBuilder sb = new StringBuilder();
634656
sb.append("class DescribeVpcEndpointAttributesResponse {\n");
635657

658+
sb.append(" bps: ").append(toIndentedString(bps)).append("\n");
636659
sb.append(" businessStatus: ").append(toIndentedString(businessStatus)).append("\n");
637660
sb.append(" connectionStatus: ").append(toIndentedString(connectionStatus)).append("\n");
638661
sb.append(" creationTime: ").append(toIndentedString(creationTime)).append("\n");

0 commit comments

Comments
 (0)