Skip to content

Commit 8ff6268

Browse files
author
BitsAdmin
committed
Merge branch 'cloud_trail-Java-2021-09-01-online-875-2024_12_24_16_14_09' into 'integration_2024-12-26_654356387330'
feat: [development task] cloud_trail-875-Java (938959) See merge request iaasng/volcengine-java-sdk!336
2 parents 598e0bf + 9f1036e commit 8ff6268

File tree

9 files changed

+1287
-0
lines changed

9 files changed

+1287
-0
lines changed

pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,5 +262,6 @@
262262
<module>volcengine-java-sdk-cv20240606</module>
263263
<module>volcengine-java-sdk-dns</module>
264264
<module>volcengine-java-sdk-mcdn</module>
265+
<module>volcengine-java-sdk-cloudtrail</module>
265266
</modules>
266267
</project>

volcengine-java-sdk-bom/pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,12 @@
337337
<optional>false</optional>
338338
<version>${project.version}</version>
339339
</dependency>
340+
<dependency>
341+
<groupId>com.volcengine</groupId>
342+
<artifactId>volcengine-java-sdk-cloudtrail</artifactId>
343+
<optional>false</optional>
344+
<version>${project.version}</version>
345+
</dependency>
340346
</dependencies>
341347
</dependencyManagement>
342348
</project>
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<parent>
4+
<artifactId>volcengine-java-sdk</artifactId>
5+
<groupId>com.volcengine</groupId>
6+
<version>0.1.145</version>
7+
<relativePath>../pom.xml</relativePath>
8+
</parent>
9+
<modelVersion>4.0.0</modelVersion>
10+
<artifactId>volcengine-java-sdk-cloudtrail</artifactId>
11+
<dependencies>
12+
<dependency>
13+
<groupId>com.volcengine</groupId>
14+
<artifactId>volcengine-java-sdk-core</artifactId>
15+
<version>${project.version}</version>
16+
</dependency>
17+
</dependencies>
18+
<build>
19+
<plugins>
20+
<plugin>
21+
<groupId>org.apache.maven.plugins</groupId>
22+
<artifactId>maven-source-plugin</artifactId>
23+
<configuration>
24+
<excludes>
25+
<exclude>com/volcengine/cloudtrail/examples/**</exclude>
26+
</excludes>
27+
</configuration>
28+
</plugin>
29+
<plugin>
30+
<groupId>org.apache.maven.plugins</groupId>
31+
<artifactId>maven-jar-plugin</artifactId>
32+
<configuration>
33+
<excludes>
34+
<exclude>com/volcengine/cloudtrail/examples/**</exclude>
35+
</excludes>
36+
</configuration>
37+
</plugin>
38+
</plugins>
39+
</build>
40+
</project>
Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
/*
2+
* cloud_trail
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.cloudtrail;
14+
15+
import com.volcengine.ApiCallback;
16+
import com.volcengine.ApiClient;
17+
import com.volcengine.ApiException;
18+
import com.volcengine.ApiResponse;
19+
import com.volcengine.Configuration;
20+
import com.volcengine.Pair;
21+
import com.volcengine.ProgressRequestBody;
22+
import com.volcengine.ProgressResponseBody;
23+
24+
import com.google.gson.reflect.TypeToken;
25+
26+
import java.io.IOException;
27+
28+
import javax.validation.constraints.*;
29+
30+
import com.volcengine.cloudtrail.model.LookupEventsRequest;
31+
import com.volcengine.cloudtrail.model.LookupEventsResponse;
32+
33+
import java.lang.reflect.Type;
34+
import java.util.ArrayList;
35+
import java.util.HashMap;
36+
import java.util.List;
37+
import java.util.Map;
38+
39+
public class CloudTrailApi {
40+
private ApiClient apiClient;
41+
42+
public CloudTrailApi() {
43+
this(Configuration.getDefaultApiClient());
44+
}
45+
46+
public CloudTrailApi(ApiClient apiClient) {
47+
this.apiClient = apiClient;
48+
}
49+
50+
public ApiClient getApiClient() {
51+
return apiClient;
52+
}
53+
54+
public void setApiClient(ApiClient apiClient) {
55+
this.apiClient = apiClient;
56+
}
57+
58+
/**
59+
* Build call for lookupEvents
60+
* @param body (required)
61+
* @param progressListener Progress listener
62+
* @param progressRequestListener Progress request listener
63+
* @return Call to execute
64+
* @throws ApiException If fail to serialize the request body object
65+
*/
66+
public com.squareup.okhttp.Call lookupEventsCall(LookupEventsRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
67+
Object localVarPostBody = body;
68+
69+
// create path and map variables
70+
String localVarPath = "/LookupEvents/2021-09-01/cloud_trail/post/application_json/";
71+
72+
List<Pair> localVarQueryParams = new ArrayList<Pair>();
73+
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
74+
75+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
76+
77+
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
78+
79+
final String[] localVarAccepts = {
80+
"application/json"
81+
};
82+
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
83+
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
84+
85+
final String[] localVarContentTypes = {
86+
"text/plain"
87+
};
88+
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
89+
localVarHeaderParams.put("Content-Type", localVarContentType);
90+
91+
if(progressListener != null) {
92+
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
93+
@Override
94+
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
95+
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
96+
return originalResponse.newBuilder()
97+
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
98+
.build();
99+
}
100+
});
101+
}
102+
103+
String[] localVarAuthNames = new String[] { "volcengineSign" };
104+
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
105+
}
106+
107+
@SuppressWarnings("rawtypes")
108+
private com.squareup.okhttp.Call lookupEventsValidateBeforeCall(LookupEventsRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
109+
// verify the required parameter 'body' is set
110+
if (body == null) {
111+
throw new ApiException("Missing the required parameter 'body' when calling lookupEvents(Async)");
112+
}
113+
114+
com.squareup.okhttp.Call call = lookupEventsCall(body, progressListener, progressRequestListener);
115+
return call;
116+
117+
118+
119+
120+
121+
}
122+
123+
/**
124+
*
125+
*
126+
* @param body (required)
127+
* @return LookupEventsResponse
128+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
129+
*/
130+
public LookupEventsResponse lookupEvents(LookupEventsRequest body) throws ApiException {
131+
ApiResponse<LookupEventsResponse> resp = lookupEventsWithHttpInfo(body);
132+
return resp.getData();
133+
}
134+
135+
/**
136+
*
137+
*
138+
* @param body (required)
139+
* @return ApiResponse&lt;LookupEventsResponse&gt;
140+
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
141+
*/
142+
public ApiResponse<LookupEventsResponse> lookupEventsWithHttpInfo( @NotNull LookupEventsRequest body) throws ApiException {
143+
com.squareup.okhttp.Call call = lookupEventsValidateBeforeCall(body, null, null);
144+
Type localVarReturnType = new TypeToken<LookupEventsResponse>(){}.getType();
145+
return apiClient.execute(call, localVarReturnType);
146+
}
147+
148+
/**
149+
* (asynchronously)
150+
*
151+
* @param body (required)
152+
* @param callback The callback to be executed when the API call finishes
153+
* @return The request call
154+
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
155+
*/
156+
public com.squareup.okhttp.Call lookupEventsAsync(LookupEventsRequest body, final ApiCallback<LookupEventsResponse> callback) throws ApiException {
157+
158+
ProgressResponseBody.ProgressListener progressListener = null;
159+
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
160+
161+
if (callback != null) {
162+
progressListener = new ProgressResponseBody.ProgressListener() {
163+
@Override
164+
public void update(long bytesRead, long contentLength, boolean done) {
165+
callback.onDownloadProgress(bytesRead, contentLength, done);
166+
}
167+
};
168+
169+
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
170+
@Override
171+
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
172+
callback.onUploadProgress(bytesWritten, contentLength, done);
173+
}
174+
};
175+
}
176+
177+
com.squareup.okhttp.Call call = lookupEventsValidateBeforeCall(body, progressListener, progressRequestListener);
178+
Type localVarReturnType = new TypeToken<LookupEventsResponse>(){}.getType();
179+
apiClient.executeAsync(call, localVarReturnType, callback);
180+
return call;
181+
}
182+
}
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
/*
2+
* cloud_trail
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.cloudtrail.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+
* LookupConditionForLookupEventsInput
28+
*/
29+
30+
31+
32+
public class LookupConditionForLookupEventsInput {
33+
@SerializedName("LookupConditionKey")
34+
private String lookupConditionKey = null;
35+
36+
@SerializedName("LookupConditionValue")
37+
private String lookupConditionValue = null;
38+
39+
public LookupConditionForLookupEventsInput lookupConditionKey(String lookupConditionKey) {
40+
this.lookupConditionKey = lookupConditionKey;
41+
return this;
42+
}
43+
44+
/**
45+
* Get lookupConditionKey
46+
* @return lookupConditionKey
47+
**/
48+
@Schema(description = "")
49+
public String getLookupConditionKey() {
50+
return lookupConditionKey;
51+
}
52+
53+
public void setLookupConditionKey(String lookupConditionKey) {
54+
this.lookupConditionKey = lookupConditionKey;
55+
}
56+
57+
public LookupConditionForLookupEventsInput lookupConditionValue(String lookupConditionValue) {
58+
this.lookupConditionValue = lookupConditionValue;
59+
return this;
60+
}
61+
62+
/**
63+
* Get lookupConditionValue
64+
* @return lookupConditionValue
65+
**/
66+
@Schema(description = "")
67+
public String getLookupConditionValue() {
68+
return lookupConditionValue;
69+
}
70+
71+
public void setLookupConditionValue(String lookupConditionValue) {
72+
this.lookupConditionValue = lookupConditionValue;
73+
}
74+
75+
76+
@Override
77+
public boolean equals(java.lang.Object o) {
78+
if (this == o) {
79+
return true;
80+
}
81+
if (o == null || getClass() != o.getClass()) {
82+
return false;
83+
}
84+
LookupConditionForLookupEventsInput lookupConditionForLookupEventsInput = (LookupConditionForLookupEventsInput) o;
85+
return Objects.equals(this.lookupConditionKey, lookupConditionForLookupEventsInput.lookupConditionKey) &&
86+
Objects.equals(this.lookupConditionValue, lookupConditionForLookupEventsInput.lookupConditionValue);
87+
}
88+
89+
@Override
90+
public int hashCode() {
91+
return Objects.hash(lookupConditionKey, lookupConditionValue);
92+
}
93+
94+
95+
@Override
96+
public String toString() {
97+
StringBuilder sb = new StringBuilder();
98+
sb.append("class LookupConditionForLookupEventsInput {\n");
99+
100+
sb.append(" lookupConditionKey: ").append(toIndentedString(lookupConditionKey)).append("\n");
101+
sb.append(" lookupConditionValue: ").append(toIndentedString(lookupConditionValue)).append("\n");
102+
sb.append("}");
103+
return sb.toString();
104+
}
105+
106+
/**
107+
* Convert the given object to string with each line indented by 4 spaces
108+
* (except the first line).
109+
*/
110+
private String toIndentedString(java.lang.Object o) {
111+
if (o == null) {
112+
return "null";
113+
}
114+
return o.toString().replace("\n", "\n ");
115+
}
116+
117+
}

0 commit comments

Comments
 (0)