-
Notifications
You must be signed in to change notification settings - Fork 9
/
AlibabaServicecenterIdentifytaskCreateAPIRequest.go
94 lines (79 loc) · 3.35 KB
/
AlibabaServicecenterIdentifytaskCreateAPIRequest.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
package tmallservice
import (
"net/url"
"sync"
"github.com/bububa/opentaobao/model"
)
// AlibabaServicecenterIdentifytaskCreateAPIRequest 创建核销单 API请求
// alibaba.servicecenter.identifytask.create
//
// 创建核销单
type AlibabaServicecenterIdentifytaskCreateAPIRequest struct {
model.Params
// 工单集合
_workcardIds []int64
// 核销单外部标识,服务商保证唯一。如果创建核销单时传入重复的outer_id,系统直接会返回服务商下该outer_id对应的核销单,不会重新创建新核销单。
_outerId string
}
// NewAlibabaServicecenterIdentifytaskCreateRequest 初始化AlibabaServicecenterIdentifytaskCreateAPIRequest对象
func NewAlibabaServicecenterIdentifytaskCreateRequest() *AlibabaServicecenterIdentifytaskCreateAPIRequest {
return &AlibabaServicecenterIdentifytaskCreateAPIRequest{
Params: model.NewParams(2),
}
}
// Reset IRequest interface 方法, 清空结构体
func (r *AlibabaServicecenterIdentifytaskCreateAPIRequest) Reset() {
r._workcardIds = r._workcardIds[:0]
r._outerId = ""
r.Params.ToZero()
}
// GetApiMethodName IRequest interface 方法, 获取Api method
func (r AlibabaServicecenterIdentifytaskCreateAPIRequest) GetApiMethodName() string {
return "alibaba.servicecenter.identifytask.create"
}
// GetApiParams IRequest interface 方法, 获取API参数
func (r AlibabaServicecenterIdentifytaskCreateAPIRequest) GetApiParams(params url.Values) {
for k, v := range r.Params {
params.Set(k, v.String())
}
}
// GetRawParams IRequest interface 方法, 获取API原始参数
func (r AlibabaServicecenterIdentifytaskCreateAPIRequest) GetRawParams() model.Params {
return r.Params
}
// SetWorkcardIds is WorkcardIds Setter
// 工单集合
func (r *AlibabaServicecenterIdentifytaskCreateAPIRequest) SetWorkcardIds(_workcardIds []int64) error {
r._workcardIds = _workcardIds
r.Set("workcard_ids", _workcardIds)
return nil
}
// GetWorkcardIds WorkcardIds Getter
func (r AlibabaServicecenterIdentifytaskCreateAPIRequest) GetWorkcardIds() []int64 {
return r._workcardIds
}
// SetOuterId is OuterId Setter
// 核销单外部标识,服务商保证唯一。如果创建核销单时传入重复的outer_id,系统直接会返回服务商下该outer_id对应的核销单,不会重新创建新核销单。
func (r *AlibabaServicecenterIdentifytaskCreateAPIRequest) SetOuterId(_outerId string) error {
r._outerId = _outerId
r.Set("outer_id", _outerId)
return nil
}
// GetOuterId OuterId Getter
func (r AlibabaServicecenterIdentifytaskCreateAPIRequest) GetOuterId() string {
return r._outerId
}
var poolAlibabaServicecenterIdentifytaskCreateAPIRequest = sync.Pool{
New: func() any {
return NewAlibabaServicecenterIdentifytaskCreateRequest()
},
}
// GetAlibabaServicecenterIdentifytaskCreateRequest 从 sync.Pool 获取 AlibabaServicecenterIdentifytaskCreateAPIRequest
func GetAlibabaServicecenterIdentifytaskCreateAPIRequest() *AlibabaServicecenterIdentifytaskCreateAPIRequest {
return poolAlibabaServicecenterIdentifytaskCreateAPIRequest.Get().(*AlibabaServicecenterIdentifytaskCreateAPIRequest)
}
// ReleaseAlibabaServicecenterIdentifytaskCreateAPIRequest 将 AlibabaServicecenterIdentifytaskCreateAPIRequest 放入 sync.Pool
func ReleaseAlibabaServicecenterIdentifytaskCreateAPIRequest(v *AlibabaServicecenterIdentifytaskCreateAPIRequest) {
v.Reset()
poolAlibabaServicecenterIdentifytaskCreateAPIRequest.Put(v)
}