Skip to content

Commit 5c2e0ba

Browse files
committed
Support new AICS OpenApi invoke.
1 parent c2aa58c commit 5c2e0ba

File tree

5 files changed

+167
-1
lines changed

5 files changed

+167
-1
lines changed

aliyun-java-sdk-brain-industrial/ChangeLog.txt

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2025-03-28 Version: 1.0.4
2+
- Support new AICS OpenApi invoke.
3+
14
2025-03-21 Version: 1.0.3
25
- AICS OpenApi Invoke
36

aliyun-java-sdk-brain-industrial/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<groupId>com.aliyun</groupId>
55
<artifactId>aliyun-java-sdk-brain-industrial</artifactId>
66
<packaging>jar</packaging>
7-
<version>1.0.3</version>
7+
<version>1.0.4</version>
88
<name>aliyun-java-sdk-brain-industrial</name>
99
<url>http://www.aliyun.com</url>
1010
<description>Aliyun Open API SDK for Java
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
/*
2+
* Licensed under the Apache License, Version 2.0 (the "License");
3+
* you may not use this file except in compliance with the License.
4+
* You may obtain a copy of the License at
5+
*
6+
* http://www.apache.org/licenses/LICENSE-2.0
7+
*
8+
* Unless required by applicable law or agreed to in writing, software
9+
* distributed under the License is distributed on an "AS IS" BASIS,
10+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
* See the License for the specific language governing permissions and
12+
* limitations under the License.
13+
*/
14+
15+
package com.aliyuncs.brain_industrial.model.v20200920;
16+
17+
import com.aliyuncs.RpcAcsRequest;
18+
import java.util.Map;
19+
import com.google.gson.Gson;
20+
import com.google.gson.annotations.SerializedName;
21+
import com.aliyuncs.http.ProtocolType;
22+
import com.aliyuncs.http.MethodType;
23+
import com.aliyuncs.brain_industrial.Endpoint;
24+
25+
/**
26+
* @author auto create
27+
* @version
28+
*/
29+
public class AicsOpenApiInvokeRequest extends RpcAcsRequest<AicsOpenApiInvokeResponse> {
30+
31+
32+
private String type;
33+
34+
@SerializedName("param")
35+
private Map<String,String> param;
36+
37+
private String serviceId;
38+
39+
private String nodeId;
40+
public AicsOpenApiInvokeRequest() {
41+
super("brain-industrial", "2020-09-20", "AicsOpenApiInvoke", "aistudio");
42+
setProtocol(ProtocolType.HTTPS);
43+
setMethod(MethodType.POST);
44+
try {
45+
com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointMap").set(this, Endpoint.endpointMap);
46+
com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointRegional").set(this, Endpoint.endpointRegionalType);
47+
} catch (Exception e) {}
48+
}
49+
50+
public String getType() {
51+
return this.type;
52+
}
53+
54+
public void setType(String type) {
55+
this.type = type;
56+
if(type != null){
57+
putQueryParameter("Type", type);
58+
}
59+
}
60+
61+
public Map<String,String> getParam() {
62+
return this.param;
63+
}
64+
65+
public void setParam(Map<String,String> param) {
66+
this.param = param;
67+
if (param != null) {
68+
putBodyParameter("Param" , new Gson().toJson(param));
69+
}
70+
}
71+
72+
public String getServiceId() {
73+
return this.serviceId;
74+
}
75+
76+
public void setServiceId(String serviceId) {
77+
this.serviceId = serviceId;
78+
if(serviceId != null){
79+
putQueryParameter("ServiceId", serviceId);
80+
}
81+
}
82+
83+
public String getNodeId() {
84+
return this.nodeId;
85+
}
86+
87+
public void setNodeId(String nodeId) {
88+
this.nodeId = nodeId;
89+
if(nodeId != null){
90+
putQueryParameter("NodeId", nodeId);
91+
}
92+
}
93+
94+
@Override
95+
public Class<AicsOpenApiInvokeResponse> getResponseClass() {
96+
return AicsOpenApiInvokeResponse.class;
97+
}
98+
99+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/*
2+
* Licensed under the Apache License, Version 2.0 (the "License");
3+
* you may not use this file except in compliance with the License.
4+
* You may obtain a copy of the License at
5+
*
6+
* http://www.apache.org/licenses/LICENSE-2.0
7+
*
8+
* Unless required by applicable law or agreed to in writing, software
9+
* distributed under the License is distributed on an "AS IS" BASIS,
10+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
* See the License for the specific language governing permissions and
12+
* limitations under the License.
13+
*/
14+
15+
package com.aliyuncs.brain_industrial.model.v20200920;
16+
17+
import com.aliyuncs.AcsResponse;
18+
import com.aliyuncs.brain_industrial.transform.v20200920.AicsOpenApiInvokeResponseUnmarshaller;
19+
import com.aliyuncs.transform.UnmarshallerContext;
20+
21+
/**
22+
* @author auto create
23+
* @version
24+
*/
25+
public class AicsOpenApiInvokeResponse extends AcsResponse {
26+
27+
@Override
28+
public AicsOpenApiInvokeResponse getInstance(UnmarshallerContext context) {
29+
return AicsOpenApiInvokeResponseUnmarshaller.unmarshall(this, context);
30+
}
31+
32+
@Override
33+
public boolean checkShowJsonItemName() {
34+
return false;
35+
}
36+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*
2+
* Licensed under the Apache License, Version 2.0 (the "License");
3+
* you may not use this file except in compliance with the License.
4+
* You may obtain a copy of the License at
5+
*
6+
* http://www.apache.org/licenses/LICENSE-2.0
7+
*
8+
* Unless required by applicable law or agreed to in writing, software
9+
* distributed under the License is distributed on an "AS IS" BASIS,
10+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
* See the License for the specific language governing permissions and
12+
* limitations under the License.
13+
*/
14+
15+
package com.aliyuncs.brain_industrial.transform.v20200920;
16+
17+
import com.aliyuncs.brain_industrial.model.v20200920.AicsOpenApiInvokeResponse;
18+
import com.aliyuncs.transform.UnmarshallerContext;
19+
20+
21+
public class AicsOpenApiInvokeResponseUnmarshaller {
22+
23+
public static AicsOpenApiInvokeResponse unmarshall(AicsOpenApiInvokeResponse aicsOpenApiInvokeResponse, UnmarshallerContext _ctx) {
24+
25+
26+
return aicsOpenApiInvokeResponse;
27+
}
28+
}

0 commit comments

Comments
 (0)