zrg
2024-08-16 18865d8bf24382e850e661dec6cca0e8b9dba6ae
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
using System;
using System.Collections.Generic;
using Top.Api.Util;
using Top.Api;
using Top.Api.DingTalk;
 
namespace DingTalk.Api.Request
{
    /// <summary>
    /// TOP API: dingtalk.smartwork.attends.getleaveapproveduration
    /// </summary>
    public class SmartworkAttendsGetleaveapprovedurationRequest : BaseDingTalkRequest<DingTalk.Api.Response.SmartworkAttendsGetleaveapprovedurationResponse>
    {
        /// <summary>
        /// 请假开始时间
        /// </summary>
        public Nullable<DateTime> FromDate { get; set; }
 
        /// <summary>
        /// 请假结束时间
        /// </summary>
        public Nullable<DateTime> ToDate { get; set; }
 
        /// <summary>
        /// 员工在企业内的UserID,企业用来唯一标识用户的字段。
        /// </summary>
        public string Userid { get; set; }
 
        #region IDingTalkRequest Members
 
        public override string GetApiName()
        {
            return "dingtalk.smartwork.attends.getleaveapproveduration";
        }
 
        public override string GetApiCallType()
        {
            return DingTalkConstants.CALL_TYPE_TOP;
        }
 
        public override IDictionary<string, string> GetParameters()
        {
            TopDictionary parameters = new TopDictionary();
            parameters.Add("from_date", this.FromDate);
            parameters.Add("to_date", this.ToDate);
            parameters.Add("userid", this.Userid);
            if (this.otherParams != null)
            {
                parameters.AddAll(this.otherParams);
            }
            return parameters;
        }
 
        public override void Validate()
        {
            RequestValidator.ValidateRequired("from_date", this.FromDate);
            RequestValidator.ValidateRequired("to_date", this.ToDate);
            RequestValidator.ValidateRequired("userid", this.Userid);
        }
 
        #endregion
    }
}