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

com.dingtalk.api.request.OapiAttendanceGroupMemberUpdateRequest Maven / Gradle / Ivy

The newest version!
package com.dingtalk.api.request;

import java.util.List;
import com.taobao.api.internal.mapping.ApiField;
import com.taobao.api.internal.util.RequestCheckUtils;
import com.taobao.api.internal.mapping.ApiListField;
import com.taobao.api.TaobaoObject;
import java.util.Map;
import java.util.List;

import com.taobao.api.ApiRuleException;
import com.taobao.api.BaseTaobaoRequest;
import com.dingtalk.api.DingTalkConstants;
import com.taobao.api.Constants;
import com.taobao.api.internal.util.TaobaoHashMap;
import com.taobao.api.internal.util.TaobaoUtils;
import com.taobao.api.internal.util.json.JSONWriter;
import com.dingtalk.api.response.OapiAttendanceGroupMemberUpdateResponse;

/**
 * TOP DingTalk-API: dingtalk.oapi.attendance.group.member.update request
 * 
 * @author top auto create
 * @since 1.0, 2019.08.16
 */
public class OapiAttendanceGroupMemberUpdateRequest extends BaseTaobaoRequest {
	
	

	/** 
	* 考勤组id
	 */
	private Long groupId;

	/** 
	* 操作人userId
	 */
	private String opUserId;

	/** 
	* 0表示从今天开始排班,1表示从明天
	 */
	private Long scheduleFlag;

	/** 
	* 更新入参
	 */
	private String updateParam;

	public void setGroupId(Long groupId) {
		this.groupId = groupId;
	}

	public Long getGroupId() {
		return this.groupId;
	}

	public void setOpUserId(String opUserId) {
		this.opUserId = opUserId;
	}

	public String getOpUserId() {
		return this.opUserId;
	}

	public void setScheduleFlag(Long scheduleFlag) {
		this.scheduleFlag = scheduleFlag;
	}

	public Long getScheduleFlag() {
		return this.scheduleFlag;
	}

	public void setUpdateParam(String updateParam) {
		this.updateParam = updateParam;
	}

	public void setUpdateParam(TopGroupMemberUpdateParam updateParam) {
		this.updateParam = new JSONWriter(false,false,true).write(updateParam);
	}

	public String getUpdateParam() {
		return this.updateParam;
	}

	public String getApiMethodName() {
		return "dingtalk.oapi.attendance.group.member.update";
	}

	private String topResponseType = Constants.RESPONSE_TYPE_DINGTALK_OAPI;

     public String getTopResponseType() {
        return this.topResponseType;
     }

     public void setTopResponseType(String topResponseType) {
        this.topResponseType = topResponseType;
     }

     public String getTopApiCallType() {
        return DingTalkConstants.CALL_TYPE_OAPI;
     }

     private String topHttpMethod = DingTalkConstants.HTTP_METHOD_POST;

     public String getTopHttpMethod() {
     	return this.topHttpMethod;
     }

     public void setTopHttpMethod(String topHttpMethod) {
        this.topHttpMethod = topHttpMethod;
     }

     public void setHttpMethod(String httpMethod) {
         this.setTopHttpMethod(httpMethod);
     }

	public Map getTextParams() {		
		TaobaoHashMap txtParams = new TaobaoHashMap();
		txtParams.put("group_id", this.groupId);
		txtParams.put("op_user_id", this.opUserId);
		txtParams.put("schedule_flag", this.scheduleFlag);
		txtParams.put("update_param", this.updateParam);
		if(this.udfParams != null) {
			txtParams.putAll(this.udfParams);
		}
		return txtParams;
	}

	public Class getResponseClass() {
		return OapiAttendanceGroupMemberUpdateResponse.class;
	}

	public void check() throws ApiRuleException {
		RequestCheckUtils.checkNotEmpty(groupId, "groupId");
		RequestCheckUtils.checkNotEmpty(opUserId, "opUserId");
		RequestCheckUtils.checkNotEmpty(scheduleFlag, "scheduleFlag");
	}
	
	/**
	 * 更新入参
	 *
	 * @author top auto create
	 * @since 1.0, null
	 */
	public static class TopGroupMemberUpdateParam extends TaobaoObject {
		private static final long serialVersionUID = 7844593172683658838L;
		/**
		 * 要添加的考勤部门,没有的话,无需赋值
		 */
		@ApiListField("add_depts")
		@ApiField("string")
		private List addDepts;
		/**
		 * 要添加的无需考勤人员,没有的话,无需赋值
		 */
		@ApiListField("add_extra_users")
		@ApiField("string")
		private List addExtraUsers;
		/**
		 * 要添加的考勤人员,没有的话,无需赋值
		 */
		@ApiListField("add_users")
		@ApiField("string")
		private List addUsers;
		/**
		 * 要删除的考勤部门,没有的话,无需赋值
		 */
		@ApiListField("remove_depts")
		@ApiField("string")
		private List removeDepts;
		/**
		 * 要删除的无需考勤人员,没有的话,无需赋值
		 */
		@ApiListField("remove_extra_users")
		@ApiField("string")
		private List removeExtraUsers;
		/**
		 * 要删除的考勤人员,没有的话,无需赋值
		 */
		@ApiListField("remove_users")
		@ApiField("string")
		private List removeUsers;
	
		public List getAddDepts() {
			return this.addDepts;
		}
		public void setAddDepts(List addDepts) {
			this.addDepts = addDepts;
		}
		public List getAddExtraUsers() {
			return this.addExtraUsers;
		}
		public void setAddExtraUsers(List addExtraUsers) {
			this.addExtraUsers = addExtraUsers;
		}
		public List getAddUsers() {
			return this.addUsers;
		}
		public void setAddUsers(List addUsers) {
			this.addUsers = addUsers;
		}
		public List getRemoveDepts() {
			return this.removeDepts;
		}
		public void setRemoveDepts(List removeDepts) {
			this.removeDepts = removeDepts;
		}
		public List getRemoveExtraUsers() {
			return this.removeExtraUsers;
		}
		public void setRemoveExtraUsers(List removeExtraUsers) {
			this.removeExtraUsers = removeExtraUsers;
		}
		public List getRemoveUsers() {
			return this.removeUsers;
		}
		public void setRemoveUsers(List removeUsers) {
			this.removeUsers = removeUsers;
		}
	}
	

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy