com.dahuatech.icc.cirs.model.v202209.program.BatchDeleteRequest Maven / Gradle / Ivy
The newest version!
package com.dahuatech.icc.cirs.model.v202209.program;
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.CollectionUtil;
import java.util.ArrayList;
import java.util.List;
/**
* program:java-sdk
*
* @Author: 355079
* @Date:2022-09-07 16:57
* @Description: 删除节目
*/
public class BatchDeleteRequest extends AbstractIccRequest {
private Listids=new ArrayList<>();
public List getIds() {
return ids;
}
public void setIds(List ids) {
putBodyParameter("ids",ids);
this.ids = ids;
}
public BatchDeleteRequest() throws ClientException {
super(CirsConstant.url(CirsConstant.BATCH_DELETE), Method.POST);
}
public BatchDeleteRequest(HttpConfigInfo httpConfigInfo, String url, Method method) throws ClientException {
super(httpConfigInfo.getPrefixUrl() + url, method, Boolean.TRUE);
}
@Override
public Class getResponseClass() {
return BatchDeleteResponse.class;
}
public void businessValid() throws BusinessException {
if(CollectionUtil.isEmpty(ids)){
throw new BusinessException(ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getCode(), ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getErrMsg(), "ids");
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy