Skip to content

Commit 4bdcf46

Browse files
committed
Add source id for file uploader.
1 parent 7104a5c commit 4bdcf46

File tree

7 files changed

+273
-15
lines changed

7 files changed

+273
-15
lines changed

aliyun-java-sdk-vcs/ChangeLog.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2020-07-22 Version: 1.0.9
2+
- Add source id for file uploader.
3+
14
2020-07-21 Version: 1.0.9
25
- Add algorithm type for ListPerson.
36

aliyun-java-sdk-vcs/src/main/java/com/aliyuncs/vcs/model/v20200515/AddDataSourceRequest.java

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ public class AddDataSourceRequest extends RpcAcsRequest<AddDataSourceResponse> {
3131

3232
private String description;
3333

34-
private String dataSourceName;
34+
private String dataSourceName;
35+
36+
private Integer fileRetentionDays;
3537
public AddDataSourceRequest() {
3638
super("Vcs", "2020-05-15", "AddDataSource");
3739
setMethod(MethodType.POST);
@@ -83,6 +85,17 @@ public void setDataSourceName(String dataSourceName) {
8385
if(dataSourceName != null){
8486
putBodyParameter("DataSourceName", dataSourceName);
8587
}
88+
}
89+
90+
public Integer getFileRetentionDays() {
91+
return this.fileRetentionDays;
92+
}
93+
94+
public void setFileRetentionDays(Integer fileRetentionDays) {
95+
this.fileRetentionDays = fileRetentionDays;
96+
if(fileRetentionDays != null){
97+
putBodyParameter("FileRetentionDays", fileRetentionDays.toString());
98+
}
8699
}
87100

88101
@Override
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
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.vcs.model.v20200515;
16+
17+
import com.aliyuncs.RpcAcsRequest;
18+
import com.aliyuncs.http.MethodType;
19+
import com.aliyuncs.vcs.Endpoint;
20+
21+
/**
22+
* @author auto create
23+
* @version
24+
*/
25+
public class SaveVideoSummaryTaskVideoRequest extends RpcAcsRequest<SaveVideoSummaryTaskVideoResponse> {
26+
27+
28+
private String corpId;
29+
30+
private Boolean saveVideo;
31+
32+
private Long taskId;
33+
public SaveVideoSummaryTaskVideoRequest() {
34+
super("Vcs", "2020-05-15", "SaveVideoSummaryTaskVideo");
35+
setMethod(MethodType.POST);
36+
try {
37+
com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointMap").set(this, Endpoint.endpointMap);
38+
com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointRegional").set(this, Endpoint.endpointRegionalType);
39+
} catch (Exception e) {}
40+
}
41+
42+
public String getCorpId() {
43+
return this.corpId;
44+
}
45+
46+
public void setCorpId(String corpId) {
47+
this.corpId = corpId;
48+
if(corpId != null){
49+
putBodyParameter("CorpId", corpId);
50+
}
51+
}
52+
53+
public Boolean getSaveVideo() {
54+
return this.saveVideo;
55+
}
56+
57+
public void setSaveVideo(Boolean saveVideo) {
58+
this.saveVideo = saveVideo;
59+
if(saveVideo != null){
60+
putBodyParameter("SaveVideo", saveVideo.toString());
61+
}
62+
}
63+
64+
public Long getTaskId() {
65+
return this.taskId;
66+
}
67+
68+
public void setTaskId(Long taskId) {
69+
this.taskId = taskId;
70+
if(taskId != null){
71+
putBodyParameter("TaskId", taskId.toString());
72+
}
73+
}
74+
75+
@Override
76+
public Class<SaveVideoSummaryTaskVideoResponse> getResponseClass() {
77+
return SaveVideoSummaryTaskVideoResponse.class;
78+
}
79+
80+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
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.vcs.model.v20200515;
16+
17+
import com.aliyuncs.AcsResponse;
18+
import com.aliyuncs.vcs.transform.v20200515.SaveVideoSummaryTaskVideoResponseUnmarshaller;
19+
import com.aliyuncs.transform.UnmarshallerContext;
20+
21+
/**
22+
* @author auto create
23+
* @version
24+
*/
25+
public class SaveVideoSummaryTaskVideoResponse extends AcsResponse {
26+
27+
private String code;
28+
29+
private String data;
30+
31+
private String message;
32+
33+
private String requestId;
34+
35+
public String getCode() {
36+
return this.code;
37+
}
38+
39+
public void setCode(String code) {
40+
this.code = code;
41+
}
42+
43+
public String getData() {
44+
return this.data;
45+
}
46+
47+
public void setData(String data) {
48+
this.data = data;
49+
}
50+
51+
public String getMessage() {
52+
return this.message;
53+
}
54+
55+
public void setMessage(String message) {
56+
this.message = message;
57+
}
58+
59+
public String getRequestId() {
60+
return this.requestId;
61+
}
62+
63+
public void setRequestId(String requestId) {
64+
this.requestId = requestId;
65+
}
66+
67+
@Override
68+
public SaveVideoSummaryTaskVideoResponse getInstance(UnmarshallerContext context) {
69+
return SaveVideoSummaryTaskVideoResponseUnmarshaller.unmarshall(this, context);
70+
}
71+
72+
@Override
73+
public boolean checkShowJsonItemName() {
74+
return false;
75+
}
76+
}

aliyun-java-sdk-vcs/src/main/java/com/aliyuncs/vcs/model/v20200515/UploadFileResponse.java

Lines changed: 48 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
*/
1414

1515
package com.aliyuncs.vcs.model.v20200515;
16-
16+
17+
import java.util.List;
1718
import com.aliyuncs.AcsResponse;
1819
import com.aliyuncs.vcs.transform.v20200515.UploadFileResponseUnmarshaller;
1920
import com.aliyuncs.transform.UnmarshallerContext;
@@ -26,12 +27,12 @@ public class UploadFileResponse extends AcsResponse {
2627

2728
private String code;
2829

29-
private String data;
30-
3130
private String message;
3231

3332
private String requestId;
3433

34+
private Data data;
35+
3536
public String getCode() {
3637
return this.code;
3738
}
@@ -40,14 +41,6 @@ public void setCode(String code) {
4041
this.code = code;
4142
}
4243

43-
public String getData() {
44-
return this.data;
45-
}
46-
47-
public void setData(String data) {
48-
this.data = data;
49-
}
50-
5144
public String getMessage() {
5245
return this.message;
5346
}
@@ -64,6 +57,50 @@ public void setRequestId(String requestId) {
6457
this.requestId = requestId;
6558
}
6659

60+
public Data getData() {
61+
return this.data;
62+
}
63+
64+
public void setData(Data data) {
65+
this.data = data;
66+
}
67+
68+
public static class Data {
69+
70+
private List<OssPath> records;
71+
72+
public List<OssPath> getRecords() {
73+
return this.records;
74+
}
75+
76+
public void setRecords(List<OssPath> records) {
77+
this.records = records;
78+
}
79+
80+
public static class OssPath {
81+
82+
private String ossPath;
83+
84+
private String sourceId;
85+
86+
public String getOssPath() {
87+
return this.ossPath;
88+
}
89+
90+
public void setOssPath(String ossPath) {
91+
this.ossPath = ossPath;
92+
}
93+
94+
public String getSourceId() {
95+
return this.sourceId;
96+
}
97+
98+
public void setSourceId(String sourceId) {
99+
this.sourceId = sourceId;
100+
}
101+
}
102+
}
103+
67104
@Override
68105
public UploadFileResponse getInstance(UnmarshallerContext context) {
69106
return UploadFileResponseUnmarshaller.unmarshall(this, context);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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.vcs.transform.v20200515;
16+
17+
import com.aliyuncs.vcs.model.v20200515.SaveVideoSummaryTaskVideoResponse;
18+
import com.aliyuncs.transform.UnmarshallerContext;
19+
20+
21+
public class SaveVideoSummaryTaskVideoResponseUnmarshaller {
22+
23+
public static SaveVideoSummaryTaskVideoResponse unmarshall(SaveVideoSummaryTaskVideoResponse saveVideoSummaryTaskVideoResponse, UnmarshallerContext _ctx) {
24+
25+
saveVideoSummaryTaskVideoResponse.setRequestId(_ctx.stringValue("SaveVideoSummaryTaskVideoResponse.RequestId"));
26+
saveVideoSummaryTaskVideoResponse.setCode(_ctx.stringValue("SaveVideoSummaryTaskVideoResponse.Code"));
27+
saveVideoSummaryTaskVideoResponse.setData(_ctx.stringValue("SaveVideoSummaryTaskVideoResponse.Data"));
28+
saveVideoSummaryTaskVideoResponse.setMessage(_ctx.stringValue("SaveVideoSummaryTaskVideoResponse.Message"));
29+
30+
return saveVideoSummaryTaskVideoResponse;
31+
}
32+
}

aliyun-java-sdk-vcs/src/main/java/com/aliyuncs/vcs/transform/v20200515/UploadFileResponseUnmarshaller.java

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@
1414

1515
package com.aliyuncs.vcs.transform.v20200515;
1616

17-
import com.aliyuncs.vcs.model.v20200515.UploadFileResponse;
17+
import java.util.ArrayList;
18+
import java.util.List;
19+
20+
import com.aliyuncs.vcs.model.v20200515.UploadFileResponse;
21+
import com.aliyuncs.vcs.model.v20200515.UploadFileResponse.Data;
22+
import com.aliyuncs.vcs.model.v20200515.UploadFileResponse.Data.OssPath;
1823
import com.aliyuncs.transform.UnmarshallerContext;
1924

2025

@@ -24,8 +29,20 @@ public static UploadFileResponse unmarshall(UploadFileResponse uploadFileRespons
2429

2530
uploadFileResponse.setRequestId(_ctx.stringValue("UploadFileResponse.RequestId"));
2631
uploadFileResponse.setCode(_ctx.stringValue("UploadFileResponse.Code"));
27-
uploadFileResponse.setData(_ctx.stringValue("UploadFileResponse.Data"));
28-
uploadFileResponse.setMessage(_ctx.stringValue("UploadFileResponse.Message"));
32+
uploadFileResponse.setMessage(_ctx.stringValue("UploadFileResponse.Message"));
33+
34+
Data data = new Data();
35+
36+
List<OssPath> records = new ArrayList<OssPath>();
37+
for (int i = 0; i < _ctx.lengthValue("UploadFileResponse.Data.Records.Length"); i++) {
38+
OssPath ossPath = new OssPath();
39+
ossPath.setOssPath(_ctx.stringValue("UploadFileResponse.Data.Records["+ i +"].OssPath"));
40+
ossPath.setSourceId(_ctx.stringValue("UploadFileResponse.Data.Records["+ i +"].SourceId"));
41+
42+
records.add(ossPath);
43+
}
44+
data.setRecords(records);
45+
uploadFileResponse.setData(data);
2946

3047
return uploadFileResponse;
3148
}

0 commit comments

Comments
 (0)