All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.dahuatech.icc.jpatrol.model.v202207.rule.RuleRequest 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;
import java.util.List;
/**
* program:java-sdk
*
* Author: 355079
* Date:2022-08-12 10:13
* Description: 新增计划
*/
public class RuleRequest extends AbstractIccRequest {
private Integer stat;
private String ruleName;
private Integer mode;
private Boolean ignore;
private Boolean neglect;
private String startDate;
private String endDate;
private String endTime;
private String startTime;
private Integer routeId;
private String routeName;
private Integer ruleKey;
private Integer ruleSetting;
private String userName;
private Integer userSource;
private List schedules;
public class Schedules{
private String startTime;
private String endTime;
private Integer configTimer;
private Integer routeId;
private String routeName;
private ListscheduleUsers;
public class ScheduleUsers{
private String userName;
private String userId;
private Integer userSource;
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
// putBodyParameter("userName",userName);
this.userName = userName;
}
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
// putBodyParameter("userId",userId);
this.userId = userId;
}
public Integer getUserSource() {
return userSource;
}
public void setUserSource(Integer userSource) {
// putBodyParameter("userSource",userSource);
this.userSource = userSource;
}
}
public String getStartTime() {
return startTime;
}
public void setStartTime(String startTime) {
// putBodyParameter("startTime",startTime);
this.startTime = startTime;
}
public String getEndTime() {
return endTime;
}
public void setEndTime(String endTime) {
// putBodyParameter("endTime",endTime);
this.endTime = endTime;
}
public Integer getConfigTimer() {
return configTimer;
}
public void setConfigTimer(Integer configTimer) {
// putBodyParameter("configTimer",configTimer);
this.configTimer = configTimer;
}
public Integer getRouteId() {
return routeId;
}
public void setRouteId(Integer routeId) {
// putBodyParameter("routeId",routeId);
this.routeId = routeId;
}
public String getRouteName() {
return routeName;
}
public void setRouteName(String routeName) {
// putBodyParameter("routeName",routeName);
this.routeName = routeName;
}
public List getScheduleUsers() {
return scheduleUsers;
}
public void setScheduleUsers(List scheduleUsers) {
// putBodyParameter("scheduleUsers",scheduleUsers);
this.scheduleUsers = scheduleUsers;
}
}
public Integer getStat() {
return stat;
}
public void setStat(Integer stat) {
putBodyParameter("stat",stat);
this.stat = stat;
}
public String getRuleName() {
return ruleName;
}
public void setRuleName(String ruleName) {
putBodyParameter("ruleName",ruleName);
this.ruleName = ruleName;
}
public Integer getMode() {
return mode;
}
public void setMode(Integer mode) {
putBodyParameter("mode",mode);
this.mode = mode;
}
public Boolean getIgnore() {
return ignore;
}
public void setIgnore(Boolean ignore) {
putBodyParameter("ignore",ignore);
this.ignore = ignore;
}
public Boolean getNeglect() {
return neglect;
}
public void setNeglect(Boolean neglect) {
putBodyParameter("neglect",neglect);
this.neglect = neglect;
}
public String getStartDate() {
return startDate;
}
public void setStartDate(String startDate) {
putBodyParameter("startDate",startDate);
this.startDate = startDate;
}
public String getEndDate() {
return endDate;
}
public void setEndDate(String endDate) {
putBodyParameter("endDate",endDate);
this.endDate = endDate;
}
public String getEndTime() {
return endTime;
}
public void setEndTime(String endTime) {
putBodyParameter("endTime",endTime);
this.endTime = endTime;
}
public String getStartTime() {
return startTime;
}
public void setStartTime(String startTime) {
putBodyParameter("startTime",startTime);
this.startTime = startTime;
}
public Integer getRouteId() {
return routeId;
}
public void setRouteId(Integer routeId) {
putBodyParameter("routeId",routeId);
this.routeId = routeId;
}
public String getRouteName() {
return routeName;
}
public void setRouteName(String routeName) {
putBodyParameter("routeName",routeName);
this.routeName = routeName;
}
public Integer getRuleKey() {
return ruleKey;
}
public void setRuleKey(Integer ruleKey) {
putBodyParameter("ruleKey",ruleKey);
this.ruleKey = ruleKey;
}
public Integer getRuleSetting() {
return ruleSetting;
}
public void setRuleSetting(Integer ruleSetting) {
putBodyParameter("ruleSetting",ruleSetting);
this.ruleSetting = ruleSetting;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
putBodyParameter("userName",userName);
this.userName = userName;
}
public Integer getUserSource() {
return userSource;
}
public void setUserSource(Integer userSource) {
putBodyParameter("userSource",userSource);
this.userSource = userSource;
}
public List getSchedules() {
return schedules;
}
public void setSchedules(List schedules) {
putBodyParameter("schedules",schedules);
this.schedules = schedules;
}
public RuleRequest() throws ClientException {
super(JpatrolConstant.url(JpatrolConstant.RULE), Method.POST);
}
public RuleRequest(HttpConfigInfo httpConfigInfo, String url, Method method) throws ClientException {
super(httpConfigInfo.getPrefixUrl() + url, method, Boolean.TRUE);
}
@Override
public Class getResponseClass() {
return RuleResponse.class;
}
public void businessValid() {
if (StringUtils.isEmpty(ruleName)) {
throw new BusinessException(ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getCode(), ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getErrMsg(), "ruleName");
}
if (mode==null) {
throw new BusinessException(ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getCode(), ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getErrMsg(), "mode");
}
if (StringUtils.isEmpty(startDate)) {
throw new BusinessException(ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getCode(), ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getErrMsg(), "startDate");
}
if (StringUtils.isEmpty(endDate)) {
throw new BusinessException(ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getCode(), ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getErrMsg(), "endDate");
}
if (routeId==null) {
throw new BusinessException(ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getCode(), ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getErrMsg(), "routeId");
}
if (schedules==null) {
throw new BusinessException(ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getCode(), ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getErrMsg(), "schedules");
}
}
}