-
Notifications
You must be signed in to change notification settings - Fork 9
/
AlibabaSscSupplyplatformServiceworkerWokrerleaveAPIRequest.go
110 lines (93 loc) · 3.93 KB
/
AlibabaSscSupplyplatformServiceworkerWokrerleaveAPIRequest.go
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
package tmallservice
import (
"net/url"
"sync"
"github.com/bububa/opentaobao/model"
)
// AlibabaSscSupplyplatformServiceworkerWokrerleaveAPIRequest 工人请假 API请求
// alibaba.ssc.supplyplatform.serviceworker.wokrerleave
//
// 工人请假
type AlibabaSscSupplyplatformServiceworkerWokrerleaveAPIRequest struct {
model.Params
// 开始和结束时间
_leaveBeginAndEndArray []string
// 请假原因
_reason string
// 身份证号
_identityNumber string
}
// NewAlibabaSscSupplyplatformServiceworkerWokrerleaveRequest 初始化AlibabaSscSupplyplatformServiceworkerWokrerleaveAPIRequest对象
func NewAlibabaSscSupplyplatformServiceworkerWokrerleaveRequest() *AlibabaSscSupplyplatformServiceworkerWokrerleaveAPIRequest {
return &AlibabaSscSupplyplatformServiceworkerWokrerleaveAPIRequest{
Params: model.NewParams(3),
}
}
// Reset IRequest interface 方法, 清空结构体
func (r *AlibabaSscSupplyplatformServiceworkerWokrerleaveAPIRequest) Reset() {
r._leaveBeginAndEndArray = r._leaveBeginAndEndArray[:0]
r._reason = ""
r._identityNumber = ""
r.Params.ToZero()
}
// GetApiMethodName IRequest interface 方法, 获取Api method
func (r AlibabaSscSupplyplatformServiceworkerWokrerleaveAPIRequest) GetApiMethodName() string {
return "alibaba.ssc.supplyplatform.serviceworker.wokrerleave"
}
// GetApiParams IRequest interface 方法, 获取API参数
func (r AlibabaSscSupplyplatformServiceworkerWokrerleaveAPIRequest) GetApiParams(params url.Values) {
for k, v := range r.Params {
params.Set(k, v.String())
}
}
// GetRawParams IRequest interface 方法, 获取API原始参数
func (r AlibabaSscSupplyplatformServiceworkerWokrerleaveAPIRequest) GetRawParams() model.Params {
return r.Params
}
// SetLeaveBeginAndEndArray is LeaveBeginAndEndArray Setter
// 开始和结束时间
func (r *AlibabaSscSupplyplatformServiceworkerWokrerleaveAPIRequest) SetLeaveBeginAndEndArray(_leaveBeginAndEndArray []string) error {
r._leaveBeginAndEndArray = _leaveBeginAndEndArray
r.Set("leave_begin_and_end_array", _leaveBeginAndEndArray)
return nil
}
// GetLeaveBeginAndEndArray LeaveBeginAndEndArray Getter
func (r AlibabaSscSupplyplatformServiceworkerWokrerleaveAPIRequest) GetLeaveBeginAndEndArray() []string {
return r._leaveBeginAndEndArray
}
// SetReason is Reason Setter
// 请假原因
func (r *AlibabaSscSupplyplatformServiceworkerWokrerleaveAPIRequest) SetReason(_reason string) error {
r._reason = _reason
r.Set("reason", _reason)
return nil
}
// GetReason Reason Getter
func (r AlibabaSscSupplyplatformServiceworkerWokrerleaveAPIRequest) GetReason() string {
return r._reason
}
// SetIdentityNumber is IdentityNumber Setter
// 身份证号
func (r *AlibabaSscSupplyplatformServiceworkerWokrerleaveAPIRequest) SetIdentityNumber(_identityNumber string) error {
r._identityNumber = _identityNumber
r.Set("identity_number", _identityNumber)
return nil
}
// GetIdentityNumber IdentityNumber Getter
func (r AlibabaSscSupplyplatformServiceworkerWokrerleaveAPIRequest) GetIdentityNumber() string {
return r._identityNumber
}
var poolAlibabaSscSupplyplatformServiceworkerWokrerleaveAPIRequest = sync.Pool{
New: func() any {
return NewAlibabaSscSupplyplatformServiceworkerWokrerleaveRequest()
},
}
// GetAlibabaSscSupplyplatformServiceworkerWokrerleaveRequest 从 sync.Pool 获取 AlibabaSscSupplyplatformServiceworkerWokrerleaveAPIRequest
func GetAlibabaSscSupplyplatformServiceworkerWokrerleaveAPIRequest() *AlibabaSscSupplyplatformServiceworkerWokrerleaveAPIRequest {
return poolAlibabaSscSupplyplatformServiceworkerWokrerleaveAPIRequest.Get().(*AlibabaSscSupplyplatformServiceworkerWokrerleaveAPIRequest)
}
// ReleaseAlibabaSscSupplyplatformServiceworkerWokrerleaveAPIRequest 将 AlibabaSscSupplyplatformServiceworkerWokrerleaveAPIRequest 放入 sync.Pool
func ReleaseAlibabaSscSupplyplatformServiceworkerWokrerleaveAPIRequest(v *AlibabaSscSupplyplatformServiceworkerWokrerleaveAPIRequest) {
v.Reset()
poolAlibabaSscSupplyplatformServiceworkerWokrerleaveAPIRequest.Put(v)
}