com.dahuatech.icc.jpatrol.model.v202207.rule.RuleDaysRequest Maven / Gradle / Ivy
package com.dahuatech.icc.jpatrol.model.v202207.rule;
import com.dahuatech.hutool.http.Method;
import com.dahuatech.icc.common.ParamValidEnum;
import com.dahuatech.icc.exception.ClientException;
import com.dahuatech.icc.jpatrol.constant.JpatrolConstant;
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-08-11 17:21
* Description: 查询某日排班
*/
public class RuleDaysRequest extends AbstractIccRequest {
private String startDate;
public String getStartDate() {
return startDate;
}
public void setStartDate(String startDate) {
putBodyParameter("startDate",startDate);
this.startDate = startDate;
}
public RuleDaysRequest() throws ClientException {
super(JpatrolConstant.url(JpatrolConstant.RULE_DAYS), Method.POST);
}
public RuleDaysRequest(HttpConfigInfo httpConfigInfo, String url, Method method) throws ClientException {
super(httpConfigInfo.getPrefixUrl() + url, method, Boolean.TRUE);
}
@Override
public Class getResponseClass() {
return RuleDaysResponse.class;
}
public void businessValid() {
if (StringUtils.isEmpty(startDate)) {
throw new BusinessException(ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getCode(), ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getErrMsg(), "startDate");
}
}
}