Skip to content

Commit aac97a1

Browse files
author
BitsAdmin
committed
Merge branch 'tis-Java-2024-07-31-online-1338-2025_07_01_14_04_52' into 'integration_2025-07-10_995666846978'
feat: [development task] tis-1338-Java (1438893) See merge request iaasng/volcengine-java-sdk!571
2 parents 490e40a + 01f3b43 commit aac97a1

File tree

4 files changed

+56
-252
lines changed

4 files changed

+56
-252
lines changed

volcengine-java-sdk-tis/src/main/java/com/volcengine/tis/TisApi.java

Lines changed: 0 additions & 126 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@
3131
import com.volcengine.tis.model.BuyResourcePackageResponse;
3232
import com.volcengine.tis.model.ClearDeviceLongMemoryRequest;
3333
import com.volcengine.tis.model.ClearDeviceLongMemoryResponse;
34-
import com.volcengine.tis.model.GetAccessTokenRequest;
35-
import com.volcengine.tis.model.GetAccessTokenResponse;
3634
import com.volcengine.tis.model.GetAgentListRequest;
3735
import com.volcengine.tis.model.GetAgentListResponse;
3836
import com.volcengine.tis.model.GetQuotaInfoRequest;
@@ -317,130 +315,6 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
317315
apiClient.executeAsync(call, localVarReturnType, callback);
318316
return call;
319317
}
320-
/**
321-
* Build call for getAccessToken
322-
* @param body (required)
323-
* @param progressListener Progress listener
324-
* @param progressRequestListener Progress request listener
325-
* @return Call to execute
326-
* @throws ApiException If fail to serialize the request body object
327-
*/
328-
public com.squareup.okhttp.Call getAccessTokenCall(GetAccessTokenRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
329-
Object localVarPostBody = body;
330-
331-
// create path and map variables
332-
String localVarPath = "/GetAccessToken/2024-07-31/tis/post/application_json/";
333-
334-
List<Pair> localVarQueryParams = new ArrayList<Pair>();
335-
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
336-
337-
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
338-
339-
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
340-
341-
final String[] localVarAccepts = {
342-
"application/json"
343-
};
344-
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
345-
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
346-
347-
final String[] localVarContentTypes = {
348-
"text/plain"
349-
};
350-
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
351-
localVarHeaderParams.put("Content-Type", localVarContentType);
352-
353-
if(progressListener != null) {
354-
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
355-
@Override
356-
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
357-
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
358-
return originalResponse.newBuilder()
359-
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
360-
.build();
361-
}
362-
});
363-
}
364-
365-
String[] localVarAuthNames = new String[] { "volcengineSign" };
366-
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
367-
}
368-
369-
@SuppressWarnings("rawtypes")
370-
private com.squareup.okhttp.Call getAccessTokenValidateBeforeCall(GetAccessTokenRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
371-
// verify the required parameter 'body' is set
372-
if (body == null) {
373-
throw new ApiException("Missing the required parameter 'body' when calling getAccessToken(Async)");
374-
}
375-
376-
com.squareup.okhttp.Call call = getAccessTokenCall(body, progressListener, progressRequestListener);
377-
return call;
378-
379-
380-
381-
382-
383-
}
384-
385-
/**
386-
*
387-
*
388-
* @param body (required)
389-
* @return GetAccessTokenResponse
390-
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
391-
*/
392-
public GetAccessTokenResponse getAccessToken(GetAccessTokenRequest body) throws ApiException {
393-
ApiResponse<GetAccessTokenResponse> resp = getAccessTokenWithHttpInfo(body);
394-
return resp.getData();
395-
}
396-
397-
/**
398-
*
399-
*
400-
* @param body (required)
401-
* @return ApiResponse&lt;GetAccessTokenResponse&gt;
402-
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
403-
*/
404-
public ApiResponse<GetAccessTokenResponse> getAccessTokenWithHttpInfo( @NotNull GetAccessTokenRequest body) throws ApiException {
405-
com.squareup.okhttp.Call call = getAccessTokenValidateBeforeCall(body, null, null);
406-
Type localVarReturnType = new TypeToken<GetAccessTokenResponse>(){}.getType();
407-
return apiClient.execute(call, localVarReturnType);
408-
}
409-
410-
/**
411-
* (asynchronously)
412-
*
413-
* @param body (required)
414-
* @param callback The callback to be executed when the API call finishes
415-
* @return The request call
416-
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
417-
*/
418-
public com.squareup.okhttp.Call getAccessTokenAsync(GetAccessTokenRequest body, final ApiCallback<GetAccessTokenResponse> callback) throws ApiException {
419-
420-
ProgressResponseBody.ProgressListener progressListener = null;
421-
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
422-
423-
if (callback != null) {
424-
progressListener = new ProgressResponseBody.ProgressListener() {
425-
@Override
426-
public void update(long bytesRead, long contentLength, boolean done) {
427-
callback.onDownloadProgress(bytesRead, contentLength, done);
428-
}
429-
};
430-
431-
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
432-
@Override
433-
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
434-
callback.onUploadProgress(bytesWritten, contentLength, done);
435-
}
436-
};
437-
}
438-
439-
com.squareup.okhttp.Call call = getAccessTokenValidateBeforeCall(body, progressListener, progressRequestListener);
440-
Type localVarReturnType = new TypeToken<GetAccessTokenResponse>(){}.getType();
441-
apiClient.executeAsync(call, localVarReturnType, callback);
442-
return call;
443-
}
444318
/**
445319
* Build call for getAgentList
446320
* @param body (required)

volcengine-java-sdk-tis/src/main/java/com/volcengine/tis/model/GetAccessTokenResponse.java renamed to volcengine-java-sdk-tis/src/main/java/com/volcengine/tis/model/DeviceInfoListForGetQuotaInfoOutput.java

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -24,52 +24,52 @@
2424
import javax.validation.constraints.*;
2525
import javax.validation.Valid;
2626
/**
27-
* GetAccessTokenResponse
27+
* DeviceInfoListForGetQuotaInfoOutput
2828
*/
2929

