com.dahuatech.icc.brm.model.v202010.user.BrmUserSyncRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-sdk-brm Show documentation
Show all versions of java-sdk-brm Show documentation
Dahua ICC Open API SDK for Java
The newest version!
package com.dahuatech.icc.brm.model.v202010.user;
import com.dahuatech.hutool.http.Method;
import com.dahuatech.icc.brm.constant.BrmConstant;
import com.dahuatech.icc.brm.constant.ParamConstant;
import com.dahuatech.icc.brm.exception.BusinessException;
import com.dahuatech.icc.exception.ClientException;
import com.dahuatech.icc.oauth.http.AbstractIccRequest;
import com.dahuatech.icc.util.CollectionUtil;
import java.util.List;
/**
* 用户全量同步
*
* @author 237417
* @since 1.0.0 2020-02-04
*/
public class BrmUserSyncRequest extends AbstractIccRequest {
private Integer pageNum;
private Integer pageSize;
private String sort;
private String sortType;
private Integer searchKey;
private List userIdList;
private List ownerCodeList;
private List loginNameList;
private List personIdList;
private Integer isReuse;
private boolean includeSubOwnerCodeFlag;
public BrmUserSyncRequest(Builder builder) {
super(BrmConstant.url(BrmConstant.BRM_URL_USER_LIST_PAGE_POST), Method.POST);
this.pageNum = builder.pageNum;
this.pageSize = builder.pageSize;
this.sort = builder.sort;
this.sortType = builder.sortType;
this.searchKey = builder.searchKey;
this.userIdList = builder.userIdList;
this.ownerCodeList = builder.ownerCodeList;
this.loginNameList = builder.loginNameList;
this.personIdList = builder.personIdList;
this.isReuse = builder.isReuse;
this.includeSubOwnerCodeFlag = builder.includeSubOwnerCodeFlag;
putBodyParameter("pageNum",pageNum);
putBodyParameter("pageSize",pageSize);
putBodyParameter("sort",sort);
putBodyParameter("sortType",sortType);
putBodyParameter("searchKey",searchKey);
putBodyParameter("userIdList",userIdList);
putBodyParameter("ownerCodeList",ownerCodeList);
putBodyParameter("loginNameList",loginNameList);
putBodyParameter("personIdList",personIdList);
putBodyParameter("isReuse",isReuse);
putBodyParameter("includeSubOwnerCodeFlag", includeSubOwnerCodeFlag);
}
public BrmUserSyncRequest(){
super(BrmConstant.url(BrmConstant.BRM_URL_USER_LIST_PAGE_POST), Method.POST);
}
public static Builder builder() {
return new Builder();
}
@Override
public Class getResponseClass() {
return BrmUserSyncResponse.class;
}
public Integer getPageNum() {
return pageNum;
}
public void setPageNum(Integer pageNum) {
this.pageNum = pageNum;
putBodyParameter("pageNum",pageNum);
}
public Integer getPageSize() {
return pageSize;
}
public void setPageSize(Integer pageSize) {
this.pageSize = pageSize;
putBodyParameter("pageSize",pageSize);
}
public String getSort() {
return sort;
}
public void setSort(String sort) {
this.sort = sort;
putBodyParameter("sort",sort);
}
public String getSortType() {
return sortType;
}
public void setSortType(String sortType) {
this.sortType = sortType;
putBodyParameter("sortType",sortType);
}
public Integer getSearchKey() {
return searchKey;
}
public void setSearchKey(Integer searchKey) {
this.searchKey = searchKey;
putBodyParameter("searchKey",searchKey);
}
public List getUserIdList() {
return userIdList;
}
public void setUserIdList(List userIdList) {
this.userIdList = userIdList;
putBodyParameter("userIdList",userIdList);
}
public List getOwnerCodeList() {
return ownerCodeList;
}
public void setOwnerCodeList(List ownerCodeList) {
this.ownerCodeList = ownerCodeList;
putBodyParameter("ownerCodeList",ownerCodeList);
}
public List getLoginNameList() {
return loginNameList;
}
public void setLoginNameList(List loginNameList) {
this.loginNameList = loginNameList;
putBodyParameter("loginNameList",loginNameList);
}
public List getPersonIdList() {
return personIdList;
}
public void setPersonIdList(List personIdList) {
this.personIdList = personIdList;
putBodyParameter("personIdList",personIdList);
}
public Integer getIsReuse() {
return isReuse;
}
public void setIsReuse(Integer isReuse) {
this.isReuse = isReuse;
putBodyParameter("isReuse",isReuse);
}
public boolean isIncludeSubOwnerCodeFlag() {
return includeSubOwnerCodeFlag;
}
public void setIncludeSubOwnerCodeFlag(boolean includeSubOwnerCodeFlag) {
this.includeSubOwnerCodeFlag = includeSubOwnerCodeFlag;
putBodyParameter("includeSubOwnerCodeFlag", includeSubOwnerCodeFlag);
}
@Override
public String toString() {
return "BrmUserSyncRequest{" +
"pageNum=" + pageNum +
", pageSize=" + pageSize +
", sort='" + sort + '\'' +
", sortType='" + sortType + '\'' +
", searchKey=" + searchKey +
", userIdList=" + userIdList +
", ownerCodeList=" + ownerCodeList +
", loginNameList=" + loginNameList +
", personIdList=" + personIdList +
", isReuse=" + isReuse +
", includeSubOwnerCodeFlag=" + includeSubOwnerCodeFlag +
'}';
}
public static class Builder {
/** 第几页 默认1 */
private Integer pageNum;
/** 一页几条 默认10 */
private Integer pageSize;
/** 排序字符:id(默认) */
private String sort;
/** 排序规则:正序-ASC,倒叙-DESC(默认) */
private String sortType;
/** 模糊搜索关键字 */
private Integer searchKey;
/** 用户ID列表 列表最大支持500 */
private List userIdList;
/** 所属组织编码列表 列表最大支持500 */
private List ownerCodeList;
/** 登录名称列表 列表最大支持500 */
private List loginNameList;
/** 绑定人员ID列表 列表最大支持500 */
private List personIdList;
/** 是否复用 */
private Integer isReuse;
/** 是否包含下级组织节点,所属组织编码列表存在时生效默认false */
private boolean includeSubOwnerCodeFlag;
public Builder pageNum(Integer pageNum) {
this.pageNum = pageNum;
return this;
}
public Builder pageSize(Integer pageSize) {
this.pageSize = pageSize;
return this;
}
public Builder sort(String sort) {
this.sort = sort;
return this;
}
public Builder sortType(String sortType) {
this.sortType = sortType;
return this;
}
public Builder searchKey(Integer searchKey) {
this.searchKey = searchKey;
return this;
}
public Builder userIdList(List userIdList) {
this.userIdList = userIdList;
return this;
}
public Builder ownerCodeList(List ownerCodeList) {
this.ownerCodeList = ownerCodeList;
return this;
}
public Builder loginNameList(List loginNameList) {
this.loginNameList = loginNameList;
return this;
}
public Builder isReuse(Integer isReuse) {
this.isReuse = isReuse;
return this;
}
public Builder includeSubOwnerCodeFlag(Boolean includeSubOwnerCodeFlag) {
this.includeSubOwnerCodeFlag = includeSubOwnerCodeFlag;
return this;
}
public BrmUserSyncRequest build() throws ClientException {
return new BrmUserSyncRequest(this);
}
}
public void businessValid() {
}
}