com.dahuatech.icc.face.model.v202207.personInfo.UploadPicRequest Maven / Gradle / Ivy
The newest version!
package com.dahuatech.icc.face.model.v202207.personInfo;
import com.dahuatech.hutool.http.Method;
import com.dahuatech.icc.common.ParamValidEnum;
import com.dahuatech.icc.exception.ClientException;
import com.dahuatech.icc.face.constant.FaceConstant;
import com.dahuatech.icc.oauth.exception.BusinessException;
import com.dahuatech.icc.oauth.http.AbstractIccRequest;
import com.dahuatech.icc.util.StringUtils;
/**
* program:java-sdk
*
* Author: 312013
* Date:2022-07-25 17:34
* Description: 人员图片上传
*/
public class UploadPicRequest extends AbstractIccRequest {
private String fileName;
private String img;
public String getFileName() {
return fileName;
}
public void setFileName(String fileName) {
putBodyParameter("fileName",fileName);
this.fileName = fileName;
}
public String getImg() {
return img;
}
public void setImg(String img) {
putBodyParameter("img",img);
this.img = img;
}
public UploadPicRequest() {
super(FaceConstant.url(FaceConstant.UPLOAD_PIC_PERSON_INFO), Method.POST);
}
@Override
public Class getResponseClass() {
return UploadPicResponse.class;
}
public void businessValid() {
// if(StringUtils.isEmpty(fileName)){
// throw new BusinessException(ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getCode(), ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getErrMsg(), "fileName");
// }
// if(StringUtils.isEmpty(img)){
// throw new BusinessException(ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getCode(), ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getErrMsg(), "img");
// }
}
}