com.dahuatech.icc.cirs.model.v202209.screenResolution.UpdateScreenResolutionRequest Maven / Gradle / Ivy
package com.dahuatech.icc.cirs.model.v202209.screenResolution;
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;
/**
* program:java-sdk
*
* @Author: 355079
* @Date:2022-09-05 15:49
* @Description: 更新分辨率
*/
public class UpdateScreenResolutionRequest extends AbstractIccRequest {
private Integer id;
private String name;
private Integer x;
private Integer y;
public Integer getId() {
return id;
}
public void setId(Integer id) {
putBodyParameter("id",id);
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
putBodyParameter("name",name);
this.name = name;
}
public Integer getX() {
return x;
}
public void setX(Integer x) {
putBodyParameter("x",x);
this.x = x;
}
public Integer getY() {
return y;
}
public void setY(Integer y) {
putBodyParameter("y",y);
this.y = y;
}
public UpdateScreenResolutionRequest() throws ClientException {
super(CirsConstant.url(CirsConstant.UPDATE_SCREEN_RESOLUTION), Method.POST);
}
public UpdateScreenResolutionRequest(HttpConfigInfo httpConfigInfo, String url, Method method) throws ClientException {
super(httpConfigInfo.getPrefixUrl() + url, method, Boolean.TRUE);
}
@Override
public Class getResponseClass() {
return UpdateScreenResolutionResponse.class;
}
public void businessValid() {
if(id==null){
throw new BusinessException(ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getCode(), ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getErrMsg(), "id");
}
if(x==null){
throw new BusinessException(ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getCode(), ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getErrMsg(), "x");
}
if(y==null){
throw new BusinessException(ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getCode(), ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getErrMsg(), "y");
}
}
}