All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.dahuatech.icc.passengerflow.model.v202207.label.RegionLabelPageRequest Maven / Gradle / Ivy

package com.dahuatech.icc.passengerflow.model.v202207.label;

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;

/**
 * program:java-sdk
 *
 * Author: 355079
 * Date:2022-08-08 16:13
 * Description: 获取区域类别
 */
public class RegionLabelPageRequest extends AbstractIccRequest {
    private String labelName;
    private Integer pageNum;
    private Integer pageSize;

    public String getLabelName() {
        return labelName;
    }

    public void setLabelName(String labelName) {
        putBodyParameter("labelName", labelName);
        this.labelName = labelName;
    }

    public Integer getPageNum() {
        return pageNum;
    }

    public void setPageNum(Integer pageNum) {
        putBodyParameter("pageNum", pageNum);
        this.pageNum = pageNum;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        putBodyParameter("pageSize", pageSize);
        this.pageSize = pageSize;
    }

    public RegionLabelPageRequest() throws ClientException {
        super(PassengerFlowConstant.url(PassengerFlowConstant.REGION_LABEL_PAGE), Method.POST);
    }

    public RegionLabelPageRequest(HttpConfigInfo httpConfigInfo, String url, Method method) throws ClientException {
        super(httpConfigInfo.getPrefixUrl() + url, method, Boolean.TRUE);
    }

    @Override
    public Class getResponseClass() {
        return RegionLabelPageResponse.class;
    }

    public void businessValid() {
        if (pageNum == null) {
            throw new BusinessException(ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getCode(), ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getErrMsg(), "pageNum");
        }
        if (pageSize == null) {
            throw new BusinessException(ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getCode(), ParamValidEnum.PARAM_NOT_EMPTY_ERROR.getErrMsg(), "pageSize");
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy