Skip to content

Commit 78aedd1

Browse files
committed
Support java http trigger invocation.
1 parent 38bd346 commit 78aedd1

File tree

6 files changed

+19
-57
lines changed

6 files changed

+19
-57
lines changed

fc-open-20210406/ChangeLog.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2022-07-05 Version: 1.1.6
2+
- Support java http trigger invocation.
3+
- Fix marshal byte array.
4+
15
2022-06-29 Version: 1.1.5
26
- Add EventBridgeTriggerConfig struct.
37

fc-open-20210406/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>com.aliyun</groupId>
55
<artifactId>alibabacloud-fc_open20210406</artifactId>
6-
<version>1.1.5</version>
6+
<version>1.1.6</version>
77
<packaging>jar</packaging>
88
<name>alibabacloud-fc_open20210406</name>
99
<description>Alibaba Cloud FC-Open (20210406) Async SDK for Java

fc-open-20210406/src/main/java/com/aliyun/sdk/service/fc_open20210406/models/CreateTriggerRequest.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ public class CreateTriggerRequest extends Request {
5252

5353
@Body
5454
@NameInMap("triggerConfig")
55-
private Object triggerConfig;
55+
@Validation(required = true)
56+
private String triggerConfig;
5657

5758
@Body
5859
@NameInMap("triggerName")
@@ -159,7 +160,7 @@ public String getSourceArn() {
159160
/**
160161
* @return triggerConfig
161162
*/
162-
public Object getTriggerConfig() {
163+
public String getTriggerConfig() {
163164
return this.triggerConfig;
164165
}
165166

@@ -187,7 +188,7 @@ public static final class Builder extends Request.Builder<CreateTriggerRequest,
187188
private String invocationRole;
188189
private String qualifier;
189190
private String sourceArn;
190-
private Object triggerConfig;
191+
private String triggerConfig;
191192
private String triggerName;
192193
private String triggerType;
193194

@@ -293,9 +294,9 @@ public Builder sourceArn(String sourceArn) {
293294
}
294295

295296
/**
296-
* triggerConfig.
297+
* trigger配置,针对不同的trigger类型,trigger配置会有所不同
297298
*/
298-
public Builder triggerConfig(Object triggerConfig) {
299+
public Builder triggerConfig(String triggerConfig) {
299300
this.putBodyParameter("triggerConfig", triggerConfig);
300301
this.triggerConfig = triggerConfig;
301302
return this;

fc-open-20210406/src/main/java/com/aliyun/sdk/service/fc_open20210406/models/GetStatefulAsyncInvocationRequest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,17 @@
1414
public class GetStatefulAsyncInvocationRequest extends Request {
1515
@Path
1616
@NameInMap("serviceName")
17+
@Validation(required = true)
1718
private String serviceName;
1819

1920
@Path
2021
@NameInMap("functionName")
22+
@Validation(required = true)
2123
private String functionName;
2224

2325
@Path
2426
@NameInMap("invocationId")
27+
@Validation(required = true)
2528
private String invocationId;
2629

2730
@Host

fc-open-20210406/src/main/java/com/aliyun/sdk/service/fc_open20210406/models/InvokeFunctionRequest.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public class InvokeFunctionRequest extends Request {
4848

4949
@Body
5050
@NameInMap("body")
51-
private Object body;
51+
private byte[] body;
5252

5353
@Query
5454
@NameInMap("qualifier")
@@ -140,7 +140,7 @@ public String getXFcTraceId() {
140140
/**
141141
* @return body
142142
*/
143-
public Object getBody() {
143+
public byte[] getBody() {
144144
return this.body;
145145
}
146146

@@ -160,7 +160,7 @@ public static final class Builder extends Request.Builder<InvokeFunctionRequest,
160160
private String xFcLogType;
161161
private String xFcStatefulAsyncInvocationId;
162162
private String xFcTraceId;
163-
private Object body;
163+
private byte[] body;
164164
private String qualifier;
165165

166166
private Builder() {
@@ -254,9 +254,9 @@ public Builder xFcTraceId(String xFcTraceId) {
254254
}
255255

256256
/**
257-
* anything
257+
* 事件(event),binary type。函数计算服务将event传递给用户function来处理
258258
*/
259-
public Builder body(Object body) {
259+
public Builder body(byte[] body) {
260260
this.putBodyParameter("body", body);
261261
this.body = body;
262262
return this;

fc-open-20210406/src/main/java/com/aliyun/sdk/service/fc_open20210406/models/ListInstancesRequest.java

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,6 @@ public class ListInstancesRequest extends Request {
2727
@Validation(required = true)
2828
private String xFcAccountId;
2929

30-
@Header
31-
@NameInMap("X-Fc-Date")
32-
private String xFcDate;
33-
34-
@Header
35-
@NameInMap("X-Fc-Trace-Id")
36-
private String xFcTraceId;
37-
3830
@Query
3931
@NameInMap("instanceIds")
4032
private java.util.List < String > instanceIds;
@@ -52,8 +44,6 @@ private ListInstancesRequest(Builder builder) {
5244
this.serviceName = builder.serviceName;
5345
this.functionName = builder.functionName;
5446
this.xFcAccountId = builder.xFcAccountId;
55-
this.xFcDate = builder.xFcDate;
56-
this.xFcTraceId = builder.xFcTraceId;
5747
this.instanceIds = builder.instanceIds;
5848
this.limit = builder.limit;
5949
this.qualifier = builder.qualifier;
@@ -93,20 +83,6 @@ public String getXFcAccountId() {
9383
return this.xFcAccountId;
9484
}
9585

96-
/**
97-
* @return xFcDate
98-
*/
99-
public String getXFcDate() {
100-
return this.xFcDate;
101-
}
102-
103-
/**
104-
* @return xFcTraceId
105-
*/
106-
public String getXFcTraceId() {
107-
return this.xFcTraceId;
108-
}
109-
11086
/**
11187
* @return instanceIds
11288
*/
@@ -132,8 +108,6 @@ public static final class Builder extends Request.Builder<ListInstancesRequest,
132108
private String serviceName;
133109
private String functionName;
134110
private String xFcAccountId;
135-
private String xFcDate;
136-
private String xFcTraceId;
137111
private java.util.List < String > instanceIds;
138112
private Integer limit;
139113
private String qualifier;
@@ -147,8 +121,6 @@ private Builder(ListInstancesRequest request) {
147121
this.serviceName = request.serviceName;
148122
this.functionName = request.functionName;
149123
this.xFcAccountId = request.xFcAccountId;
150-
this.xFcDate = request.xFcDate;
151-
this.xFcTraceId = request.xFcTraceId;
152124
this.instanceIds = request.instanceIds;
153125
this.limit = request.limit;
154126
this.qualifier = request.qualifier;
@@ -181,24 +153,6 @@ public Builder xFcAccountId(String xFcAccountId) {
181153
return this;
182154
}
183155

184-
/**
185-
* X-Fc-Date.
186-
*/
187-
public Builder xFcDate(String xFcDate) {
188-
this.putHeaderParameter("X-Fc-Date", xFcDate);
189-
this.xFcDate = xFcDate;
190-
return this;
191-
}
192-
193-
/**
194-
* X-Fc-Trace-Id.
195-
*/
196-
public Builder xFcTraceId(String xFcTraceId) {
197-
this.putHeaderParameter("X-Fc-Trace-Id", xFcTraceId);
198-
this.xFcTraceId = xFcTraceId;
199-
return this;
200-
}
201-
202156
/**
203157
* 实例ID
204158
*/

0 commit comments

Comments
 (0)