com.dahuatech.icc.assesscontrol.model.v202103.multipleCard.PersonGroupDelRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-sdk-accesscontrol Show documentation
Show all versions of java-sdk-accesscontrol Show documentation
Dahua ICC Open API SDK for Java
package com.dahuatech.icc.assesscontrol.model.v202103.multipleCard;
import com.dahuatech.hutool.http.Method;
import com.dahuatech.icc.assesscontrol.constant.AccessControlConstant;
import com.dahuatech.icc.assesscontrol.constant.ParamConstant;
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.util.CollectionUtil;
/**
* 删除人员组
*
* @author 237417
*/
public class PersonGroupDelRequest extends AbstractIccRequest {
/** 人员组ID */
private Long id;
public PersonGroupDelRequest(Builder builder) {
super(AccessControlConstant.url(AccessControlConstant.ASSESS_CONTROL_URL_PERSON_GROUP_DEL_POST), Method.POST);
this.id = builder.id;
putBodyParameter("id",id);
}
public PersonGroupDelRequest(){
super(AccessControlConstant.url(AccessControlConstant.ASSESS_CONTROL_URL_PERSON_GROUP_DEL_POST), Method.POST);
}
public static Builder builder() {
return new Builder();
}
@Override
public Class getResponseClass() {
return PersonGroupDelResponse.class;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
putBodyParameter("id",id);
}
public static class Builder {
/** 人员组ID */
private Long id;
public Builder id(Long id) {
this.id = id;
return this;
}
public PersonGroupDelRequest build() throws ClientException {
return new PersonGroupDelRequest(this);
}
}
public void businessValid() {
if(id == null){
throw new BusinessException(ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getCode(), ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getErrMsg(), "id");
}
}
}