com.dahuatech.icc.electricity.model.v202208.detection.ShowInfosRequest Maven / Gradle / Ivy
The newest version!
package com.dahuatech.icc.electricity.model.v202208.detection;
import com.dahuatech.hutool.http.Method;
import com.dahuatech.icc.common.ParamValidEnum;
import com.dahuatech.icc.electricity.constant.ElectricityConstant;
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 java.util.List;
/**
* program:java-sdk
*
* @Author: 355079
* @Date:2022-08-23 12:03
* @Description:
*/
public class ShowInfosRequest extends AbstractIccRequest {
private List orgData;
private List gatewayData;
private List data;
private Integer action;
private Integer pageNum;
private Integer pageSize;
public List getOrgData() {
return orgData;
}
public void setOrgData(List orgData) {
putBodyParameter("orgData",orgData);
this.orgData = orgData;
}
public List getGatewayData() {
return gatewayData;
}
public void setGatewayData(List gatewayData) {
putBodyParameter("gatewayData",gatewayData);
this.gatewayData = gatewayData;
}
public List getData() {
return data;
}
public void setData(List data) {
putBodyParameter("data",data);
this.data = data;
}
public Integer getAction() {
return action;
}
public void setAction(Integer action) {
putBodyParameter("action",action);
this.action = action;
}
public Integer getPageNum() {
return pageNum;
}
public void setPageNum(Integer pageNum) {
putBodyParameter("pageNum",pageNum);
this.pageNum = pageNum;
}
public Integer getPageSize() {
return pageSize;
}
public void setPageSize(Integer pageSize) {
putBodyParameter("pageSize",pageSize);
this.pageSize = pageSize;
}
public ShowInfosRequest() throws ClientException {
super(ElectricityConstant.url(ElectricityConstant.SHOW_INFOS), Method.POST);
}
public ShowInfosRequest(HttpConfigInfo httpConfigInfo, String url, Method method) throws ClientException {
super(httpConfigInfo.getPrefixUrl() + url, method, Boolean.TRUE);
}
@Override
public Class getResponseClass() {
return ShowInfosResponse.class;
}
public void businessValid() {
if (orgData==null) {
throw new BusinessException(ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getCode(), ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getErrMsg(), "orgData");
}
if (gatewayData==null) {
throw new BusinessException(ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getCode(), ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getErrMsg(), "gatewayData");
}
if (data==null) {
throw new BusinessException(ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getCode(), ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getErrMsg(), "data");
}
if (action==null) {
throw new BusinessException(ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getCode(), ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getErrMsg(), "action");
}
if (pageNum==null) {
throw new BusinessException(ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getCode(), ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getErrMsg(), "pageNum");
}
if (pageSize==null) {
throw new BusinessException(ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getCode(), ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getErrMsg(), "pageSize");
}
}
}