using System; using System.Collections.Generic; using Top.Api.Util; using Top.Api; using Top.Api.DingTalk; namespace DingTalk.Api.Request { /// /// TOP API: dingtalk.oapi.attendance.vacation.quota.list /// public class OapiAttendanceVacationQuotaListRequest : BaseDingTalkRequest { /// /// 假期类型唯一标识 /// public string LeaveCode { get; set; } /// /// 分页偏移(从0开始非负整数) /// public Nullable Offset { get; set; } /// /// 操作者ID /// public string OpUserid { get; set; } /// /// 分页偏移(正整数 最大200) /// public Nullable Size { get; set; } /// /// 待查询的员工ID列表 /// public string Userids { get; set; } #region IDingTalkRequest Members public override string GetApiName() { return "dingtalk.oapi.attendance.vacation.quota.list"; } public override string GetApiCallType() { return DingTalkConstants.CALL_TYPE_OAPI; } public override IDictionary GetParameters() { TopDictionary parameters = new TopDictionary(); parameters.Add("leave_code", this.LeaveCode); parameters.Add("offset", this.Offset); parameters.Add("op_userid", this.OpUserid); parameters.Add("size", this.Size); parameters.Add("userids", this.Userids); if (this.otherParams != null) { parameters.AddAll(this.otherParams); } return parameters; } public override void Validate() { RequestValidator.ValidateRequired("leave_code", this.LeaveCode); RequestValidator.ValidateRequired("offset", this.Offset); RequestValidator.ValidateMinValue("offset", this.Offset, 0); RequestValidator.ValidateRequired("op_userid", this.OpUserid); RequestValidator.ValidateRequired("size", this.Size); RequestValidator.ValidateMaxValue("size", this.Size, 200); RequestValidator.ValidateRequired("userids", this.Userids); RequestValidator.ValidateMaxListSize("userids", this.Userids, 50); } #endregion } }