Skip to content

Commit

Permalink
Merge branch 'ecs-Java-2020-04-01-online-485-2024_05_09_16_49_56' int…
Browse files Browse the repository at this point in the history
…o 'master'

Ecs java 2020 04 01 online 485 2024 05 09 16 49 56

See merge request iaasng/volcengine-java-sdk!166
  • Loading branch information
修杰 committed May 10, 2024
2 parents d54c4ad + f375ae6 commit 21e3308
Show file tree
Hide file tree
Showing 47 changed files with 994 additions and 48 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<dependency>
<groupId>com.volcengine</groupId>
<artifactId>volcengine-java-sdk-bom</artifactId>
<version>0.1.108</version>
<version>0.1.109</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand All @@ -70,12 +70,12 @@
<dependency>
<groupId>com.volcengine</groupId>
<artifactId>volcengine-java-sdk-vpc</artifactId>
<version>0.1.108</version>
<version>0.1.109</version>
</dependency>
<dependency>
<groupId>com.volcengine</groupId>
<artifactId>volcengine-java-sdk-ecs</artifactId>
<version>0.1.108</version>
<version>0.1.109</version>
</dependency>
</dependencies>
```
Expand Down
4 changes: 2 additions & 2 deletions meta.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"lasted": "0.1.108",
"meta_commit": "b59de31606872af9acb9113fa227e1ad0cd42f98"
"lasted": "0.1.109",
"meta_commit": "7e428aa5aa264557457ef8e49eed3e051775d6a6"
}
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>com.volcengine</groupId>
<artifactId>volcengine-java-sdk</artifactId>
<packaging>pom</packaging>
<version>0.1.108</version>
<version>0.1.109</version>
<name>volcengine-java-sdk</name>
<url>https://open.volcengineapi.com</url>
<description>The Java SDK For Volcengine</description>
Expand Down
2 changes: 1 addition & 1 deletion volcengine-java-sdk-alb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>volcengine-java-sdk</artifactId>
<groupId>com.volcengine</groupId>
<version>0.1.108</version>
<version>0.1.109</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion volcengine-java-sdk-autoscaling/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>volcengine-java-sdk</artifactId>
<groupId>com.volcengine</groupId>
<version>0.1.108</version>
<version>0.1.109</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion volcengine-java-sdk-billing/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>volcengine-java-sdk</artifactId>
<groupId>com.volcengine</groupId>
<version>0.1.108</version>
<version>0.1.109</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion volcengine-java-sdk-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>volcengine-java-sdk</artifactId>
<groupId>com.volcengine</groupId>
<version>0.1.108</version>
<version>0.1.109</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion volcengine-java-sdk-cen/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>volcengine-java-sdk</artifactId>
<groupId>com.volcengine</groupId>
<version>0.1.108</version>
<version>0.1.109</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion volcengine-java-sdk-clb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>volcengine-java-sdk</artifactId>
<groupId>com.volcengine</groupId>
<version>0.1.108</version>
<version>0.1.109</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion volcengine-java-sdk-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>com.volcengine</groupId>
<artifactId>volcengine-java-sdk</artifactId>
<version>0.1.108</version>
<version>0.1.109</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.volcengine.version;

public class Version {
public final static String SDK_VERSION = "0.1.108";
public final static String SDK_VERSION = "0.1.109";
public final static String SDK_NAME = "volcengine-java-sdk";
}
2 changes: 1 addition & 1 deletion volcengine-java-sdk-cr/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>volcengine-java-sdk</artifactId>
<groupId>com.volcengine</groupId>
<version>0.1.108</version>
<version>0.1.109</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion volcengine-java-sdk-dcdn/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>volcengine-java-sdk</artifactId>
<groupId>com.volcengine</groupId>
<version>0.1.108</version>
<version>0.1.109</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion volcengine-java-sdk-directconnect/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>volcengine-java-sdk</artifactId>
<groupId>com.volcengine</groupId>
<version>0.1.108</version>
<version>0.1.109</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion volcengine-java-sdk-ecs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<artifactId>volcengine-java-sdk</artifactId>
<groupId>com.volcengine</groupId>
<version>0.1.108</version>
<version>0.1.109</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
126 changes: 126 additions & 0 deletions volcengine-java-sdk-ecs/src/main/java/com/volcengine/ecs/EcsApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@
import com.volcengine.ecs.model.DescribeZonesResponse;
import com.volcengine.ecs.model.DetachKeyPairRequest;
import com.volcengine.ecs.model.DetachKeyPairResponse;
import com.volcengine.ecs.model.DetectImageRequest;
import com.volcengine.ecs.model.DetectImageResponse;
import com.volcengine.ecs.model.DisassociateInstancesIamRoleRequest;
import com.volcengine.ecs.model.DisassociateInstancesIamRoleResponse;
import com.volcengine.ecs.model.ExportImageRequest;
Expand Down Expand Up @@ -6555,6 +6557,130 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/**
* Build call for detectImage
* @param body (required)
* @param progressListener Progress listener
* @param progressRequestListener Progress request listener
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
*/
public com.squareup.okhttp.Call detectImageCall(DetectImageRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = body;

// create path and map variables
String localVarPath = "/DetectImage/2020-04-01/ecs/get/text_plain/";

List<Pair> localVarQueryParams = new ArrayList<Pair>();
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();

Map<String, String> localVarHeaderParams = new HashMap<String, String>();

Map<String, Object> localVarFormParams = new HashMap<String, Object>();

final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);

final String[] localVarContentTypes = {
"text/plain"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);

if(progressListener != null) {
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
@Override
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
return originalResponse.newBuilder()
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
.build();
}
});
}

String[] localVarAuthNames = new String[] { "volcengineSign" };
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}

@SuppressWarnings("rawtypes")
private com.squareup.okhttp.Call detectImageValidateBeforeCall(DetectImageRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException("Missing the required parameter 'body' when calling detectImage(Async)");
}

com.squareup.okhttp.Call call = detectImageCall(body, progressListener, progressRequestListener);
return call;





}

/**
*
*
* @param body (required)
* @return DetectImageResponse
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public DetectImageResponse detectImage(DetectImageRequest body) throws ApiException {
ApiResponse<DetectImageResponse> resp = detectImageWithHttpInfo(body);
return resp.getData();
}

/**
*
*
* @param body (required)
* @return ApiResponse&lt;DetectImageResponse&gt;
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse<DetectImageResponse> detectImageWithHttpInfo( @NotNull DetectImageRequest body) throws ApiException {
com.squareup.okhttp.Call call = detectImageValidateBeforeCall(body, null, null);
Type localVarReturnType = new TypeToken<DetectImageResponse>(){}.getType();
return apiClient.execute(call, localVarReturnType);
}

/**
* (asynchronously)
*
* @param body (required)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call detectImageAsync(DetectImageRequest body, final ApiCallback<DetectImageResponse> callback) throws ApiException {

ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;

if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};

progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}

com.squareup.okhttp.Call call = detectImageValidateBeforeCall(body, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken<DetectImageResponse>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/**
* Build call for disassociateInstancesIamRole
* @param body (required)
Expand Down
Loading

0 comments on commit 21e3308

Please sign in to comment.