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

com.dahuatech.icc.passengerflow.model.v202207.region.RegionConfigPageRequest Maven / Gradle / Ivy

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

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-09 09:20
 * Description: 区域配置列表
 */
public class RegionConfigPageRequest extends AbstractIccRequest {
    private String singleCondition;
    private Integer pageNum;
    private Integer pageSize;

    public String getSingleCondition() {
        return singleCondition;
    }

    public void setSingleCondition(String singleCondition) {
        putBodyParameter("singleCondition",singleCondition);
        this.singleCondition = singleCondition;
    }

    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 RegionConfigPageRequest() throws ClientException {
        super(PassengerFlowConstant.url(PassengerFlowConstant.REGION_CONFIG_PAGE), Method.POST);
    }

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

    @Override
    public Class getResponseClass() {
        return RegionConfigPageResponse.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