com.dahuatech.icc.passengerflow.model.v202207.customer.GetCustomerImageRequest Maven / Gradle / Ivy
package com.dahuatech.icc.passengerflow.model.v202207.customer;
import com.dahuatech.hutool.http.Method;
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.passengerflow.constant.PassengerFlowConstant;
import com.dahuatech.icc.util.StringUtils;
/**
* program:java-sdk
*
* Author: 355079
* Date:2022-08-10 14:32
* Description: 客户画像统计
*/
public class GetCustomerImageRequest extends AbstractIccRequest {
private String regionCode;
public String getRegionCode() {
return regionCode;
}
public void setRegionCode(String regionCode) {
putBodyParameter("regionCode",regionCode);
this.regionCode = regionCode;
}
public GetCustomerImageRequest() throws ClientException {
super(PassengerFlowConstant.url(PassengerFlowConstant.GET_CUSTOMER_IMAGE), Method.POST);
}
public GetCustomerImageRequest(HttpConfigInfo httpConfigInfo, String url, Method method) throws ClientException {
super(httpConfigInfo.getPrefixUrl() + url, method, Boolean.TRUE);
}
@Override
public Class getResponseClass() {
return GetCustomerImageResponse.class;
}
public void businessValid() {
if (StringUtils.isEmpty(regionCode)) {
throw new BusinessException(ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getCode(), ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getErrMsg(), "regionCode");
}
}
}