Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 32362fa

Browse files
committed
Add a new interface for asynchronous image translation.
1 parent 6944e62 commit 32362fa

File tree

5 files changed

+157
-1
lines changed

5 files changed

+157
-1
lines changed

aliyun-java-sdk-alimt/ChangeLog.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2020-11-20 Version: 3.0.27
2+
- Add a new interface for asynchronous image translation.
3+
14
2020-11-16 Version: 3.0.26
25
- Add a new interface for asynchronous image translation.
36

aliyun-java-sdk-alimt/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<groupId>com.aliyun</groupId>
55
<artifactId>aliyun-java-sdk-alimt</artifactId>
66
<packaging>jar</packaging>
7-
<version>3.0.26</version>
7+
<version>3.0.27</version>
88
<name>aliyun-java-sdk-alimt</name>
99
<url>http://www.aliyun.com</url>
1010
<description>Aliyun Open API SDK for Java
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
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.alimt.model.v20181012;
16+
17+
import com.aliyuncs.RpcAcsRequest;
18+
import com.aliyuncs.http.MethodType;
19+
import com.aliyuncs.alimt.Endpoint;
20+
21+
/**
22+
* @author auto create
23+
* @version
24+
*/
25+
public class OpenAlimtServiceRequest extends RpcAcsRequest<OpenAlimtServiceResponse> {
26+
27+
28+
private Long ownerId;
29+
30+
private String type;
31+
public OpenAlimtServiceRequest() {
32+
super("alimt", "2018-10-12", "OpenAlimtService", "alimt");
33+
setMethod(MethodType.POST);
34+
try {
35+
com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointMap").set(this, Endpoint.endpointMap);
36+
com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointRegional").set(this, Endpoint.endpointRegionalType);
37+
} catch (Exception e) {}
38+
}
39+
40+
public Long getOwnerId() {
41+
return this.ownerId;
42+
}
43+
44+
public void setOwnerId(Long ownerId) {
45+
this.ownerId = ownerId;
46+
if(ownerId != null){
47+
putQueryParameter("OwnerId", ownerId.toString());
48+
}
49+
}
50+
51+
public String getType() {
52+
return this.type;
53+
}
54+
55+
public void setType(String type) {
56+
this.type = type;
57+
if(type != null){
58+
putQueryParameter("Type", type);
59+
}
60+
}
61+
62+
@Override
63+
public Class<OpenAlimtServiceResponse> getResponseClass() {
64+
return OpenAlimtServiceResponse.class;
65+
}
66+
67+
}
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
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.alimt.model.v20181012;
16+
17+
import com.aliyuncs.AcsResponse;
18+
import com.aliyuncs.alimt.transform.v20181012.OpenAlimtServiceResponseUnmarshaller;
19+
import com.aliyuncs.transform.UnmarshallerContext;
20+
21+
/**
22+
* @author auto create
23+
* @version
24+
*/
25+
public class OpenAlimtServiceResponse extends AcsResponse {
26+
27+
private String requestId;
28+
29+
private String orderId;
30+
31+
public String getRequestId() {
32+
return this.requestId;
33+
}
34+
35+
public void setRequestId(String requestId) {
36+
this.requestId = requestId;
37+
}
38+
39+
public String getOrderId() {
40+
return this.orderId;
41+
}
42+
43+
public void setOrderId(String orderId) {
44+
this.orderId = orderId;
45+
}
46+
47+
@Override
48+
public OpenAlimtServiceResponse getInstance(UnmarshallerContext context) {
49+
return OpenAlimtServiceResponseUnmarshaller.unmarshall(this, context);
50+
}
51+
52+
@Override
53+
public boolean checkShowJsonItemName() {
54+
return false;
55+
}
56+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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.alimt.transform.v20181012;
16+
17+
import com.aliyuncs.alimt.model.v20181012.OpenAlimtServiceResponse;
18+
import com.aliyuncs.transform.UnmarshallerContext;
19+
20+
21+
public class OpenAlimtServiceResponseUnmarshaller {
22+
23+
public static OpenAlimtServiceResponse unmarshall(OpenAlimtServiceResponse openAlimtServiceResponse, UnmarshallerContext _ctx) {
24+
25+
openAlimtServiceResponse.setRequestId(_ctx.stringValue("OpenAlimtServiceResponse.RequestId"));
26+
openAlimtServiceResponse.setOrderId(_ctx.stringValue("OpenAlimtServiceResponse.OrderId"));
27+
28+
return openAlimtServiceResponse;
29+
}
30+
}

0 commit comments

Comments
 (0)