com.dahuatech.icc.cirs.model.v202209.group.UpdateGroupRequest Maven / Gradle / Ivy
The newest version!
package com.dahuatech.icc.cirs.model.v202209.group;
import com.dahuatech.hutool.http.Method;
import com.dahuatech.icc.cirs.constant.CirsConstant;
import com.dahuatech.icc.common.ParamValidEnum;
import com.dahuatech.icc.exception.ClientException;
import com.dahuatech.icc.oauth.exception.BusinessException;
import com.dahuatech.icc.oauth.http.AbstractIccRequest;
import com.dahuatech.icc.oauth.model.v202010.HttpConfigInfo;
import com.dahuatech.icc.util.StringUtils;
/**
* program:java-sdk
*
* @Author: 355079
* @Date:2022-09-05 13:39
* @Description: 修改分组
*/
public class UpdateGroupRequest extends AbstractIccRequest {
private String groupName;
private Long id;
private Integer type;
public String getGroupName() {
return groupName;
}
public void setGroupName(String groupName) {
putBodyParameter("groupName",groupName);
this.groupName = groupName;
}
public Long getId() {
return id;
}
public void setId(Long id) {
putBodyParameter("id",id);
this.id = id;
}
public Integer getType() {
return type;
}
public void setType(Integer type) {
putBodyParameter("type",type);
this.type = type;
}
public UpdateGroupRequest() throws ClientException {
super(CirsConstant.url(CirsConstant.UPDATE_SCREEN_RESOLUTION), Method.POST);
}
public UpdateGroupRequest(HttpConfigInfo httpConfigInfo, String url, Method method) throws ClientException {
super(httpConfigInfo.getPrefixUrl() + url, method, Boolean.TRUE);
}
@Override
public Class getResponseClass() {
return UpdateGroupResponse.class;
}
public void businessValid() {
if (StringUtils.isEmpty(groupName)) {
throw new BusinessException(ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getCode(), ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getErrMsg(), "groupName");
}
if(id==null){
throw new BusinessException(ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getCode(), ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getErrMsg(), "id");
}
if(type==null){
throw new BusinessException(ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getCode(), ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getErrMsg(), "type");
}
if(type<0||type>6){
throw new BusinessException(ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getCode(), ParamValidEnum.PARAM_SCOP_ERROR.getErrMsg(), "type");
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy