Skip to content

Commit 8938b8a

Browse files
author
codezhang
committed
修复udb ChangeUDBParamGroupParam
1 parent 664888b commit 8938b8a

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

ucloud-sdk-java-udb/src/main/java/cn/ucloud/udb/model/ChangeUDBParamGroupParam.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import cn.ucloud.common.pojo.BaseRequestParam;
55

66
import javax.validation.constraints.NotEmpty;
7+
import javax.validation.constraints.NotNull;
78

89
/**
910
* @Description : 修改配置文件 参数类
@@ -36,12 +37,12 @@ public class ChangeUDBParamGroupParam extends BaseRequestParam {
3637
* 参数组Id
3738
*/
3839
@UcloudParam("GroupId")
39-
@NotEmpty(message = "groupId can not be empty")
40-
private String groupId;
40+
@NotNull(message = "groupId can not be null")
41+
private Integer groupId;
4142

4243
public ChangeUDBParamGroupParam(@NotEmpty(message = "region can not be empty") String region,
4344
@NotEmpty(message = "dbId can not be empty") String dbId,
44-
@NotEmpty(message = "groupId can not be empty") String groupId) {
45+
@NotNull(message = "groupId can not be empty") Integer groupId) {
4546
super("ChangeUDBParamGroup");
4647
this.region = region;
4748
this.dbId = dbId;
@@ -72,11 +73,12 @@ public void setDbId(String dbId) {
7273
this.dbId = dbId;
7374
}
7475

75-
public String getGroupId() {
76+
77+
public Integer getGroupId() {
7678
return groupId;
7779
}
7880

79-
public void setGroupId(String groupId) {
81+
public void setGroupId(Integer groupId) {
8082
this.groupId = groupId;
8183
}
8284
}

ucloud-sdk-java-udb/src/test/java/cn/ucloud/udb/client/ChangeUDBParamGroupTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public class ChangeUDBParamGroupTest {
2222
@Before
2323
public void setUp() throws Exception {
2424
client = GetUDBClient.getUDBClient();
25-
param = new ChangeUDBParamGroupParam("cn-sh2", "udb-04wyi5pz", "2");
25+
param = new ChangeUDBParamGroupParam("cn-sh2", "udb-04wyi5pz", 2);
2626
param.setProjectId("org-izug1m");
2727
}
2828

0 commit comments

Comments
 (0)