-
Notifications
You must be signed in to change notification settings - Fork 9
/
TmallFuwuHomedecorationSupplyruleListAPIRequest.go
110 lines (93 loc) · 3.44 KB
/
TmallFuwuHomedecorationSupplyruleListAPIRequest.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"
)
// TmallFuwuHomedecorationSupplyruleListAPIRequest 查询供给规则接口 API请求
// tmall.fuwu.homedecoration.supplyrule.list
//
// 查询供给规则接口
type TmallFuwuHomedecorationSupplyruleListAPIRequest struct {
model.Params
// 业务唯一编号
_uniqueNo string
// 每页大小,不传默认只查20条,最大不能超过500
_pageSize int64
// 当前页数
_pageIndex int64
}
// NewTmallFuwuHomedecorationSupplyruleListRequest 初始化TmallFuwuHomedecorationSupplyruleListAPIRequest对象
func NewTmallFuwuHomedecorationSupplyruleListRequest() *TmallFuwuHomedecorationSupplyruleListAPIRequest {
return &TmallFuwuHomedecorationSupplyruleListAPIRequest{
Params: model.NewParams(3),
}
}
// Reset IRequest interface 方法, 清空结构体
func (r *TmallFuwuHomedecorationSupplyruleListAPIRequest) Reset() {
r._uniqueNo = ""
r._pageSize = 0
r._pageIndex = 0
r.Params.ToZero()
}
// GetApiMethodName IRequest interface 方法, 获取Api method
func (r TmallFuwuHomedecorationSupplyruleListAPIRequest) GetApiMethodName() string {
return "tmall.fuwu.homedecoration.supplyrule.list"
}
// GetApiParams IRequest interface 方法, 获取API参数
func (r TmallFuwuHomedecorationSupplyruleListAPIRequest) GetApiParams(params url.Values) {
for k, v := range r.Params {
params.Set(k, v.String())
}
}
// GetRawParams IRequest interface 方法, 获取API原始参数
func (r TmallFuwuHomedecorationSupplyruleListAPIRequest) GetRawParams() model.Params {
return r.Params
}
// SetUniqueNo is UniqueNo Setter
// 业务唯一编号
func (r *TmallFuwuHomedecorationSupplyruleListAPIRequest) SetUniqueNo(_uniqueNo string) error {
r._uniqueNo = _uniqueNo
r.Set("unique_no", _uniqueNo)
return nil
}
// GetUniqueNo UniqueNo Getter
func (r TmallFuwuHomedecorationSupplyruleListAPIRequest) GetUniqueNo() string {
return r._uniqueNo
}
// SetPageSize is PageSize Setter
// 每页大小,不传默认只查20条,最大不能超过500
func (r *TmallFuwuHomedecorationSupplyruleListAPIRequest) SetPageSize(_pageSize int64) error {
r._pageSize = _pageSize
r.Set("page_size", _pageSize)
return nil
}
// GetPageSize PageSize Getter
func (r TmallFuwuHomedecorationSupplyruleListAPIRequest) GetPageSize() int64 {
return r._pageSize
}
// SetPageIndex is PageIndex Setter
// 当前页数
func (r *TmallFuwuHomedecorationSupplyruleListAPIRequest) SetPageIndex(_pageIndex int64) error {
r._pageIndex = _pageIndex
r.Set("page_index", _pageIndex)
return nil
}
// GetPageIndex PageIndex Getter
func (r TmallFuwuHomedecorationSupplyruleListAPIRequest) GetPageIndex() int64 {
return r._pageIndex
}
var poolTmallFuwuHomedecorationSupplyruleListAPIRequest = sync.Pool{
New: func() any {
return NewTmallFuwuHomedecorationSupplyruleListRequest()
},
}
// GetTmallFuwuHomedecorationSupplyruleListRequest 从 sync.Pool 获取 TmallFuwuHomedecorationSupplyruleListAPIRequest
func GetTmallFuwuHomedecorationSupplyruleListAPIRequest() *TmallFuwuHomedecorationSupplyruleListAPIRequest {
return poolTmallFuwuHomedecorationSupplyruleListAPIRequest.Get().(*TmallFuwuHomedecorationSupplyruleListAPIRequest)
}
// ReleaseTmallFuwuHomedecorationSupplyruleListAPIRequest 将 TmallFuwuHomedecorationSupplyruleListAPIRequest 放入 sync.Pool
func ReleaseTmallFuwuHomedecorationSupplyruleListAPIRequest(v *TmallFuwuHomedecorationSupplyruleListAPIRequest) {
v.Reset()
poolTmallFuwuHomedecorationSupplyruleListAPIRequest.Put(v)
}