3030

3131

32-
public class GetAccessTokenResponse extends com.volcengine.model.AbstractResponse {
33-
@SerializedName("AccessToken")
34-
private String accessToken = null;
32+
public class DeviceInfoListForGetQuotaInfoOutput {
33+
@SerializedName("fieldName")
34+
private String fieldName = null;
3535

36-
@SerializedName("ExpireTime")
37-
private Long expireTime = null;
36+
@SerializedName("fieldValue")
37+
private String fieldValue = null;
3838

39-
public GetAccessTokenResponse accessToken(String accessToken) {
40-
this.accessToken = accessToken;
39+
public DeviceInfoListForGetQuotaInfoOutput fieldName(String fieldName) {
40+
this.fieldName = fieldName;
4141
return this;
4242
}
4343

4444
/**
45-
* Get accessToken
46-
* @return accessToken
45+
* Get fieldName
46+
* @return fieldName
4747
**/
4848
@Schema(description = "")
49-
public String getAccessToken() {
50-
return accessToken;
49+
public String getFieldName() {
50+
return fieldName;
5151
}
5252

53-
public void setAccessToken(String accessToken) {
54-
this.accessToken = accessToken;
53+
public void setFieldName(String fieldName) {
54+
this.fieldName = fieldName;
5555
}
5656

57-
public GetAccessTokenResponse expireTime(Long expireTime) {
58-
this.expireTime = expireTime;
57+
public DeviceInfoListForGetQuotaInfoOutput fieldValue(String fieldValue) {
58+
this.fieldValue = fieldValue;
5959
return this;
6060
}
6161

6262
/**
63-
* Get expireTime
64-
* @return expireTime
63+
* Get fieldValue
64+
* @return fieldValue
6565
**/
6666
@Schema(description = "")
67-
public Long getExpireTime() {
68-
return expireTime;
67+
public String getFieldValue() {
68+
return fieldValue;
6969
}
7070

71-
public void setExpireTime(Long expireTime) {
72-
this.expireTime = expireTime;
71+
public void setFieldValue(String fieldValue) {
72+
this.fieldValue = fieldValue;
7373
}
7474

7575

@@ -81,24 +81,24 @@ public boolean equals(java.lang.Object o) {
8181
if (o == null || getClass() != o.getClass()) {
8282
return false;
8383
}
84-
GetAccessTokenResponse getAccessTokenResponse = (GetAccessTokenResponse) o;
85-
return Objects.equals(this.accessToken, getAccessTokenResponse.accessToken) &&
86-
Objects.equals(this.expireTime, getAccessTokenResponse.expireTime);
84+
DeviceInfoListForGetQuotaInfoOutput deviceInfoListForGetQuotaInfoOutput = (DeviceInfoListForGetQuotaInfoOutput) o;
85+
return Objects.equals(this.fieldName, deviceInfoListForGetQuotaInfoOutput.fieldName) &&
86+
Objects.equals(this.fieldValue, deviceInfoListForGetQuotaInfoOutput.fieldValue);
8787
}
8888

8989
@Override
9090
public int hashCode() {
91-
return Objects.hash(accessToken, expireTime);
91+
return Objects.hash(fieldName, fieldValue);
9292
}
9393

9494

9595
@Override
9696
public String toString() {
9797
StringBuilder sb = new StringBuilder();
98-
sb.append("class GetAccessTokenResponse {\n");
98+
sb.append("class DeviceInfoListForGetQuotaInfoOutput {\n");
9999

100-
sb.append(" accessToken: ").append(toIndentedString(accessToken)).append("\n");
101-
sb.append(" expireTime: ").append(toIndentedString(expireTime)).append("\n");
100+
sb.append(" fieldName: ").append(toIndentedString(fieldName)).append("\n");
101+
sb.append(" fieldValue: ").append(toIndentedString(fieldValue)).append("\n");
102102
sb.append("}");
103103
return sb.toString();
104104
}

volcengine-java-sdk-tis/src/main/java/com/volcengine/tis/model/GetAccessTokenRequest.java

Lines changed: 0 additions & 95 deletions
This file was deleted.

0 commit comments

Comments
 (0)