Skip to content

Commit 0c11542

Browse files
committed
Add DescribeBackupTasks.
1 parent 3be6cea commit 0c11542

File tree

5 files changed

+298
-1
lines changed

5 files changed

+298
-1
lines changed

aliyun-java-sdk-polardb/ChangeLog.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2020-07-24 Version: 1.7.2
2+
- Add DescribeBackupTasks.
3+
14
2020-07-17 Version: 1.7.1
25
- Add DescribeDBClusterAuditLogCollector.
36
- Add DescribeBackupPolicy.

aliyun-java-sdk-polardb/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-polardb</artifactId>
66
<packaging>jar</packaging>
7-
<version>1.7.1</version>
7+
<version>1.7.2</version>
88
<name>aliyun-java-sdk-polardb</name>
99
<url>http://www.aliyun.com</url>
1010
<description>Aliyun Open API SDK for Java
Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
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.polardb.model.v20170801;
16+
17+
import com.aliyuncs.RpcAcsRequest;
18+
import com.aliyuncs.http.MethodType;
19+
import com.aliyuncs.polardb.Endpoint;
20+
21+
/**
22+
* @author auto create
23+
* @version
24+
*/
25+
public class DescribeBackupTasksRequest extends RpcAcsRequest<DescribeBackupTasksResponse> {
26+
27+
28+
private String backupJobId;
29+
30+
private Long resourceOwnerId;
31+
32+
private String resourceOwnerAccount;
33+
34+
private String dBClusterId;
35+
36+
private String ownerAccount;
37+
38+
private Long ownerId;
39+
40+
private String backupMode;
41+
public DescribeBackupTasksRequest() {
42+
super("polardb", "2017-08-01", "DescribeBackupTasks", "polardb");
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 getBackupJobId() {
51+
return this.backupJobId;
52+
}
53+
54+
public void setBackupJobId(String backupJobId) {
55+
this.backupJobId = backupJobId;
56+
if(backupJobId != null){
57+
putQueryParameter("BackupJobId", backupJobId);
58+
}
59+
}
60+
61+
public Long getResourceOwnerId() {
62+
return this.resourceOwnerId;
63+
}
64+
65+
public void setResourceOwnerId(Long resourceOwnerId) {
66+
this.resourceOwnerId = resourceOwnerId;
67+
if(resourceOwnerId != null){
68+
putQueryParameter("ResourceOwnerId", resourceOwnerId.toString());
69+
}
70+
}
71+
72+
public String getResourceOwnerAccount() {
73+
return this.resourceOwnerAccount;
74+
}
75+
76+
public void setResourceOwnerAccount(String resourceOwnerAccount) {
77+
this.resourceOwnerAccount = resourceOwnerAccount;
78+
if(resourceOwnerAccount != null){
79+
putQueryParameter("ResourceOwnerAccount", resourceOwnerAccount);
80+
}
81+
}
82+
83+
public String getDBClusterId() {
84+
return this.dBClusterId;
85+
}
86+
87+
public void setDBClusterId(String dBClusterId) {
88+
this.dBClusterId = dBClusterId;
89+
if(dBClusterId != null){
90+
putQueryParameter("DBClusterId", dBClusterId);
91+
}
92+
}
93+
94+
public String getOwnerAccount() {
95+
return this.ownerAccount;
96+
}
97+
98+
public void setOwnerAccount(String ownerAccount) {
99+
this.ownerAccount = ownerAccount;
100+
if(ownerAccount != null){
101+
putQueryParameter("OwnerAccount", ownerAccount);
102+
}
103+
}
104+
105+
public Long getOwnerId() {
106+
return this.ownerId;
107+
}
108+
109+
public void setOwnerId(Long ownerId) {
110+
this.ownerId = ownerId;
111+
if(ownerId != null){
112+
putQueryParameter("OwnerId", ownerId.toString());
113+
}
114+
}
115+
116+
public String getBackupMode() {
117+
return this.backupMode;
118+
}
119+
120+
public void setBackupMode(String backupMode) {
121+
this.backupMode = backupMode;
122+
if(backupMode != null){
123+
putQueryParameter("BackupMode", backupMode);
124+
}
125+
}
126+
127+
@Override
128+
public Class<DescribeBackupTasksResponse> getResponseClass() {
129+
return DescribeBackupTasksResponse.class;
130+
}
131+
132+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
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.polardb.model.v20170801;
16+
17+
import java.util.List;
18+
import com.aliyuncs.AcsResponse;
19+
import com.aliyuncs.polardb.transform.v20170801.DescribeBackupTasksResponseUnmarshaller;
20+
import com.aliyuncs.transform.UnmarshallerContext;
21+
22+
/**
23+
* @author auto create
24+
* @version
25+
*/
26+
public class DescribeBackupTasksResponse extends AcsResponse {
27+
28+
private String requestId;
29+
30+
private List<BackupJob> items;
31+
32+
public String getRequestId() {
33+
return this.requestId;
34+
}
35+
36+
public void setRequestId(String requestId) {
37+
this.requestId = requestId;
38+
}
39+
40+
public List<BackupJob> getItems() {
41+
return this.items;
42+
}
43+
44+
public void setItems(List<BackupJob> items) {
45+
this.items = items;
46+
}
47+
48+
public static class BackupJob {
49+
50+
private String backupJobId;
51+
52+
private String backupProgressStatus;
53+
54+
private String jobMode;
55+
56+
private String startTime;
57+
58+
private String process;
59+
60+
private String taskAction;
61+
62+
public String getBackupJobId() {
63+
return this.backupJobId;
64+
}
65+
66+
public void setBackupJobId(String backupJobId) {
67+
this.backupJobId = backupJobId;
68+
}
69+
70+
public String getBackupProgressStatus() {
71+
return this.backupProgressStatus;
72+
}
73+
74+
public void setBackupProgressStatus(String backupProgressStatus) {
75+
this.backupProgressStatus = backupProgressStatus;
76+
}
77+
78+
public String getJobMode() {
79+
return this.jobMode;
80+
}
81+
82+
public void setJobMode(String jobMode) {
83+
this.jobMode = jobMode;
84+
}
85+
86+
public String getStartTime() {
87+
return this.startTime;
88+
}
89+
90+
public void setStartTime(String startTime) {
91+
this.startTime = startTime;
92+
}
93+
94+
public String getProcess() {
95+
return this.process;
96+
}
97+
98+
public void setProcess(String process) {
99+
this.process = process;
100+
}
101+
102+
public String getTaskAction() {
103+
return this.taskAction;
104+
}
105+
106+
public void setTaskAction(String taskAction) {
107+
this.taskAction = taskAction;
108+
}
109+
}
110+
111+
@Override
112+
public DescribeBackupTasksResponse getInstance(UnmarshallerContext context) {
113+
return DescribeBackupTasksResponseUnmarshaller.unmarshall(this, context);
114+
}
115+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
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.polardb.transform.v20170801;
16+
17+
import java.util.ArrayList;
18+
import java.util.List;
19+
20+
import com.aliyuncs.polardb.model.v20170801.DescribeBackupTasksResponse;
21+
import com.aliyuncs.polardb.model.v20170801.DescribeBackupTasksResponse.BackupJob;
22+
import com.aliyuncs.transform.UnmarshallerContext;
23+
24+
25+
public class DescribeBackupTasksResponseUnmarshaller {
26+
27+
public static DescribeBackupTasksResponse unmarshall(DescribeBackupTasksResponse describeBackupTasksResponse, UnmarshallerContext _ctx) {
28+
29+
describeBackupTasksResponse.setRequestId(_ctx.stringValue("DescribeBackupTasksResponse.RequestId"));
30+
31+
List<BackupJob> items = new ArrayList<BackupJob>();
32+
for (int i = 0; i < _ctx.lengthValue("DescribeBackupTasksResponse.Items.Length"); i++) {
33+
BackupJob backupJob = new BackupJob();
34+
backupJob.setBackupJobId(_ctx.stringValue("DescribeBackupTasksResponse.Items["+ i +"].BackupJobId"));
35+
backupJob.setBackupProgressStatus(_ctx.stringValue("DescribeBackupTasksResponse.Items["+ i +"].BackupProgressStatus"));
36+
backupJob.setJobMode(_ctx.stringValue("DescribeBackupTasksResponse.Items["+ i +"].JobMode"));
37+
backupJob.setStartTime(_ctx.stringValue("DescribeBackupTasksResponse.Items["+ i +"].StartTime"));
38+
backupJob.setProcess(_ctx.stringValue("DescribeBackupTasksResponse.Items["+ i +"].Process"));
39+
backupJob.setTaskAction(_ctx.stringValue("DescribeBackupTasksResponse.Items["+ i +"].TaskAction"));
40+
41+
items.add(backupJob);
42+
}
43+
describeBackupTasksResponse.setItems(items);
44+
45+
return describeBackupTasksResponse;
46+
}
47+
}

0 commit comments

Comments
 (0)