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

com.dahuatech.icc.electricity.model.v202208.detection.IosDevicesOperatorRequest Maven / Gradle / Ivy

The newest version!
package com.dahuatech.icc.electricity.model.v202208.detection;

import com.dahuatech.hutool.http.Method;
import com.dahuatech.icc.common.ParamValidEnum;
import com.dahuatech.icc.electricity.constant.ElectricityConstant;
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 java.util.List;

/**
 * program:java-sdk
 *
 * @Author: 355079
 * @Date:2022-08-23 13:59
 * @Description:
 */
public class IosDevicesOperatorRequest extends AbstractIccRequest {
    private Integer action;
    private List dataList;

    public Integer getAction() {
        return action;
    }

    public void setAction(Integer action) {
        putBodyParameter("action",action);
        this.action = action;
    }

    public List getDataList() {
        return dataList;
    }

    public void setDataList(List dataList) {
        putBodyParameter("dataList",dataList);
        this.dataList = dataList;
    }

    public IosDevicesOperatorRequest() throws ClientException {
        super(ElectricityConstant.url(ElectricityConstant.IOS_DEVICES_OPERATOR), Method.POST);
    }

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy